You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "OHIRA, Shinya" <sh...@geocities.co.jp> on 2000/12/12 08:02:04 UTC
unable to cast stub object to remote interface
Hi, sorry if this is a newbie question.
I upgraded tomcat from 3.1 to 3.2 and run into the problem. the error message is
java.lang.ClassCastException: TestServer_Stub
It seems that tomcat 3.2 can not cast RMI stub object to remote interface - the
jar file of these lookup program and remote interface is deployed in WEB-INF/lib.
The problem doesn't appear when that program is deployed in CLASSPATH of tomcat.
The problem doesn't appear under tomcat 3.1.
Is this a class loader bug or my misconfiguration? Please help me...
Thanks.
--Shinya
Re: unable to cast stub object to remote interface
Posted by "OHIRA, Shinya" <sh...@geocities.co.jp>.
I read "Thread.currentThread().setContextClassLoader() [was: ServletContext.
getResourceAsStream() in 3.2?]" thread and I understand that tomcat 3.2 does not
set ContextClassLoader. I added the following in my server.xml and worked fine.
<RequestInterceptor className="org.apache.tomcat.request.Jdk12Interceptor" />
Thanks.
"OHIRA, Shinya" <sh...@geocities.co.jp> wrote:
> Hi, sorry if this is a newbie question.
>
> I upgraded tomcat from 3.1 to 3.2 and run into the problem. the error message
is
> java.lang.ClassCastException: TestServer_Stub
> It seems that tomcat 3.2 can not cast RMI stub object to remote interface -
the
> jar file of these lookup program and remote interface is deployed in WEB-INF/
lib.
>
> The problem doesn't appear when that program is deployed in CLASSPATH of
tomcat.
> The problem doesn't appear under tomcat 3.1.
> Is this a class loader bug or my misconfiguration? Please help me...
> Thanks.
>
> --Shinya