Victor Lan wrote:
>
> I apologize if this sounds idiotically obvious, but when you mentioned
> your classpath, you didn't list the jar that contains your remote and
> home classes. It's a long shot since I'd expect a
> ClassNotFoundException instead if that is indeed the problem.
>
The interfaces are in the client classpath. But I forget to mention
another important thing: my client is a JUnit testcase. A conventional
standalone client application has no problems with ClassCastException
while retrieving beans from the server.
Now I found a mail in the archives from Rickard (30.12.) about this
topic. He suggests using
Thread.currentThread().setContextClassLoader(getClass().getClassLoader());
in the setup of each testcase. And it works with this workaround !
Another possibility is setting the -noloading argument while calling the
JUnit TestRunner. With this argument, JUnit is using the standard system
class loader to load classes.
Thanks,
Tobias
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user