I found the problem. I was trying to instantiate a class that was located in a jar in common/lib, however this class was implementing an interface located in a jar in WEB-INF/lib, and thus the signature could not be found :-(
[EMAIL PROTECTED] wrote: > Hi, > > I've a webapp which contains has some jar files located in WEB-INF/lib. > > One of this jar file contains a class that is using class.forname > method to instantiate another class located in the same jar file. > > Unfortunately, this gives me a java.lang.NoClassDefFoundError. > > As I read that previous versions had problem loading jar files located > under WEB-INF/lib, I upgraded to version 4.0.4b1, but the problem was > still there. > > So I added some code to print which classloader this class was using > when trying to instantiate and the result is as follow: > WebappClassLoader^M > available:^M > delegate: false^M > repositories:^M > /WEB-INF/classes/^M > required:^M > ----------> Parent Classloader:^M > StandardClassLoader^M > available:^M > delegate: true^M > repositories:^M > file:/home/cartaljp/Dev/Tomcat4.0/jakarta-tomcat-4.0.4-b1/classes/^M > > file:/home/cartaljp/Dev/Tomcat4.0/jakarta-tomcat-4.0.4-b1/lib/naming-factory.jar^M > > > file:/home/cartaljp/Dev/Tomcat4.0/jakarta-tomcat-4.0.4-b1/lib/jasper-compiler.jar^M > > > file:/home/cartaljp/Dev/Tomcat4.0/jakarta-tomcat-4.0.4-b1/lib/jasper-runtime.jar^M > > required:^M > ----------> Parent Classloader:^M > StandardClassLoader^M > available:^M > Extension[javax.mail, implementationVendor=Sun Microsystems, Inc., > implementationVendorId=com.sun, implementationVersion=1.2, > specificationVendor=Sun Microsystems, Inc., specificationVersion=1.2]^M > delegate: true^M > repositories:^M > .... > > From what I understand, the webappclassloader does not take into > account all jar files located under WEB-INF/lib, hence the > NoClassDefFoundError. > > I'm doing something wrong or is it a problem with the classloader ? > > > > -- > To unsubscribe: <mailto:[EMAIL PROTECTED]> > For additional commands: <mailto:[EMAIL PROTECTED]> > Troubles with the list: <mailto:[EMAIL PROTECTED]> > > -- To unsubscribe: <mailto:[EMAIL PROTECTED]> For additional commands: <mailto:[EMAIL PROTECTED]> Troubles with the list: <mailto:[EMAIL PROTECTED]>
