Sorry I confused things. We had to do this to get our app to load. In
this case it's deployed as an .ear with a .war packed inside (EJB's for
the Model layer) and using Struts 1.1.
What I believe is happening is that without the setting we get
NoClassDefFoundError because the JBoss tries to load Digester from
somewhere other than Struts and then can't parse struts-config.xml.
These three errors get logged one after the other:
2005-01-20 16:12:05,289 ERROR [org.apache.commons.digester.Digester]
Begin event threw exception
java.lang.reflect.InvocationTargetException
...
Caused by: java.lang.NoClassDefFoundError:
org/apache/struts/action/ActionForm
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:537)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
at java.net.URLClassLoader.access$100(URLClassLoader.java:55)
at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at
org.jboss.mx.loading.UnifiedClassLoader.findClass(UnifiedClassLoader.jav
a:388)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at
org.jboss.mx.loading.UnifiedClassLoader.loadClassLocally(UnifiedClassLoa
der.java:229)
at
org.jboss.mx.loading.UnifiedLoaderRepository3.loadClassFromClassLoader(U
nifiedLoaderRepository3.java:217)
at org.jboss.mx.loading.LoadMgr.beginLoadTask(LoadMgr.java:130)
at
org.jboss.mx.loading.UnifiedClassLoader3.loadClass(UnifiedClassLoader3.j
ava:161)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at
java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:575)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1392)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader
.java:1289)
at
org.apache.struts.config.FormBeanConfig.formBeanClass(FormBeanConfig.jav
a:320)
at
org.apache.struts.config.FormBeanConfig.setType(FormBeanConfig.java:191)
86 more
...
2005-01-20 16:12:05,914 ERROR [org.apache.struts.action.ActionServlet]
Parsing error processing resource path
java.lang.reflect.InvocationTargetException
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:23
83)
at
org.apache.commons.digester.Digester.createSAXException(Digester.java:24
09)
at
org.apache.commons.digester.Digester.startElement(Digester.java:1271)
...
2005-01-20 16:12:06,321 ERROR [org.jboss.web.localhost.Engine]
StandardContext[]: Servlet threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource
path
at
org.apache.struts.action.ActionServlet.handleConfigException(ActionServl
et.java:1033)
...
Greg
-----Original Message-----
From: Pavel Kolesnikov [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 20, 2005 4:04 PM
To: Struts Users Mailing List
Subject: Re: installing Struts on JBoss
Greg,
could you please explain this a bit more? I'm curious about it, because
I'm running multiple Struts based application on JBoss without
this setting and I've never encountered any problems with
mysterious ServletExceptions.
BWT I've just tried to deploy struts-examples on a vanilla JBoss 4.0.1
installation and everything works OK.
Pavel
On Thu, 20 Jan 2005 15:02:46 -0600, Greg Dunn <[EMAIL PROTECTED]> wrote:
For Struts apps on Jboss you need to make sure you set the
'Java2ClassLoadingCompliance' flag to "false" indicating the servlet
2.3
web container first model should be used over the normal Java2 parent
first class loading model.
<attribute name="Java2ClassLoadingCompliance">false</attribute>
In Jboss 4.x this is in the file
.../deploy/jbossweb-tomcat50.sar/META-INF/jboss-service.xml
In Jboss 3.x it's in the file 'tomcat41-service.xml' in .../deploy
Greg
-----Original Message-----
From: Alex Kravets [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 20, 2005 2:22 PM
To: Struts Users Mailing List
Subject: installing Struts on JBoss
Are there any special requirements to install and run Struts
applications on JBoss? I istalled JBoss on Tomcat and have been able
to
run Struts applications w/o any problems. Same application on JBoss
gives me Servlet Exception.
I would try mailing lists/forums for JBoss, but I find them not
especially active.
thanks,
Alex
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]