You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Renato Romano <r....@set-network.com> on 2004/01/28 10:06:48 UTC

Multiple WAR ClassLoader problem

Hi all,
I'm developing a J2EE app inside Jboss/Tomcat 4.1.27 and I have two wars
in my application archive, both using external libraries (struts,
commons.* ...), both including these jars in their respective
WEB-INF/lib directory. It seems to me that this is causing prblems to
JBoss (or Tomcat, or struts!!!) because I get an "Error createing bean
of class klazz" with a ClassNotFoundException error. 

Searching on the net for a similar problem, I found (If I understood
well) that the prblem is the mechanism used by struts to instantiate the
ActionForm, that is using Class.forName instead of
Thread.currentThread().getContextXlassLoader(). By then why the Action
object instead is correcttly instantiated ? And if so what class/what
method should I override to change this behavior ?

Any help is VERY appreciated. 
Renato

____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: r.romano@set-network.com
Tel.:   010 2712603
_____________________________________




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Multiple WAR ClassLoader problem

Posted by Brad Balmer <bb...@peapod.com>.
I believe I had this same problem.

Take a look at your jboss-service.xml in your jbossweb-tomcat SAR (under 
META-INF).

I had to change the following line (towards the top):

<attribute name="UseJBossWebLoader">false</attribute>

By default I believe JBoss sets this to true.  It says whether to use 
the JBoss classloader over the Tomcat classloader.



Renato Romano wrote:

>Hi all,
>I'm developing a J2EE app inside Jboss/Tomcat 4.1.27 and I have two wars
>in my application archive, both using external libraries (struts,
>commons.* ...), both including these jars in their respective
>WEB-INF/lib directory. It seems to me that this is causing prblems to
>JBoss (or Tomcat, or struts!!!) because I get an "Error createing bean
>of class klazz" with a ClassNotFoundException error. 
>
>Searching on the net for a similar problem, I found (If I understood
>well) that the prblem is the mechanism used by struts to instantiate the
>ActionForm, that is using Class.forName instead of
>Thread.currentThread().getContextXlassLoader(). By then why the Action
>object instead is correcttly instantiated ? And if so what class/what
>method should I override to change this behavior ?
>
>Any help is VERY appreciated. 
>Renato
>
>____________________________________
>Renato Romano
>Sistemi e Telematica S.p.A.
>Calata Grazie - Vial Al Molo Giano
>16127 - GENOVA
>
>e-mail: r.romano@set-network.com
>Tel.:   010 2712603
>_____________________________________
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: struts-user-help@jakarta.apache.org
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org