tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <wbar...@wilshire.com>
Subject Re: Custom Authenticator Problems with MBean
Date Fri, 18 Apr 2003 02:59:12 GMT
For option 3, you don't have to modify the file in catalina.jar.  You can
create your own "mbean-descriptor.xml" file, and package it in the jar with
your Authenticator.  Then in server.xml add the attribute:
   descriptors="/com/myfirm/mypackage/mbean-descriptor.xml"
to the ServerLifecycleListener.  Of course, modify the value so that it
points to where you packaged the file.

The advantage of this is that you don't have to re-edit catalina.jar
everytime you upgrade Tomcat.

"Mark R. Diggory" <mdiggory@latte.harvard.edu> wrote in message
news:3E9F0CE7.80806@latte.harvard.edu...
> Cool, thanks for all the great detail. Its nice to know how "fatal" it
> really is (or isn't in this case). I found that my Authenticator wasn't
> working because of a minor misconfiguration wiht my realm in my
> server.xml file.
>
> thanks for the help,
> Mark
>
>
>
> Liem Do wrote:
>
> >I've had the same problem when implementing a custom Realm. The error is
> >coming from the MBeanServer trying to create a managed bean for your
custom
> >authenticator. There are a couple of things I've noticed when doing this.
> >
> >1. It didn't affect the function of my custom realm as long as I was
using
> >MBeans to manage the realm. Although the errors during startup were
> >annoying.
> >2. You can eliminate the errors by turning off the Lifecycle Listener in
> >conf/server.xml, but this breaks the admin app or any apps using jmx.
> >3. add an mbean entry for your custom Authenticator in the
> >mbeans-descriptors.xml file located in server/lib/catalina.jar file. You
can
> >look at the entries for the FormAuthenticator mbean as an example.
> >
> >hth,
> >LD
> >
> >----- Original Message -----
> >From: "Mark R. Diggory" <mdiggory@latte.harvard.edu>
> >To: "Tomcat Users List" <tomcat-user@jakarta.apache.org>
> >Sent: Thursday, April 17, 2003 12:34 PM
> >Subject: Custom Authenticator Problems with MBean
> >
> >
> >
> >
> >>I've been trying to write a Custom Authenticator for my server. I've
> >>done the following things and am getting the following error, any
> >>suggestions would help greatly.
> >>
> >>1.) I've got my VDCFormAuthenticator in a jar available in
> >>
> >>/var/tomcat4/server/lib/...
> >>
> >>2.) I've got a customized Authenticators.properties with my
> >>Authenticator added to it in
> >>
> >>
> >>
> >>
>
>/var/tomcat4/server/classes/org/apache/catalina/startup/Authenticators.prop
e
> >rties
> >
> >
> >>3.) I've added the following Login Config to my webapplication
> >>
> >><login-config>
> >><auth-method>VDC</auth-method>
> >><realm-name>Local Form-Based Authentication Area</realm-name>
> >><form-login-config>
> >><form-login-page>/Authority/Choose.jsp</form-login-page>
> >><form-error-page>/Error/ErrorPage.jsp</form-error-page>
> >></form-login-config>
> >></login-config>
> >>
> >>4.) I get the following error on startup, I'm not sure if this is
> >>stopping the Authenticator from working properly
> >>
> >>ServerLifecycleListener: processContainerAddChild: MBeanException
> >>java.lang.Exception: ManagedBean is not found with VDCFormAuthenticator
> >>    at org.apache.catalina.mbeans.MBeanUtils.createMBean(Unknown Source)
> >>    at
> >>org.apache.catalina.mbeans.ServerLifecycleListener.createMBeans(Unknown
> >>Source)
> >>    at
> >>
> >>
> >>
>
>org.apache.catalina.mbeans.ServerLifecycleListener.processContainerAddChild
(
> >Unknown
> >
> >
> >>Source)
> >>    at
>
>>org.apache.catalina.mbeans.ServerLifecycleListener.containerEvent(Unknown
> >>Source)
> >>    at org.apache.catalina.core.ContainerBase.fireContainerEvent(Unknown
> >>Source)
> >>    at org.apache.catalina.core.ContainerBase.addChildInternal(Unknown
> >>Source)
> >>    at org.apache.catalina.core.ContainerBase.addChild(Unknown Source)
> >>    at org.apache.catalina.core.StandardHost.addChild(Unknown Source)
> >>    at org.apache.catalina.core.StandardHostDeployer.install(Unknown
> >>
> >>
> >Source)
> >
> >
> >>    at org.apache.catalina.core.StandardHost.install(Unknown Source)
> >>    at org.apache.catalina.startup.HostConfig.deployDirectories(Unknown
> >>Source)
> >>    at org.apache.catalina.startup.HostConfig.deployApps(Unknown Source)
> >>    at org.apache.catalina.startup.HostConfig.start(Unknown Source)
> >>    at org.apache.catalina.startup.HostConfig.lifecycleEvent(Unknown
> >>
> >>
> >Source)
> >
> >
> >>    at
> >>org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Unknown
> >>
> >>
> >Source)
> >
> >
> >>    at org.apache.catalina.core.ContainerBase.start(Unknown Source)
> >>    at org.apache.catalina.core.StandardHost.start(Unknown Source)
> >>    at org.apache.catalina.core.ContainerBase.start(Unknown Source)
> >>    at org.apache.catalina.core.StandardEngine.start(Unknown Source)
> >>    at org.apache.catalina.core.StandardService.start(Unknown Source)
> >>    at org.apache.catalina.core.StandardServer.start(Unknown Source)
> >>    at org.apache.catalina.startup.Catalina.start(Unknown Source)
> >>    at org.apache.catalina.startup.Catalina.execute(Unknown Source)
> >>    at org.apache.catalina.startup.Catalina.process(Unknown Source)
> >>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> >>    at
> >>
> >>
> >>
>
>sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:3
9
> >)
> >
> >
> >>    at
> >>
> >>
> >>
>
>sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
l
> >.java:25)
> >
> >
> >>    at java.lang.reflect.Method.invoke(Method.java:324)
> >>    at org.apache.catalina.startup.Bootstrap.main(Unknown Source
> >>
> >>
> >>I can't figure out why this exception occures, does anyone have any
ideas?
> >>
> >>-Mark Diggory
> >>
> >>
> >>---------------------------------------------------------------------
> >>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >>
> >>
> >>
> >>
> >
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> >




---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message