Results 1 to 6 of 6

Thread: NoSuchObjectException on RMI server restart

  1. #1
    Join Date
    Aug 2004
    Location
    Carlisle, UK
    Posts
    184

    Default 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;
    Chris Harris
    Carlisle, UK

  2. #2
    Join Date
    Aug 2004
    Location
    Amsterdam, Netherlands
    Posts
    450

    Default

    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...
    Alef Arendsen
    SpringSource
    http://www.springsource.com

  3. #3
    Join Date
    Aug 2004
    Location
    Linz, Austria
    Posts
    391

    Default

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

    Juergen

  4. #4
    Join Date
    Aug 2004
    Location
    Carlisle, UK
    Posts
    184

    Default

    That's great, thanks.
    I assume that will be in the next release?
    Any idea when that is likely?
    Chris Harris
    Carlisle, UK

  5. #5
    Join Date
    Aug 2004
    Location
    Amsterdam, Netherlands
    Posts
    450

    Default

    1.1.2 is likely to be released in one or two weeks. The current schedule is early next week...
    Alef Arendsen
    SpringSource
    http://www.springsource.com

  6. #6
    Join Date
    Aug 2004
    Location
    Carlisle, UK
    Posts
    184

    Default

    Wonderful!
    Once again I'm impressed by the quick response and help from the Spring team.
    Thanks!
    Chris Harris
    Carlisle, UK

Similar Threads

  1. Replies: 6
    Last Post: Jun 14th, 2007, 01:00 PM
  2. Replies: 6
    Last Post: Sep 29th, 2005, 04:25 AM
  3. Replies: 2
    Last Post: Sep 12th, 2005, 06:12 PM
  4. Replies: 1
    Last Post: Aug 23rd, 2005, 09:24 AM
  5. Replies: 15
    Last Post: Aug 28th, 2004, 08:12 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •