Did you insert the jar's name in your classpath? Try specify the complete local of the jar in your classpath, sample: c:\someplace\...\name.jar.

Edson


Ron Reynolds wrote:

you can't modify a classloader's class-finding mechanism internally without 
creating a new classloader and using it to
load your new class.  very weird that the WEB-INF/lib approach didn't work (oh, 
you didn't bounce the tomcat instance,
huh?  if you did it'd pick it up right away, right?).  tomcat scans that 
directory for all jars only on startup and
once the list is loaded it's basically carved in stone.  you might be able to 
put the class in your WEB-INF/classes
directory, but that'll only work once since once the class is loaded it's cached in the ClassLoader that loaded it. if you do this seldom consider the bounce-the-server approach. if you do it often (hot-swapping classes while the
server is up) you'll have to get fancier, but it should still be possible 
(similar to the way servlets or
jsp-generated-servlets are reloaded based on file change times).  let me know 
if you want more details on getting
crazy with ClassLoaders...

heh... I just read my own message, allow me to clarify:

I have a java application deployed on my axis server (the wsdd method,
not the jws method) and the application depends on an outside jar file.
I've tried putting the jar file in the WEB-INF/lib directory but
AxisServlet didn't seem to find it (there is a java.lang.NoClassDefFound
error in my catalina.out log).

How can I specify to axis or to tomcat where to find classes it needs to
run my applications?

On Thu, 2005-10-27 at 14:10 -0600, Daniel Miles wrote:
I have a java application that depends on some classes in a jar file.
Can I specify a classpath so that the VM can find it?




Reply via email to