- This topic has 11 replies, 3 voices, and was last updated 9 years, 8 months ago by support-piotr.
-
AuthorPosts
-
VEGAS.comParticipantHi,
so we recently tried upgrading to MyEclipse 2015 CI from 2014. We’re using the following build of ME:
Version: 2015 CI
Build id: 13.0.0-20141111We have a couple Web projects that include additional EJB projects from the workspace.
On ME 2014 when deploying the Web project to an JBoss 7 server (jboss 6 eap) the EJB project’s were deployed unpacked and merged inside the WEB-INF/classes folder.
On 2015 the EJB projects are being deployed packaged even if the Merged Deployment setting is turned on.
ME 2014
http://i.imgur.com/mTToom5.jpg
http://i.imgur.com/6fNEiPU.jpg
ME 2015
http://i.imgur.com/xLisaB3.jpg
http://i.imgur.com/vgyK1k4.jpg
http://i.imgur.com/BjqccQm.jpg
Attachments:
You must be logged in to view attached files.
support-pradeepMembervegasdotcom,
I could replicate the issue at my end. I have filed a bug report for the dev team to investigate on this issue. I’m afraid we don’t have any workaround for now. We will get back to you as soon as we have any workaround or a fix for this.
Sorry for the inconvenience caused.
support-piotrParticipantvegasdotcom,
I am sorry that the change in behaviour has caused issues on your end. We have disabled merge deployment of EJB modules as other users were complaining about that happening.
We have improved Merged Deployment capabilities and in the upcoming in the next week release of MyEclipse 2015 CI 9 you will be able to customize merged deployment settings per module. It will automatically merge deploy any EJB or Utility module, unless it has in META-INF: *.tld, ejb-jar.xml or beans.xml file.
We have found out that taglibs (which contain *.tld files in META-INF) should not be merge deployed as many servers do not handle this well, as well, as any EJB or Beans Deployment Descriptor may conflict with an existing one in Web project or other merge deployed modules. That’s why merge deployment will be disabled by default for those cases. However, you will be able to configure that particular module for merge deployment through deployment assembly if you find it working fine in your case.
I hope that you will feel comfortable with such a solution.
VEGAS.comParticipantHi,
so after recently upgrading MyEclipse Enterprise Workbench to
Version: 2015 CI
Build id: 13.0.0-20141222I can see the new drop downs for the merged deployment on/off/auto modes. However the drop down is only available when Deploy Path is specified as “WEB-INF/lib/…”. We would like to be able to choose any path and still get the merged deploy option.
In our setup we re-use the same EJB projects inside EAR and also WAR projects (these specific WAR projects don’t go inside the EARs). Also the EJB projects export Ivy dependencies that get put inside the EAR/lib folder. This is defined at the EJB project in the project assembly as Deployment Path of “../lib”.
So when we set Deploy Path on the WAR for the included EJB project “WEB-INF/lib/EJBProject.jar” and set the merged = on, the Ivy exported libraries deployment path becomes “WEB-INF/lib/lib” and the jar files from Ivy end up in the wrong spot again.
If we could do merged deployment for “WEB-INF/EJBProject.jar” then the Ivy libraries will end up in “WEB-INF/lib” and everything will be just fine. We can’t change the Ivy deployment path inside the EJB projects because it breaks the EAR packaging and the files are not being deployed in the EAR/lib folder.
I’m attaching another sample project, this time with Ivy libraries. To be able to use that you need to install the Ivy plugin for eclipse.
http://i.imgur.com/iX9VHQe.jpg
http://i.imgur.com/KdNbWlQ.jpg
http://i.imgur.com/7xgUu0m.jpg
Attachments:
You must be logged in to view attached files.
support-piotrParticipantvegasdotcom,
What you want to achieve is not possible even without the merged deployment option. The problem is that the mapping into parent container (“../lib”) in Deployment Assembly cannot be different for different types of parents, so there is a conflict between EAR and Web mapping. MyEclipse 2014 behaves the same in this case.
I would not advise to place same jars in the EAR and in the Web project as they would be loaded by different classloaders, which in turn might lead to some problems, unless you really need separate classloaders for those classes. Since EJB is included in the EAR project, instead of deploying it along with web project (including it in web projects DA and in WEB-INF/lib) I would advise to refer to EJB jar deployed with EAR from web project. You can do it by switching to “Manifest Entries” tab on Deployment Assembly page of the web project and adding a reference to the EJB jar. This will put EJB classes on the build path of web project and ensure that your server will pick up the dependency. I have tested this scenario with JBoss 7 and JEE 6 projects and it works.
Please let us know if you need any further advise!
VEGAS.comParticipantHi,
so one thing that I mentioned in my earlier reply – the specific WAR projects we’re having problems with are actually standalone WARs we deploy to the server, and not part of any EAR. However we want to share the same EJB projects between the EARs and the WARs.
Somehow the old ME 2014 didn’t have trouble with that merged deployment and we could specify deployment path for the EJB project like “WEB-INF/EJBProject.jar” the Ivy dependencies provided by the EJB were always going in the WEB-INF/lib folder because of the “../lib” deploy path inside the EJB project.
support-piotrParticipantHi!
Ok, now I fully get the configuration hack you’ve made 🙂 I will file a bug for that and I will fix it, so that the mapping to “../lib” works both for EAR and WEB, without any need for hacks. I hope to get the fix into MyEclipse 2015 GA release next week.
VEGAS.comParticipantHeh, I was carefully dancing around announcing the way we did was hacky, but yeah … it’s a hack 😉
Thanks for your help!
VEGAS.comParticipantHi guys,
any update on this? I’m currently on MyEclipse 2015 CI11 and we are still having this problem where we can’t specify merged deployment on the EJB jars.
Thanks
support-piotrParticipantHi!
The fix has been included in MyEclipse sometime ago. Sorry for not informing you. EJB’s should be correctly merged and the workaround should not be needed. A mapping in EJB to ../lib should be respected both by Web and EAR projects. Let me know if this is not happening in your case!
VEGAS.comParticipantHi,
after spending some more time on this I can confirm it works for us now!!!
I had to change the deployment path to be “WEB-INF/lib/ejb_project.jar” to get the exploded deployment. Deployed and everything seems to be where it needs to be. Our old 2014 config was “WEB-INF/ejb_project.jar” and it didn’t work like that. That’s not a problem, we don’t mind changing this config.
Thanks for your help.
support-piotrParticipantHi!
That’s really great 🙂 I am glad to help you with that and sorry for not replying earlier! Let us know if you have any further questions.
-
AuthorPosts