My team is in the process of porting our app from JBoss 3.2.5 to JBoss 4.0.5. One of the
things that has been biting us is the difference in the class loader.
As part of this move, we are trying to stay away from the old "Unified" class
loader. As such, we are trying to deploy out application as a set of EAR files,
encapsulating the main function(s) and exposing them via a combination of Spring, Web
Services, etc.
This leads me to my current problem. I have a simple EAR, consisting of only one WAR in
the EAR's lib dir and an application.xml specifying that war and giving it a context.
So far so good.
The WAR is a Struts-based application. In its lib dir are a bunch of JARs, basically all
the libs needed. Included in this list are struts-core.jar, struts-tiles.jar, and
struts-extras.jar.
When I deploy this EAR file, everything deploys fine, but as soon as I access the main
page:
java.lang.NoClassDefFoundError: org/apache/struts/actions/DispatchAction
| at java.lang.ClassLoader.defineClass1(Native Method)
| at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
| at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
| at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
| at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
| at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
I don't understand it! I thought that when JBoss deployed the WAR, it was supposed to
add the WAR's lib dir to the hierarchical classpath. Why is it then that
DispatchAction is not found, when it is sitting inside the WAR's lib folder?
I am confused. Can someone please set me on the right path here? I really want to try
and get a good grasp on this class loader stuff.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3984598#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...