-
1. Re: Errors after renaming base models in the Designer
rareddy Jun 7, 2012 9:38 PM (in response to bgroh)clean and rebuild the models.
-
2. Re: Errors after renaming base models in the Designer
bgroh Jun 7, 2012 10:03 PM (in response to rareddy)That was the first thing I've tried. Didn't do anything. Errors were still there after.
-
3. Re: Errors after renaming base models in the Designer
rareddy Jun 7, 2012 10:47 PM (in response to bgroh)Did you rebuild the imports? Project->Build All Imports
-
4. Re: Errors after renaming base models in the Designer
bgroh Jun 7, 2012 10:55 PM (in response to rareddy)Yes, I've tried that as well. Did not have any effect on the errors either.
-
5. Re: Errors after renaming base models in the Designer
rareddy Jun 8, 2012 9:16 AM (in response to bgroh)How did you rename? Did you use the refectoring in eclipse or manually changed outside? Using refactoring we were not execting this error. Can you gives us steps to recreate the issue?
-
6. Re: Errors after renaming base models in the Designer
elvisisking Jun 8, 2012 9:17 AM (in response to bgroh)Sorry about your circumstance. Just want to verify that you used the Refactor -> Rename option. Is there a way you can get a small project together or tell us how to duplicate this? Hopefully you have a way to revert this refactoring and get back to a starting point again.
-
7. Re: Errors after renaming base models in the Designer
bgroh Jun 11, 2012 7:47 PM (in response to elvisisking)Yes, of course I've used Refactor -> Rename. And unfortunately, trying to undo the rename caused a lot of subsequent issues in my model. What I did to revert the process was delete my entire project, and do a fresh checkout from the repository. And I, for one, can replicate the problem. Here's what I did:
1. Pick one of your base models. Not an imported data source, but a virtual base layer on top of it, from which you've derived multiple view models.
2. For this base model, do a Refactor -> Rename.
This will now rename the base model, and update the derived models. The sql of the derived models now reflects the renaming, but every derived model will now also be in an error state, all with the same error as shown in the OP.
I'm running the Designer 7.7 Final in Eclipse 3.7.2.
-
8. Re: Errors after renaming base models in the Designer
elvisisking Jun 12, 2012 2:57 PM (in response to bgroh)Bernd,
I'm trying to recreate your issues. Here is what I did:
1. I used JDBC importer to create a source model.
2. I created a new virtual model transforming the source model from created in step 1. Let's call this new virtual model MasterView. It is just a virtual copy of the source model.
3. I created a new virtual model transforming it from the MasterView model of step 2. Let's call this new virtual model View1.
4. I repeated step 3 five (5) more times. So now I have virtual models View1 through View6 all transformed from the virtual model MasterView. MasterView tables are the sources in all transformations.
5. I refactored/renamed MasterView to ViewMaster.
I am not seeing any problem markers in the Problems View for any of the models. The refactor looks like it worked fine. Do you believe these steps should've recreated the issue you are seeing?
If you could come up with a simple scenario like I just ran through that can recreate your issue please pass it on.
Sorry again for all the trouble.
-
9. Re: Errors after renaming base models in the Designer
mdrillin Jun 12, 2012 3:18 PM (in response to bgroh)Bernd,
What OS are you running on? In the past we've sometimes observed issues on Windows OS - when there were spaces or special chars in the installation path.
-
10. Re: Errors after renaming base models in the Designer
bgroh Jun 12, 2012 8:05 PM (in response to elvisisking)Dan, as to your scenario, yes, that's essentially what I did, though it's been spread over quite a few different versions of the Designer, and there were a lot of model updates in between. As such, I'm not actually sure whether starting with clean models in the current Designer version will recreate the issue. I can replicate the issue with the steps I did in my current project. Unfortunately, I've got very tight deadlines at the moment and I can't take the time to try and recreate the issue any other way. What I'm primarily looking for here is not how to get to this error, but how to fix it quickly, even if it means I've got to update xml files manually. Any help with this would be much appreciated.
Mark, I'm running RHEL6.
-
11. Re: Errors after renaming base models in the Designer
elvisisking Jun 13, 2012 8:37 AM (in response to bgroh)Bernd,
I have found a way to duplicate your issue. For me to duplicate, I closed my project to unload all the model and diagram objects. Then reopened the project and then refactored/renamed the MasterView model (from above example) to ViewMaster. I then received the same type of errors you are getting.
There is a way to fix these errors by directly editing the model files. Here is what you can do:
1. For each model that has the error, open in a text editor.
2. Search for old name of the virtual model you refactored. It should be within a <diagramEntity> tag and will look something like this:
<diagramEntity xmi:uuid="mmuuid:7b7a4feb-190b-402f-bdbc-319a6acf392d" xPosition="328" yPosition="50">
<modelObject href="OLD-NAME-OF-MODEL.xmi#mmuuid/9078eba6-3215-4f14-bffd-b3a9e0ef48e9"/>
</diagramEntity>
3. Simply change "OLD-NAME-OF-MODEL" to the correct name. In my case, I changed:
<modelObject href="MasterView.xmi#mmuuid/9078eba6-3215-4f14-bffd-b3a9e0ef48e9"/>
to this:
<modelObject href="ViewMaster.xmi#mmuuid/9078eba6-3215-4f14-bffd-b3a9e0ef48e9"/>
4. After changing all affected files, the problem markers should go away and you should get a clean build.
So I believe the reason I wasn't seeing these errors initially is because all the models in my workspace had all be loaded/realized since each of them had been opened in a Model Editor. This was probably not your case. As a workaround, if you try this again, try opening all the involved models in an editor prior to refactoring.
Also, let me know if the hand-editing of the *.xmi model files works for you. You/I can write up an issue on this when I hear back from you.
Thanks for bringing this issue to our attention!
-
12. Re: Errors after renaming base models in the Designer
bgroh Jun 14, 2012 8:30 AM (in response to elvisisking)I did the workaround you suggested. I opened my project, and then opened all of the diagrams of every single model. After doing this, the refactoring went through without any reported errors. Saved me from having to manually edit the xml files. Thanks for the help, and do feel free to write up an issue for this.