Spring RmiServiceExporter causing "java.rmi.NoSuchObjectException: no such object in table" at JBoss EAP startup
Issue
- We are trying to define RMI beans as following
<bean class="org.springframework.remoting.rmi.RmiServiceExporter">
<property name="serviceName" value="SomeServiceName"/>
<property name="service" ref="someService"/>
<property name="serviceInterface" value="SomeServiceInterface"/>
<property name="registryHost" value="localhost"/>
<property name="registryPort" value="1098"/>
</bean>
- But on startup following exception is thrown:
12:58:36,572 INFO [STDOUT] ERROR [main] org.springframework.web.context.ContextLoader initWebApplicationContext- Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.remoting.rmi.RmiServiceExporter#0' defined in ServletContext resource [/WEB-INF/classes/spring-delegates.xml]: Invocation of init method failed; nested exception is java.rmi.NoSuchObjectException: no such object in table
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420)
...
at java.lang.Thread.run(Thread.java:662)
Caused by: java.rmi.NoSuchObjectException: no such object in table
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
at sun.rmi.registry.RegistryImpl_Stub.list(Unknown Source)
at org.springframework.remoting.rmi.RmiServiceExporter.testRegistry(RmiServiceExporter.java:420)
at org.springframework.remoting.rmi.RmiServiceExporter.getRegistry(RmiServiceExporter.java:331)
at org.springframework.remoting.rmi.RmiServiceExporter.prepare(RmiServiceExporter.java:268)
at org.springframework.remoting.rmi.RmiServiceExporter.afterPropertiesSet(RmiServiceExporter.java:229)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
... 82 more
...
Environment
JBoss Enterprise Application Platform (EAP) 5.1.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.