Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deploy EJB fails in WebLogic

 
Edmund Yong
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My application's classes are contained in a file called "project.jar". Also in this file are three EJB classes/interfaces (for a stateless session bean), and the EJB descriptor:

Contents of project.jar:



The EJB classes in project.jar are using some other classes in other JAR files (thirdparty.jar, others.jar, etc).

Here is the list of the JAR files in the web context:



Now the problem is, when I tried to deploy the EJB with WebLogic, I am getting a NoClassDefFoundError exception for a specific class in one of the other two JAR files.

It seems that WebLogic does not look in the lib folder for classes during the deployment of the EJB.

What should I do? Am I doing correctly?

Should I include a MANIFEST.MF file in META-INF of project.jar, and add a "Class-Path" element (with thirdparty.jar and others.jar) to MANIFEST.MF?


Thanks.
 
B.Sathish
Ranch Hand
Posts: 372
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Edmond,
My gut feeling is that the web container will be able to recognize the jar files in WEB-INF/lib, but I am not sure whether the EJB container can. You can try setting these jar files in the CLASSPATH in startWebLogic.sh or startWebLogic.cmd and then start the server using the -classpath option. This will append these jars to the weblogic CLASSPATH when the server starts and you should be fine after that.
 
Edmund Yong
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, you are right. I can specifiy in the CLASSPATH. Alternatively, I can also specify the JAR files in the Class-Path element of the EJB JAR's META-INF/MANIFEST.MF file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic