It's because Struts and JBoss don't play well together.  They will for a
while... until you really don't expect it, and you will spend a couple of
days flossing the plaque from your configuration while trying to get it
working again.  Struts and JBoss are two of the dozen or so "must haves"...
so they ought to be pretty robust together if you ask me.

If I had the knowledge to fix this problem, I would take a crack at it.  GAWD
I WOULD LOVE TO FIX THIS!!!  I think the only way it will get fixed is if
Scott and Craig were locked in a conference room until the problem was
solved.  There might be people that can fix it besides these two, but the
solution undoubtedly is steeped in both architecture and politics, and these
two are the only two that I can think of that have the noodle to make it
happen and the "power of one" to lay down the new unified law of the
landscape.

Struts depends on a lot of libraries and is quite precise about it's
specification of a class loader.  I don't understand it all, but I gather
that this precision makes it more portable in general.  But I wonder whether
Struts would work better under JBoss if it were more sloppy (using
class.forName() instead of ClassLoader.loadClass() for instance...)  JBoss,
for all it's glory, tries to make all class loaders in a VM look like the
same one, but they show their colors under very specific circumstances.  

Okay, I'm frustrated because I've burned up the last 24 hours on this.  I
guess I'm doing better than last time where it took something like a week to
muddle through the problem.  So I'll quit bitching now and tell you what I
know.  Maybe it will help, hopefully others can add more.  My issue has to do
with getting a class in WEB-INF/classes to be found by the validator in a
call to getMethod....

I presume you are running on JBoss because you are using EJBs.  It's easy for
your classes and libraries to get co-mingled between the ejb.jar and web.war
as a part of your build.  Don't allow that.  Go through and purge from each
what is not necessary in the other.  For instance, get all your entity
classes out of the web.war... strictly "interfaces only" over there.  Same is
true for your web classes.  They don't belong in the ejb container, get them
out of there.  Make absolutely sure that all the libraries that you are using
are of the same version.  A good way to find them is to do a file system
search in both JBoss' temp directory and the Catalina temp directory to see
if the jars are exactly the same version.  If they are not necessary on one
or the other side, remove them as appropriate.  

JBoss tries to be smart with sharing your jars within a VM, but JBoss seems
all to happy to let an app be very specific about where a jar comes from, and
when it does, it seems to cut off all the other linkages to the other
libraries in the transitive closure of the load chain.  Again, I don't
understand it all, and generally call in a witch doctor with a rooster and
two chickens for a sacrifice over the keyboard.  After praising Chairman Bill
and Lou Cipher as soulmates and a dab of sacred balm on the forehead, things
start to work again, but only if the moon is just right.  It's all about this
scientific, so have fun.

I bet you can solve the problem with these tricks.  When trying to reproduce
a problem though, always blow away your temp directories with each iteration
or you are asking for enhanced humiliation and pain.  I know that is
precisely what you don't want to do, but because it works when you do that
and does not when you don't that the problem is in the load order of the
libraries being different from load-to-load and two libraries are in the path
that are different versions.  They won't even look like they are relevant,
but clean them up anyway, they could be on the transitive closure of the
runtime link.

hth,

-b

-----Original Message-----
From: Matthew Van Horn [mailto:[EMAIL PROTECTED]
Sent: Tuesday, March 04, 2003 12:09 AM
To: Struts Users Mailing List; [EMAIL PROTECTED]
Subject: need help with struts error


I get the following error whenever I deploy an .ear file, but if I just  
stop and start JBoss the file is picked up and deploys fine.
If I then touch the file, I get the error again. What gives?
The best I can find with google is that it may have something to do  
with the DTD going missing, or another parser being there, but neither  
of those seems to be the case.

17:02:59,730 ERROR [ActionServlet] Parsing error processing resource  
path /WEB-INF/struts-config.xml
java.lang.LinkageError: loader constraints violated when linking  
org/apache/commons/digester/ObjectCreationFactory class
         at  
org.apache.struts.config.ConfigRuleSet.addRuleInstances(ConfigRuleSet.ja 
va:121)
         at  
org.apache.commons.digester.Digester.addRuleSet(Digester.java:1610)
         at  
org.apache.struts.action.ActionServlet.initConfigDigester(ActionServlet. 
java:1211)
         at  
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.ja 
va:923)
         at  
org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)
         at javax.servlet.GenericServlet.init(GenericServlet.java:256)
         at  
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav 
a:924)
         at  
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
         at  
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j 
ava:3341)
         at  
org.apache.catalina.core.StandardContext.start(StandardContext.java:3534 
)
         at  
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja 
va:821)
         at  
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
         at  
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
         at  
org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(Embedd 
edCatalinaService41.java:432)
         at  
org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(EmbeddedC 
atalinaService41.java:306)
         at  
org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:300)
         at  
org.jboss.deployment.MainDeployer.start(MainDeployer.java:807)
         at  
org.jboss.deployment.MainDeployer.start(MainDeployer.java:799)
         at  
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
         at  
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
         at java.lang.reflect.Method.invoke(Native Method)
         at  
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDi 
spatcher.java:284)
         at  
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
         at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
         at $Proxy4.deploy(Unknown Source)
         at  
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentSc 
anner.java:435)
         at  
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScan 
ner.java:561)
         at  
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doS 
can(AbstractDeploymentScanner.java:212)
         at  
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loo 
p(AbstractDeploymentScanner.java:225)
         at  
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run 
(AbstractDeploymentScanner.java:202)
17:03:00,005 INFO  [Engine] StandardWrapper[/atjweb:action]: Marking  
servlet action as unavailable
17:03:00,039 ERROR [Engine] StandardContext[/atjweb]: Servlet /atjweb  
threw load() exception
javax.servlet.UnavailableException: Parsing error processing resource  
path /WEB-INF/struts-config.xml
         at  
org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.ja 
va:952)
         at  
org.apache.struts.action.ActionServlet.init(ActionServlet.java:468)
         at javax.servlet.GenericServlet.init(GenericServlet.java:256)
         at  
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.jav 
a:924)
         at  
org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:813)
         at  
org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.j 
ava:3341)
         at  
org.apache.catalina.core.StandardContext.start(StandardContext.java:3534 
)
         at  
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.ja 
va:821)
         at  
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
         at  
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)
         at  
org.jboss.web.catalina.EmbeddedCatalinaService41.createWebContext(Embedd 
edCatalinaService41.java:432)
         at  
org.jboss.web.catalina.EmbeddedCatalinaService41.performDeploy(EmbeddedC 
atalinaService41.java:306)
         at  
org.jboss.web.AbstractWebContainer.start(AbstractWebContainer.java:300)
         at  
org.jboss.deployment.MainDeployer.start(MainDeployer.java:807)
         at  
org.jboss.deployment.MainDeployer.start(MainDeployer.java:799)
         at  
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:621)
         at  
org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:585)
         at java.lang.reflect.Method.invoke(Native Method)
         at  
org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBeanDi 
spatcher.java:284)
         at  
org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
         at org.jboss.util.jmx.MBeanProxy.invoke(MBeanProxy.java:174)
         at $Proxy4.deploy(Unknown Source)
         at  
org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentSc 
anner.java:435)
         at  
org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScan 
ner.java:561)
         at  
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doS 
can(AbstractDeploymentScanner.java:212)
         at  
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loo 
p(AbstractDeploymentScanner.java:225)
         at  
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run 
(AbstractDeploymentScanner.java:202)


---------------------------------------------------------------------
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]

Reply via email to