You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ivan Cheung <iv...@pobox.com> on 2008/04/25 05:02:01 UTC
custom JDBCRealm in Tomcat 5.5
Hi,
I have trying to do some custom authentication
I have written myRealm to extend JDBCRealm
modify server.xml
<Realm className="MyRealm"
add the jar file that contsin MyRealm in tomcat's server/lib directory
The only problem is tomcat won't start
it keep throwing this exception
usage: java org.apache.catalina.startup.Catalina [ -config {pathname} ] [
-nonaming ] { start | stop }
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:585)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
Caused by: java.lang.NoClassDefFoundError:
org/apache/catalina/realm/JDBCRealm
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
I am not using org/apache/catalina/realm/JDBCRealm why would it throw that ?
I have seen people suggest writing a mbeans-descriptors.xml file and put it
under
server/classes/org/apache/catalina/mbeans/ , there was not much instruction
but I tried it anyway with same error.
Does anyone know how to properly configure tomcat to use my custom
JDBCRealm?
Thanks,
Ivan