Am deploying an app as separate WAR and ejb-jar. Using ANT to build both pieces. Have successfully built and deployed WAR on JBoss 3.0 with Tomcat. War contains: web.xml, and weblogic.xml where they should be. WEB-INF/lib contains several jar files, as follows: web.jar (web tier only classes) properties.jar (just contains a .properties resource file) common.jar (common to web tier and ejb tier, contains ejb interfaces) log4j and similar utility jars schemas.jar containing some xml schema documents for messaging There are only two servlets in the app. Both servlets are configured to load on startup, but neither succeeds. A servlet exception is thrown, the stack trace of the cause is not logged by WLS. If I subsequently attempt to drive the servlet with an http request, I get a NoClassDefFoundError thrown out of one of my classes in common.jar. This to me means: the servlet in web.jar was found, the class was loaded, and began execution; the class that caused the exception was found in common.jar, loaded, and was successfully called by the servlet. Problem is, the class that is not found does indeed exist, and is found in common.jar. I have tried the war file with and without a manifest. My understanding is that if the jars are located in WEB-INF/lib, then no manifest is required. This is indeed the case under Tomcat. At this point, I am stumped. Any ideas?
Anticipating that very issue, I did this test without deploying the ejb-jar on the server - to isolate just the .WAR issues. There are no EJBs in this instance. This has the appearance of WLS classloaders not functioning correctly if no parent EAR classloader exists.
New information: the problem is related to loading a properties file from a jar using resource input stream facilities of class loader. The jar containing the resource file exists, and sits alongside the other application class file jars in WEB-INF/lib. A static initializaer in a superclass of a servlet references a resource, hence the failure on load. The same structure works under JBoss, so it has to be a class loader difference between JBoss and WebLogic. Can anyone illuminate? Is there something special that has to be done to get WebLogic to find and load resources out of jar in WEB-INF/lib in a WAR?
Can you shoot lasers out of your eyes? Don't look at this tiny ad: