> I've looked at the archives and see that others were having a problem with
> classloaders when using Tomcat.
>
> I get a ClassCastException: $Proxy0 (and a long fairly meaningless stack
trace)
> when I try to cast my home object (actually the proxy) to the interface
after
> getting it from a JNDI lookup.
>
> In one of the emails in the archive, Rickard suggests printing out the
> classloader for both the proxy and the interface. When I do that I get
the
> following:
>
> cl(proxy) = java.net.URLClassLoader@4b6009
> cl(remote) = AdaptiveClassLoader( )
>
> Clearly different classloaders. I've checked and AdaptiveClassLoader is
> from Tomcat. So, Tomcat loads my remote interface and JBoss is loading
the
> proxy. How do I rectify this situation?
>
> I've put my classes everywhere I can think of (WEB-INF/classes, in a jar
file
> in WEB-INF/lib, and in a jar file added to the main classpath for the
JVM --
> that is, in the run.sh file) and always get the same result.
That is precisely the problem: you have put the classes in too many places.
The way to fix is to put it in WEB-INF/classes only. Sebastien, do you have
the details on this one? If so, show Vincent the tricks (i.e. lean over your
desk and tell him ;-)
/Rickard
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]