planet
Oct 25th, 2005, 11:04 AM
I'm trying to export a POJO as an RMI service using the exporter, and I get the exception below. Why this should occur, I'm not sure as I thought that the RmiServiceExporter generated its own stubs.
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.remoting.rmi.RmiServiceExport er' defined in class path resource [unit-test-beans.xml]: Initialization of bean failed; nested exception is java.rmi.StubNotFoundException: Stub class not found: org.springframework.remoting.rmi.RmiInvocationWrap per_Stub; nested exception is:
java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationWrap per_Stub
java.rmi.StubNotFoundException: Stub class not found: org.springframework.remoting.rmi.RmiInvocationWrap per_Stub; nested exception is:
java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationWrap per_Stub
at sun.rmi.server.RemoteProxy.getStub(Unknown Source)
at sun.rmi.server.RemoteProxy.getStub(Unknown Source)
at sun.rmi.server.UnicastServerRef.setSkeleton(Unknow n Source)
at sun.rmi.server.UnicastServerRef.exportObject(Unkno wn Source)
at sun.rmi.server.UnicastServerRef.exportObject(Unkno wn Source)
at java.rmi.server.UnicastRemoteObject.exportObject(U nknown Source)
at java.rmi.server.UnicastRemoteObject.exportObject(U nknown Source)
at org.springframework.remoting.rmi.RmiServiceExporte r.afterPropertiesSet(RmiServiceExporter.java:244)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1058)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:363)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:275)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:318)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationContext.java:81)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationContext.java:66)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationContext.java:57)
the config files are:
<beans>
<bean id="testService" class="dummy.TestImpl"/>
<bean class="org.springframework.remoting.rmi.RmiServiceExporte r">
<property name="serviceName" value="TestService"/>
<property name="service">
<ref local="testService"/>
</property>
<property name="serviceInterface" value="test.Test"/>
<property name="registryPort">
<value>1199</value>
</property>
<property name="servicePort">
<value>9001</value>
</property>
</bean>
</beans>
Any information would be of help.
regards
Richard
org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'org.springframework.remoting.rmi.RmiServiceExport er' defined in class path resource [unit-test-beans.xml]: Initialization of bean failed; nested exception is java.rmi.StubNotFoundException: Stub class not found: org.springframework.remoting.rmi.RmiInvocationWrap per_Stub; nested exception is:
java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationWrap per_Stub
java.rmi.StubNotFoundException: Stub class not found: org.springframework.remoting.rmi.RmiInvocationWrap per_Stub; nested exception is:
java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationWrap per_Stub
at sun.rmi.server.RemoteProxy.getStub(Unknown Source)
at sun.rmi.server.RemoteProxy.getStub(Unknown Source)
at sun.rmi.server.UnicastServerRef.setSkeleton(Unknow n Source)
at sun.rmi.server.UnicastServerRef.exportObject(Unkno wn Source)
at sun.rmi.server.UnicastServerRef.exportObject(Unkno wn Source)
at java.rmi.server.UnicastRemoteObject.exportObject(U nknown Source)
at java.rmi.server.UnicastRemoteObject.exportObject(U nknown Source)
at org.springframework.remoting.rmi.RmiServiceExporte r.afterPropertiesSet(RmiServiceExporter.java:244)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:1058)
at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:363)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:226)
at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:147)
at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:275)
at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:318)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationContext.java:81)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationContext.java:66)
at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationContext.java:57)
the config files are:
<beans>
<bean id="testService" class="dummy.TestImpl"/>
<bean class="org.springframework.remoting.rmi.RmiServiceExporte r">
<property name="serviceName" value="TestService"/>
<property name="service">
<ref local="testService"/>
</property>
<property name="serviceInterface" value="test.Test"/>
<property name="registryPort">
<value>1199</value>
</property>
<property name="servicePort">
<value>9001</value>
</property>
</bean>
</beans>
Any information would be of help.
regards
Richard