Before answering your question, two things:
- This is a user question, please use the tomcat-user list,
this list is for development of Tomcat.
- Don't send HTML mails to the list.
Now regarding your problem, this is probably the typical
classloader problem so many run into.
If the code which is instantiating the class was loaded
using the classpath classloader it won't be able to access
jar files in the WEB-INF/lib folder. For more info on the
hierarchy of class loader see Java documentation and
browse through the tomcat-dev list archives.
You have to make sure that none of the classes you are
putting into WEB-INF/lib is also in the lib folder
of Tomcat, because that classloader has higher priority
resulting in the wrong class being loaded.
Also make sure none of the classes is in the lib/ext
folder of the virtual machine, since that one has even
higher priority over the other classloaders.
Also make sure that none of the classes in the Tomcat
lib folder is being used to instantiate the classes
you need (that is a class in the Tomcat lib folder
is invoked to create an object who's class type is
in the WEB-INF/lib folder; it won't find it).
I hope this is clear enough.
As far as I can see from the discussion on this list
this will be mostly fixed in the 3.3 version of Tomcat
by having a special isolated classloader for the servlet
engine, and this problem should also be non-existent
in Catalina (4.0) for the same reason.
Gummi Haf
-----Original Message-----
From: Hawkins, Keith (Keith) [mailto:[EMAIL PROTECTED]]
Sent: 9. maí 2001 19:10
To: [EMAIL PROTECTED]
Subject: RE: FW: Any known issues with Tomcat 3.2.1 and class loading ?
No, they are not .zip files. They are .jar files. Specifically
jndi.jar, ldap.jar and providerutil.jar, which are provided by
Sun for accessing LDAP databases via JNDI. I was able to
get the Tomcat to load these classes but only by editing the
wrapper.class_path property in the wrapper.properties config file.
But I was under the impression that simply putting the Sun jar
files in the WEB-INF/lib directory along with my servlet.jar file
would be sufficient and eliminate the need to edit wrapper.properties.
Am I off base here? Is there some limitation to having more than one
jar file in WEB-INF/lib?
-Keith
-----Original Message-----
From: Kellie Miller [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 09, 2001 2:15 PM
To: [EMAIL PROTECTED]
Subject: Re: FW: Any known issues with Tomcat 3.2.1 and class loading ?
I have had some success with renaming .zip files .jar (your mileage may
vary).
cheers,
Kellie
>-----Original Message-----
>From: Wildeboer, Tonnis [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 09, 2001 12:05 PM
>To: '[EMAIL PROTECTED]'
>Subject: RE: Any known issues with Tomcat 3.2.1 and class loading ?
>
>If they are .zip files you'll have to add them to the CLASSPATH yourself.
>
>--Tonnis
>-----Original Message-----
>From: Hawkins, Keith (Keith) [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 09, 2001 8:24 AM
>To: [EMAIL PROTECTED]
>Subject: Any known issues with Tomcat 3.2.1 and class loading ?
>
>
>Dear Developers:
>
>Are there any known issues with class loading under Tomcat 3.2.1?
>
>My situation is that classes in jar files that reside in the WEB-INF/lib
>directory for my servlet fail to load when accessed under Tomcat. Yet
the
>classes load fine when accessed via test programs that use the very same
>jar files and call the same servlet methods.
>
>Seems like Tomcat is not working as advertised with respect to
>automatically adding jar files from <servletdir>/WEB-INF/lib to the
classpath.
>
>Can anyone confirm whether this is a known issue?
>
>Thanks,
>Keith
Kellie Miller, Advanced Computing Technologist
Boeing PhantomWorks, Math & Computing Technology, Huntsville Center
Email: [EMAIL PROTECTED] Phone: 256-461-2604 Fax: 256-461-3239
Post: PO Box 240002, MC JW-75, Huntsville, AL 35824-6402
winmail.dat