Meaningless Drivel is fun!*
The moose likes BEA/Weblogic and the fly likes download extension mechanism not working for WAR file in WebLogic 7.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "download extension mechanism not working for WAR file in WebLogic 7.0" Watch "download extension mechanism not working for WAR file in WebLogic 7.0" New topic
Author

download extension mechanism not working for WAR file in WebLogic 7.0

Amshuman KR
Greenhorn

Joined: Jan 16, 2003
Posts: 1
Hi,
I hope the problem explanation is not too long :-)
So, to be brief, I'm unable to access classes in a Jar file outside a WAR file but inside the same EAR file as the WAR file using the Java download extension mechanism (Class-Path attribute of the Manifest.mf file)
I have a WAR file with servlets, utility classes,
and HTML pages. As I need the utility classes in other WAR files also, I've removed them from the WAR file and created a separate JAR file for the utility class files (say utils.jar).
accodring to the download extension mechanism, I've included both the WAR file (mywar.war) and the utils.jar in an EAR file and the manifest file(of the WAR file) is as follows
-----------------------------------------
Manifest-Version: 1.0
Created-By: Oracle9i JDeveloper 9.0.3
Class-Path: utils.jar
-----------------------------------------
the structure of the EAR file is as follows
META-INF/Manifest.mf
mywar.war
utils.jar
(I'm sure, I've modified the Manifest.mf of mywar.war and not the EAR file)
Now, when I deploy this EAR in WebLogic 7.0 and call a servlet in mywar.war, I get a "java.lang.NoClassDefFoundError" for one of the classes in utils.jar.
To be sure about the structure of mywar.war and utils.jar, I've also tried putting the utils.jar in the WEB-INF/lib folder of mywar.war and it worked.
But that is not the solution I need. Can anyone help me with this problem? Has anyone come across a similar problem?
Any input is appreciated.
regards,
Amshuman
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: download extension mechanism not working for WAR file in WebLogic 7.0
 
Similar Threads
Ant NoClassDefFoundError
"NoClassDefFound Error" deploying EAR file
setting up Log4J in Orion webapps
JBoss class loading and reading .properties files
Orion - Class-Path in Manifest.mf for EJBs