Win a copy of Spark in Action this week in the Open Source Projects forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Deploy EJB fails in WebLogic

 
Ranch Hand
Posts: 192
1
  • 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.
 
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: 192
1
  • 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.
    Bookmark Topic Watch Topic
  • New Topic