Rob Gregory wrote:
Obvious question but have you tried placing your required jar in
common/endorsed?
Regards
Rob
I tried that, (leaving a copy of the jar in some of the directories to
be sure it was available), but the server would exit writing to stderr.log:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
Caused by: java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
at java.lang.ClassLoader.findBootstrapClass(Native Method)
at java.lang.ClassLoader.findBootstrapClass0(ClassLoader.java:727)
at java.lang.ClassLoader.loadClass(ClassLoader.java:284)
at java.lang.ClassLoader.loadClass(ClassLoader.java:282)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1255)
at
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
at
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:978)
.........
ken
-----Original Message-----
From: Ken Johanson [mailto:[EMAIL PROTECTED]
Sent: 16 January 2006 22:59
To: Tomcat Users List
Subject: Classloaders for 'shared' and 'common' cannot load class-data from
server?
Hello,
I'm building some utility wrappers for Tomcat (using 5.0.30 in this
case). Since they need to be accessed by all webapps, I'm placing their
jars in shared/lib (I also even tried common/lib to resolve the problem
below).
These jars reference classes in org.apache.catalina.* ('ServerFactory'
and 'Realm' among others).
When I exec call the methods from JSPs (for example), I get a
NoClassDefFoundError: org/apache/catalina/ServerFactory..
I *was* originally able to execute the same code that's now contained in
the shared/lib jars, from directly inside JSPs, using the prescribed
'privileged=true' Server/Service/Engine/Host/Context attribute...
however it's the classloader for shared/lib jars thats seems to need a
similar 'privileged' attribute..
Should I place this same (or another attrib) in some other web.xml
element? Or is there another lib directory I should use?
Thanks in advance,
ken
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]