Hello Christopher,

> Von: "Christopher Piggott" <[EMAIL PROTECTED]>
> QUESTION: looking at the little diagram in the Tomcat 5.5 Class Loader
> HOW-TO, when I do the above (Class.forName) I am using the Webapp class
> loader, correct?
Yes.

> The handler classes are all in handlers.jar which is in
> $CATALINA_BASE/shared/lib.  The actual exception that I get is:
> 
>       2006-04-28 17:05:55 StandardWrapperValve[xdb]: Servlet.service() 
> for
> servlet xdb threw exception
>       java.lang.NoClassDefFoundError: 
> org/something/DatabaseRequestHandler
>
> Trouble is: the interface .class file is right there in
> WEB-INF/classes/com/something/DatabaseRequestHandler.class just like it 
> should be.  So, I am
> stumped why the class loader would be able to find the handler class in
> $CATALINA_BASE/shared/lib but NOT the interface that it implements which 
> is in
> WEB-INF/classes.
> 
This looks very similiar to problems with Jakarta Commons Logging, caused by
wrong position of the different JCL jars.
It is generally not a good idea to share JARs. This should just be done if
they require it (i.E. some JDBC drivers).

For JCL there is a lot of material about the special issues with wrong
positions, i.E.
http://wiki.apache.org/jakarta-commons/Commons_Logging_FUD

Try to put everything you need under WEB-INF/lib, even if it means to copy
the shared JARs into different webapps.
Please post the result.

Regards
Boris


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to