I am trying to get my EJB project to deploy in WebLogic, and it just won't work. I have:
- IDEA 11.x
- Maven 2.x
- Java EE 5
- Windows
My Maven projects are very plain. There is nothing special here. And the IDEA project is generated from the Maven Pom files. I have not modified anything.
Here is my Project Info:
. --> root
./ZIE2KLServiceBean -> Maven project. Packing = EJB. Creates a .Jar file.
./ZIE2KLServiceEAR -> Maven project. Packing = EAR. Creates an .Ear file.
When I import the project it creates 4 Artifacts that can be deployed:
- ZIE2KLServiceBean:ejb
- ZIE2KLServiceBean:ejb exploded
- ZIE2KLServiceEar:ear
- ZIE2KLServiceEar:ear exploded
For Run/Debug Configurations, I have created one Weblogic 10 Configuration. If I mark *no* artifacts to depoy, then this instance starts up and runs just fine. If I deploy the .ear manually then the application is loaded and running. But I cannot get a depoyment to work from the IDE.
Question #1 - Which Artifact should I be deploying? What is the simplest possible thing I could do here?
If I mark the "ear" or "ear exploded" artifacts to be deployed, then I get IDEA errors:
Error copying 'C:\Users\b028559\workspace\newbld\zie2klService\ZIE2KLServiceBean\target\ZIE2KLServiceBean-2.5.1-SNAPSHOT\META-INF\persistence.xml' to 'C:\Users\b028559\workspace\newbld\zie2klService\ZIE2KLServiceEAR\target\ZIE2KLServiceEAR-2.5.1-SNAPSHOT\ZIE2KLServiceBean-2.5.1-SNAPSHOT.jar\META-INF\persistence.xml'.: C:\Users\b028559\workspace\newbld\zie2klService\ZIE2KLServiceEAR\target\ZIE2KLServiceEAR-2.5.1-SNAPSHOT\ZIE2KLServiceBean-2.5.1-SNAPSHOT.jar\META-INF\persistence.xml (The system cannot find the path specified)The .ear file has a .jar file within it, and IDEA is trying to copy files into a directory that doesn't exist.
If I try to deploy just the ejb artifact then that is broken as well. In that case WebLogic starts but nothing is deployed. In the Run window, I see the EJB listed under the Deployment panel, but the icon says "Server is not connected. Press 'Deploy' to start deployment". But pressing deploy does nothing. From the WLS admin console, there is nothing deployed.
Question #2 - What am I supposed to do here? How can I move forward.
I even tried this with a sample project I found here: http://code.google.com/p/ejb3-maven/
The only way I got anything to work was this:
- Create a new Artifact by hand
- Create folders in the Artifact called xxx.jar and yyy.jar
- Have IDEA copy the artifacts files into the directories that are named like Jar files
- Configure WLS to hot load the application from the Artifact output directory
Please tell me this is not the only way to make this work, because for a more complex project this is unworkable.
P.S. We are evaluating IntelliJ IDEA this sprint for our insurance company. WLS integration is the only thing holding us back at this point, and it is a show stopper.