Maven EJB Project will not deploy on WebLogic (IDEA 11)

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:

  1. Create a new Artifact by hand
  2. Create folders in the Artifact called xxx.jar and yyy.jar
  3. Have IDEA copy the artifacts files into the directories that are named like Jar files
  4. 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.

0
5 comments
Avatar
Permanently deleted user

Looks like there is a problem with importing EAR/EJB projects from Maven. First of all please try to use the latest IDEA version (12.0.2). If the
problem repeats please attach pom.xml files.

--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0
Avatar
Permanently deleted user

In IDEA 12, I no longer see a compile error. However, I still do not have a deployment.

I can mark the "ear" artifact as the one that should be deployed... but when I click Deploy the console says:

[2013-02-04 04:26:48,750] Artifact roussev-ear:ear: Server is not connected. Press 'Deploy' to start deployment.

Attached is the simplest possible EJB project I can think of that shows the error.



Attachment(s):
ejb3-maven.zip
0

Hello, Hamlet,
I've just checked the attached project and it deploys fine for me. Please check that roussev-ear/target/application.xml file contains references to web and ejb modules (if it doesn't then call 'ear:generate-application-xml' goal). Are there any exceptions in idea.log file?

0
Avatar
Permanently deleted user

Can you please attach your setDomainEnv.cmd, startWebLogic.cmd, and stopWebLogic.cmd files? Plus the config.xml from your target WebLogic domain?

We are using non-standard port numbers, and I wonder if this is the problem.

0
Avatar
Permanently deleted user

I doubt that these files would help you because were generated by WebLogic and I didn't modify them. However IDEA should works with non-standard ports
as well. Could you please make sure that application.xml is generated properly in the target directory and check idea.log file for errors?

--
Nikolay Chashnikov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

0

Please sign in to leave a comment.