|Creating EJB project from EAR [message #204616]
||Fri, 16 November 2007 10:07
Originally posted by: mfcarignano.gmail.com|
I'm using a version of Europa (eclipse-jee-europa-fall-win32.zip) that
comes with Eclipse 3.3 and a server Web Logic 8.1. I have an EAR file that
contains some EJBs, WARs and other JARs. I was able to import the EAR file
in Eclipse and it has correctly generated one project per EJB, WAR, etc. I
was also able to deploy the EAR project (with all of its contents) in the
Web Logic run from Eclipse.
I have created a standard Java project with the source code of all the EAR
components and this project compiles with no errors. I have created a link
to this source code project from the folder "ImportedClasses" of my EJB
project (this folder contains the .class files of the EJB). I am able to
see it when I try to open a .class file. But to modify the java code I
have to go to the source code project.
Finally, here is my problem: I need to modify the source code of my EJB,
save it and redeploy the EAR project and get the changes done, but even
when the .class files are linked to the source, the source is compiled in
its own project and the changes are not reflected in the EJB project.
I have also tried to add my source code in the ejbModule folder of the EJB
project and remove the "ImportedClasses" folder from the Source tab in the
Java Build Path of the EJB project. In this case, the changes to the
source code get recompiled, but when I attempt to redeploy the EAR
project, I get the following error:
[wldeploy] Deployment failed on Server myserver
[wldeploy] dumping ApplicationException message
[wldeploy] Exception:weblogic.management.ApplicationException: prepare
failed for EventManagementEJB.jar
[wldeploy] Module: EventManagementEJB.jar Error: Exception preparing
[wldeploy] Unable to deploy EJB: EventManagementBean from
[wldeploy] at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
[wldeploy] at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
This class (EventManagementBean_cjdujk_HomeImpl) had existed in the EJB
JAR file that I had used to create the EJB project, but when I recompile
my source code, it is not generated.
I know it is a matter of settings of my EJB project, the original EJB was
created using an Ant script that created the stubs and skels necessary for
the EJB. Is there any way of making Eclipse to create the stubs and skels
used by the EJB?
Last note: I have tried to create a simple Web App with one servlet in
Eclipse and I am able to change the source, compile, redeploy and see the
Thanks in advance for your help.