hi all,

trying to reference the userDatabase from my application, but get a Class
CastException. Here is my code:

javax.naming.Context ctx = new InitialContext();
Object ud = ctx.lookup("java:comp/env/userDatabase");
//System.out.println(ud.getClass().getClassLoader());
UserDatabase usrd = (UserDatabase) ud;



and i have the <ResourceLink> set up in server.xml.


i got a ClassCastException when trying to cast it to UserDatabase, and
apparently that's because it was loaded from the Catalina classloader and
is not visible from my application classloader.

so just wondering if there's something else i need to do before i can use
the UserDatabase, or is it not meant to be used?

thanks

andrew

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .



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

Reply via email to