- This topic has 3 replies, 2 voices, and was last updated 18 years, 6 months ago by Riyad Kalla.
-
AuthorPosts
-
M.SchlierfMemberHi,
I had a problem with adding and removing modules to an web application project.
The problem was that the application.xml didn´t contain the right values.e.g.
cnsApp (Application)
cnsWeb1 (Web project)
cnsWeb2 (Web project – branch of cnsWeb1)
cnsEJB1 (Bean)
cnsEJB2 (Bean)I added cnsWeb1 to cnsApp with add module and it was correctly added to the xml.
same for cnsEJB1 and cnsEJB2.
After adding the cnsWeb2 the xml lost cnsEJB1 and cnsEJB2 and only contained cnsWeb1 but not cnsWeb2
No matter how often I tried to remove and add again, I got different xml´s but never the one containig all modules.
I searched toe forum and did some things which helped other people with problems that are close to mine, but nothing helped (-clean to startup, recreate the application project, …)
So I spent lot of time to search the error but, YEHAA 🙂 I found it.When creating a web module it gets an id this id is stored in the .mymetadata of the project
cnsWeb2 was a branch checkout of cnsWeb1 with just another root context
so both web projects had the same id (because a branch is only a copy from the original project)So the workaround if you have this behavior is to simply change the id in the .mymetadata file to a unique one.
I would say, this is a kind of “feature” that should be reworked, a path checking or on the fly ID creation would save much time for customers searching errors.
If you don´t want to edit the .mymetadata file you can create a new project and move all sources from the copy to the new one and use this. (my Project comes from SVN so for me it´s better to just edit and commit the changes)
It was really annoying and nearly made me trash my MyEclipse licences.
Riyad KallaMemberM.Schlierf,
First let me thank you for posting this for others to learn from, I will make this thread sticky in case other people have a similar problem. I will also file this as a bug as this behavior was no doubt maddening and we appologize for it.Just to clarify, you mentioned that cns2 was a branch checkout of 1, are the project files stored in your source repository? Was project 2 simply created by making a copy of branching project 1 so all the project files were duplicated? MyEclipse doesn’t hook into the Team operations so seeing this take place and generating a unique ID for the duped project is not an option for us. I’m just trying to clarify the use case that caused this.
M.SchlierfMemberYes, all project files are in SVN.
And all are simply duped.But why don´t you create a unique ID for each project when it´s added to the application xml.
It´s XML, so it´s easy to parse 🙂
Check if the id is already there and if it´s there but with different web-uri or ejb then create a new unique id.
Or ask the user for a new ID…
Or throw an error …
Or something like that ^^
Riyad KallaMemberYea you are right, *something* should happen.
-
AuthorPosts