I've made some progress on this issue.
By adding logging for the WebappClassLoader, I am able to see where the failure is.
Depending on which JARs I'm missing, the errors are more or less obvious - here is an
obvious one, where commons-beanutils is missing:
| 2009-03-25 11:09:33,033 DEBUG [org.apache.catalina.loader.WebappClassLoader] Could not
clean fields for class org.apache.commons.digester.SetPropertyRule
| java.lang.NoClassDefFoundError: org/apache/commons/beanutils/DynaProperty
|
Other not-so-obvious errors look like the log snippet below. The first four lines of this
output show that it's trying to load a class from the missing commons-digester JAR.
It fails to find the class and delegates to java.net.FactoryURLClassLoader. Now, there
are other classes that the container provides that show the exact same text as this, so
unless one knows that commons-digester is not included with the container, the error
won't stand out to them.
I added DEBUG logging for java.net.FactoryURLClassLoader to see if I could follow the
problem a bit more, but nothing showed up in my logs for this class.
As a side-note, I couldn't help but notice the lines following those four - the ones
about log4j. They seem unrelated, but these lines only show up in a few places, and one
of those places happens to be after an attempt to load a class that doesn't exist
(coincidence?). For now I'm going to assume it has no relationship with the problem.
| 11:14:38,258 DEBUG [org.apache.catalina.loader.WebappClassLoader]
loadClass(org.apache.commons.digester.Digester, false)
| 11:14:38,261 DEBUG [org.apache.catalina.loader.WebappClassLoader] Searching local
repositories
| 11:14:38,264 DEBUG [org.apache.catalina.loader.WebappClassLoader]
findClass(org.apache.commons.digester.Digester)
| 11:14:38,266 DEBUG [org.apache.catalina.loader.WebappClassLoader] Delegating to
parent classloader at end: java.net.FactoryURLClassLoader@1b2601c
| 11:14:38,275 DEBUG [org.apache.catalina.loader.WebappClassLoader] Not setting field
logger to null in object of class org.apache.commons.logging.impl.Log4JLogger because the
referenced object was of type org.apache.log4j.Logger which was not loaded by this
WebappClassLoader.
| 11:14:38,279 DEBUG [org.apache.catalina.loader.WebappClassLoader] Not setting field
name to null in object of class org.apache.commons.logging.impl.Log4JLogger because the
referenced object was of type java.lang.String which was not loaded by this
WebappClassLoader.
| 11:14:38,282 DEBUG [org.apache.catalina.loader.WebappClassLoader] Not setting field
logger to null in object of class org.apache.commons.logging.impl.Log4JLogger because the
referenced object was of type org.apache.log4j.Logger which was not loaded by this
WebappClassLoader.
| 11:14:38,286 DEBUG [org.apache.catalina.loader.WebappClassLoader] Not setting field
name to null in object of class org.apache.commons.logging.impl.Log4JLogger because the
referenced object was of type java.lang.String which was not loaded by this
WebappClassLoader.
| 11:14:38,291 DEBUG [org.apache.catalina.loader.WebappClassLoader] Not setting field
logger to null in object of class org.apache.commons.logging.impl.Log4JLogger because the
referenced object was of type org.apache.log4j.Logger which was not loaded by this
WebappClassLoader.
| 11:14:38,296 DEBUG [org.apache.catalina.loader.WebappClassLoader] Not setting field
name to null in object of class org.apache.commons.logging.impl.Log4JLogger because the
referenced object was of type java.lang.String which was not loaded by this
WebappClassLoader.
|
If anyone has any more insight into debugging web deployment issues, please add them!
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221059#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...