[jboss-jira] [JBoss JIRA] Commented: (JBAS-3703) Update JRMPInvoker to not cast exported object to RemoteStub

Jiri Kiml (JIRA) jira-events at lists.jboss.org
Sat Jan 8 02:52:18 EST 2011


    [ https://issues.jboss.org/browse/JBAS-3703?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12574232#comment-12574232 ] 

Jiri Kiml commented on JBAS-3703:
---------------------------------

I am facing same problem with jboss-5.1.0.GA. Can you please integrate this fix there as well?

> Update JRMPInvoker to not cast exported object to RemoteStub
> ------------------------------------------------------------
>
>                 Key: JBAS-3703
>                 URL: https://issues.jboss.org/browse/JBAS-3703
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Remoting
>    Affects Versions: JBossAS-4.0.3 SP1, JBossAS-4.0.4.GA
>            Reporter: Scott Stark
>            Assignee: Tom  Elrod
>             Fix For: JBossAS-4.2.0.CR1
>
>
> If one runs with the jdk5 java.rmi.server.ignoreStubClasses dynamic stub override to force the server to generate stubs for exported objects, the JRMPInvoker fails to start with the following exception:
> [starksm at succubus bin]$ run.sh -D-Djava.rmi.server.ignoreStubClasses=true
> =========================================================================
> ...
> 11:55:52,477 WARN  [ServiceController] Problem starting service jboss:service=invoker,type=jrmp
> java.lang.ClassCastException: $Proxy13
>         at org.jboss.invocation.jrmp.server.JRMPInvoker.exportCI(JRMPInvoker.java:437)
>         at org.jboss.invocation.jrmp.server.JRMPInvoker.startService(JRMPInvoker.java:359)
>         at org.jboss.invocation.jrmp.server.JRMPInvoker$1.startService(JRMPInvoker.java:136)
>         at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
> The reason is that the code creating the remote object is explictly casting the export result to a RemoteStub:
>    protected void exportCI() throws Exception
>    {
>       this.invokerStub = (RemoteStub) UnicastRemoteObject.exportObject
>          (this, rmiPort, clientSocketFactory, serverSocketFactory);
>    }
> even though the public contract for this stub only requires a Serializable instance. The type of the invokerStub should just be relaxed to Serializable.

-- 
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list