Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WEB-INF/lib noclassdeffounderror

 
Glenn Dejaeger
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm currently deploying a web application module. I'm using WEBLOGIC 8.1 SP2. The application is structured in a war file. In the WEB-INF/lib directory of the war file, there are some external jar's.
When I deploy the war everything works fine until I enter the page that uses the external jar's.
Then I receive a noclassdeffounderror. The class that cannot be found is a class that's part of the jar located in the WEB-INF/lib directory of the war.
I tried to use a MANIFEST.MF file (located in META-INF in the war) and adding the Class-Path parameter here to load the external jar's.

This is my MANIFEST.MF file:
Manifest-Version: 1.0
Created-By: 1.3.1_03 (Sun Microsystems Inc.)
Class-Path: client.jar entbase.jar entssl.jar

Maybe the jar's location is not correct (it should be lib/clinet.jar for example)...

The same ware works fine when I use tomcat.
When I put the external jar's in the weblogic server/lib dir and add these jar's to the classpath in the startWebLogic.cmd script, everything works fine too. But that's not a good solution, I want weblogic to detect the jar's that are present within the WEB-INF/lib directory of my war file.

Somebody who knows a solution?
 
Roger Chung-Wee
Ranch Hand
Posts: 1683
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can you try and build and deploy your app as an EAR file? If there is a classloader problem, then this may solve it.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic