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
|