Announcement Announcement Module
Collapse
No announcement yet.
NoSuchObjectException on RMI server restart Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • NoSuchObjectException on RMI server restart

    I'm using the RmiProxyFactoryBean for RMI remoting, with the following config:

    Code:
        <bean id="cpmsRmiProxy" class="org.springframework.remoting.rmi.RmiProxyFactoryBean">
            <property name="serviceInterface">
                <value>org.stl.cpmsserver.business.CpmsServerIntf</value>
            </property>
            <property name="serviceUrl"><value>$&#123;cpmsRMIName&#125;</value></property>
            <property name="lookupStubOnStartup"><value>false</value></property>
            <property name="refreshStubOnConnectFailure"><value>true</value></property>
        </bean>
    I was under the impression that setting refreshStubOnConnectFailure to true would avoid errors if the RMI server was restarted; however in that case I get a NoSuchObjectException (see below).

    Is there anything I can do either in my config or in my code (by catching this exception) to get a successful reconnection after a server restart?

    Here is the first part of the stack trace:
    Code:
    2004-10-25 11&#58;25&#58;32,491 INFO  &#91;STDOUT&#93; java.rmi.NoSuchObjectException&#58; no such object in table
    2004-10-25 11&#58;25&#58;32,492 INFO  &#91;STDOUT&#93;  at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer&#40;StreamRemoteCall.java&#58;247&#41;
    2004-10-25 11&#58;25&#58;32,492 INFO  &#91;STDOUT&#93;  at sun.rmi.transport.StreamRemoteCall.executeCall&#40;StreamRemoteCall.java&#58;223&#41;
    2004-10-25 11&#58;25&#58;32,492 INFO  &#91;STDOUT&#93;  at sun.rmi.server.UnicastRef.invoke&#40;UnicastRef.java&#58;133&#41;
    2004-10-25 11&#58;25&#58;32,492 INFO  &#91;STDOUT&#93;  at org.springframework.remoting.rmi.RmiInvocationWrapper_Stub.invoke&#40;Unknown Source&#41;
    2004-10-25 11&#58;25&#58;32,493 INFO  &#91;STDOUT&#93;  at org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke&#40;RmiClientInterceptor.java&#58;293&#41;
    2004-10-25 11&#58;25&#58;32,493 INFO  &#91;STDOUT&#93;  at org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke&#40;RmiClientInterceptor.java&#58;258&#41;
    2004-10-25 11&#58;25&#58;32,493 INFO  &#91;STDOUT&#93;  at org.springframework.remoting.rmi.RmiClientInterceptor.invoke&#40;RmiClientInterceptor.java&#58;198&#41;
    2004-10-25 11&#58;25&#58;32,493 INFO  &#91;STDOUT&#93;  at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed&#40;ReflectiveMethodInvocation.java&#58;138&#41;
    2004-10-25 11&#58;25&#58;32,494 INFO  &#91;STDOUT&#93;  at org.springframework.aop.framework.JdkDynamicAopProxy.invoke&#40;JdkDynamicAopProxy.java&#58;152&#41;
    2004-10-25 11&#58;25&#58;32,494 INFO  &#91;STDOUT&#93;  at .getCpmsProductData&#40;Unknown Source&#41;
    2004-10-25 11&#58;25&#58;32,494 INFO  &#91;STDOUT&#93;  at org.stl.wo.data.CpmsDataAccessorSpringRmiImpl.getCpmsData&#40;CpmsDataAccessorSpringRmiImpl.java&#58;24&#41;
    2004-10-25 11&#58;25&#58;32,494 INFO  &#91;STDOUT&#93;  at org.stl.wo.data.DataAccessorImpl.getFullProductData&#40;DataAccessorImpl.java&#58;88&#41;
    2004-10-25 11&#58;25&#58;32,494 INFO  &#91;STDOUT&#93;  at org.stl.wo.web.prod.ProdDisplayController.onSubmit&#40;ProdDisplayController.java&#58;56&#41;

  • #2
    This is an issue. Currently refreshing only happens when ConnectExceptions or RemoteConnectFailureExceptions are thrown. The latter is Spring specific. Spring translates ConnectExceptions to RemoteConnectFailureExceptions and others to RemoteAccessFailureExceptions. NoSuchObjectException should also be translated to a RemoteConnectFailureException IMHO.

    I've created a JIRA issue: http://opensource.atlassian.com/proj...browse/SPR-425

    Juergen will probably have a look at this soon...

    Comment


    • #3
      Indeed - I've changed the code to treat NoSuchObjectException and ConnectIOException as RemoteConnectFailureException too.

      Juergen

      Comment


      • #4
        That's great, thanks.
        I assume that will be in the next release?
        Any idea when that is likely?

        Comment


        • #5
          1.1.2 is likely to be released in one or two weeks. The current schedule is early next week...

          Comment


          • #6
            Wonderful!
            Once again I'm impressed by the quick response and help from the Spring team.
            Thanks!

            Comment

            Working...
            X