Opening a model after reverting to a previous version of a profile results in "Package with uri ... not found" error

Technote (troubleshooting)


Problem(Abstract)

Attempts to open a model after reverting to a previous version of an applied, non-released profile and renaming the same profile result in the "Package with uri 'http:///schemas/ProfileName/ID/Version' not found", when using IBM Rational Software Architect.

Symptom

While developing profiles, it is possible to rename a profile that was previously applied to a test model. The following steps produce a successful model migration after renaming a profile:

  1. Create a profile called MyProfile

  2. Add a stereotype, MyStereotype, that extends the metaclass Class

  3. Save the profile. It gets Version 1 and no release label, since it is not released

  4. Apply the profile to a model. You will see the Select Profile: The selected profile has not been released. warning, as in the screenshot:

  5. Add a class MyClass to the model and apply the stereotype MyStereotype to the class

  6. Save and close the model

  7. Right click on the profile, select Refactor > Rename and rename the profile to MyProfile2

  8. Save the profile

  9. Open the model

    You will see a message with this text:


The following profiles have newer versions. Would you like to apply the latest version of the profiles selected?

<ProfileName>


It is enough to select OK in the above dialog and the model will correctly reference the renamed profile.

Instead, you see a message like the following:

Profile Migration <ModelName>

Missing profiles and/or profile versions:
Unavailable version of the <ProfileName> profile is applied to the package <ModelName>.

Cause

This issue happens if you use a configuration management tool and if you proceed as follows:

  1. Create a profile called TestProfile

  2. Add stereotypes and save the profile multiple times

  3. Do not release the profile. At this point the profile has version X and no release label, since it is not released

  4. Apply the version X of the profile to a model

  5. Apply some stereotypes from TestProfile to some elements of the model

  6. Save and close the model

  7. Revert to version X-N of the profile from the configuration management tool, for example, by creating a new branch or stream in the configuration management tool

  8. Right click on the profile and select: Refactor>Rename. This creates version X-N+1, regardless of whether you rename the profile or not. You will get the issue listed below.

  9. Save the profile

  10. Open the model

    At this point the model references the version X of the profile, while the only available (renamed) version is X-N+1.

Therefore, you will see this message:

Profile Migration <ModelName>

Missing profiles and/or profile versions:
Unavailable version of the <ProfileName> profile is applied to the package <ModelName>.

It will not be possible to select the option to repair the applied profile, because the Repair button will appear dimmed:


The version of the profile appears as -1:




Even if you attempt to increase the version of the profile to X+1 on the new branch or stream (for example, you save the profile as many times as required), you will still see this information in the profile properties of the model:

Package or Model > Properties> Profiles > Applied Profiles

Name Version Release Label
 <ProfileName> (OUT OF SYNC) -1


Diagnosing the problem

When you save a profile without releasing it, additional profile contents are stored in the profile.

When you apply a profile to a model, the model references both the profile version and the content identifier corresponding to that version.

If you revert to a previous version of a profile, and then generate new versions in a new configuration management branch or stream, the content identifier of the newly generated version X does not match the original content identifier of version X in the original branch or stream. Therefore, even if you increase the version number of the profile on new branch or stream, you cannot successfully migrate the model to using the new profile.


Resolving the problem

Once you perform the above steps, you can only recover by removing the profile from the model, and applying the latest version of the profile again. This procedure causes data loss. When you remove the profile, all the stereotypes applications related to that profile will be removed from the model.

To avoid this problem, follow these best practices:

  • Release profiles before applying them to production models
  • Do not revert to previous versions of a profile that has already been applied to any models, even just used for testing purposes

Related information

Releasing profiles
Parallel development

Cross reference information
Segment Product Component Platform Version Edition
Software Development Rational Software Architect for WebSphere Software Modeling Windows 8.0, 8.0.1, 8.0.2, 8.0.3, 8.0.4, 8.0.4.1, 8.5

Rate this page:

(0 users)Average rating

Document information


More support for:

Rational Software Architect
Modeling

Software version:

8.0, 8.0.1, 8.0.2, 8.0.3, 8.0.4, 8.0.4.1, 8.5

Operating system(s):

Linux, Windows

Reference #:

1609865

Modified date:

2012-11-07

Translate my page

Machine Translation

Content navigation