It's sparsely documented (and AFAIK only at all for > 4.1.18), but it comes
up on this list like clockwork ;-).  You need to do a better search on the
archives.

You need to create an mbeans-descriptors.xml file (in your case, just copy
the JDBCRealm stuff and change the name), usually in the same package as
your Realm, and package it in the same jar file as your Realm.  Then set the
'descriptors' attribute on the ServerLifeCycleListener to point to your
mbeans-descriptors.xml.  e.g. :
<Listener className="org.apache.catalina.mbeans.ServerLifeCycleListener"
       descriptors="/com/myfirm/mypackage/realm/mbeams-descriptors.xml" />

"G. Wade Johnson" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> I am working on a Tomcat-based server (4.1.18). I've checked the
> list archive without a match.
>
> The particular application required an authentication model that was
> close-to but not quite the same as JDBCRealm.
>
> I wrote a new class that extends JDBCRealm to add the needed behavior.
> When I restart the Tomcat server, I get the following exception:
>
> ServerLifecycleListener: createMBeans: MBeanException
> java.lang.Exception: ManagedBean is not found with CryptJDBCRealm
>         at
> org.apache.catalina.mbeans.MBeanUtils.createMBean(MBeanUtils.java:614)
>         at
>
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:574)
>         at
>
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:783)
>         at
>
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:751)
>         at
>
org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(ServerLifecy
cleListener.java:339)
>         at
>
org.apache.catalina.mbeans.ServerLifecycleListener.lifecycleEvent(ServerLife
cycleListener.java:206)
>         at
>
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSuppor
t.java:166)
>         at
> org.apache.catalina.core.StandardServer.start(StandardServer.java:2182)
>         at org.apache.catalina.startup.Catalina.start(Catalina.java:512)
>         at
> org.apache.catalina.startup.Catalina.execute(Catalina.java:400)
>         at
> org.apache.catalina.startup.Catalina.process(Catalina.java:180)
>         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.main(Bootstrap.java:203)
>
> The code is called. It does function. My class basically overrides the
> method
>
>     public synchronized Principal authenticate(Connection dbConnection,
>                                                String username,
>                                                String credentials);
>
> There are no other methods in the class.
>
> Any thoughts,
> G. Wade




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to