You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Bongiorno.Christian" <Bo...@ensco.com> on 2001/12/18 15:51:16 UTC

RE: ClassCastException, custom Realm, and ClassLoading Repost... this is bugging me.

Help?


We have a custom realm written. Works great until I try to downcast the principal returned from an authentication so that I can call a specific method. Upon investigation (everyone knows this, I know) the error is due to the fact that TC has multiple class loaders and this particular class was loaded from 2 places. I read the class-loader-howto.html that explains the hierarchy. So, I go to put the Jar containing my realm and my subclass of java.security.Principal into the lib directory and I get a ClassNotFound exception for  org.apache.catalina.realm.RealmBase

When I put the jar in common/lib I get ClassNotFound exception for  com.ensco.nt_authentication.Ensco_NT_Realm

Putting the jar in two places gives the CCE. I have tried putting the jar in all 3 lib directories individually and I get the above chicken-and-egg situation. if I override the entire classpath and specify every jar on the commandline it will work. this is obviously not the best approach. So, then, where do I need to put things to make this work? 

Chris



--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>


RE: ClassCastException, custom Realm, and ClassLoading Repost... this is bugging me.

Posted by James Radvan <ja...@imperiumglobal.com>.
Christian, I'm sorry I can't help you with your problem, but I'd like to
thank you for inadvertently helping me solve mine!

Thanks,

-----------------------
James Radvan
e-Business Engineer
james@imperiumglobal.com
+44 7990 624899

-----Original Message-----
From: Bongiorno.Christian [mailto:Bongiorno.Christian@ensco.com]
Sent: 18 December 2001 14:51
To: Tomcat Users List
Subject: RE: ClassCastException, custom Realm, and ClassLoading
Repost... this is bugging me.


--
To unsubscribe:   <ma...@jakarta.apache.org>
For additional commands: <ma...@jakarta.apache.org>
Troubles with the list: <ma...@jakarta.apache.org>