geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacek Laskowski" <ja...@laskowski.net.pl>
Subject Re: ClassCastException while using the gloabl JNDI Context
Date Mon, 26 Nov 2007 14:53:51 GMT
On Nov 26, 2007 3:33 PM, Jochen Zink <jochenlist@web.de> wrote:

> InitialContext ic = new InitialContext();
> Context context = (Context) ic.lookup("ger:");
> RolleDTO rolle = (RolleDTO) context.lookup("myObject ");
>
> The Result is the follwoing ClassCastException.

Could you do the following in your code so it gets easier to track it
down (writting it from the top off my head - sorry for typos):

InitialContext ic = new InitialContext();
Context context = (Context) ic.lookup("ger:");
System.out.println(">>> RolleDTO's classloader" +
RolleDTO.class.getClassLoader());
Object myObj = context.lookup("myObject ");
System.out.println(">>> RolleDTO from JNDI's classloader" +
myObj.getClass().getClassLoader());

They're surely different. Could you attach geronimo plans for the
webapp and the ear?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Mime
View raw message