I'm using the RmiProxyFactoryBean for RMI remoting, with the following config:
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).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>${cpmsRMIName}</value></property> <property name="lookupStubOnStartup"><value>false</value></property> <property name="refreshStubOnConnectFailure"><value>true</value></property> </bean>
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:25:32,491 INFO [STDOUT] java.rmi.NoSuchObjectException: no such object in table 2004-10-25 11:25:32,492 INFO [STDOUT] at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247) 2004-10-25 11:25:32,492 INFO [STDOUT] at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223) 2004-10-25 11:25:32,492 INFO [STDOUT] at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133) 2004-10-25 11:25:32,492 INFO [STDOUT] at org.springframework.remoting.rmi.RmiInvocationWrapper_Stub.invoke(Unknown Source) 2004-10-25 11:25:32,493 INFO [STDOUT] at org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke(RmiClientInterceptor.java:293) 2004-10-25 11:25:32,493 INFO [STDOUT] at org.springframework.remoting.rmi.RmiClientInterceptor.doInvoke(RmiClientInterceptor.java:258) 2004-10-25 11:25:32,493 INFO [STDOUT] at org.springframework.remoting.rmi.RmiClientInterceptor.invoke(RmiClientInterceptor.java:198) 2004-10-25 11:25:32,493 INFO [STDOUT] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:138) 2004-10-25 11:25:32,494 INFO [STDOUT] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:152) 2004-10-25 11:25:32,494 INFO [STDOUT] at .getCpmsProductData(Unknown Source) 2004-10-25 11:25:32,494 INFO [STDOUT] at org.stl.wo.data.CpmsDataAccessorSpringRmiImpl.getCpmsData(CpmsDataAccessorSpringRmiImpl.java:24) 2004-10-25 11:25:32,494 INFO [STDOUT] at org.stl.wo.data.DataAccessorImpl.getFullProductData(DataAccessorImpl.java:88) 2004-10-25 11:25:32,494 INFO [STDOUT] at org.stl.wo.web.prod.ProdDisplayController.onSubmit(ProdDisplayController.java:56)


Reply With Quote