Announcement Announcement Module
Collapse
No announcement yet.
rmi remoting: unclear java.lang.ClassNotFoundException of org.springframework.remotin Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • rmi remoting: unclear java.lang.ClassNotFoundException of org.springframework.remotin

    hi, following issue occured at my app has already been discussed in
    http://forum.springframework.org/showthread.php?t=16543 but no solution has been explained.

    log is:
    Code:
      INFO (RmiServiceExporter.java:386) - Looking for RMI registry at port '1099'
    DEBUG (RmiBasedExporter.java:59) - RMI service [tutorial.spring.server.Server@18bbc5a] is an RMI invoker
    DEBUG (JdkDynamicAopProxy.java:113) - Creating JDK dynamic proxy: target source is SingletonTargetSource for target object [tutorial.spring.server.Server@18bbc5a]
     INFO (RmiServiceExporter.java:271) - Binding service 'serviceName' to RMI registry: RegistryImpl_Stub[UnicastRef [liveRef: [endpoint:[192.168.108.8:1099](remote),objID:[0:0:0, 0]]]]
     INFO (DefaultSingletonBeanRegistry.java:285) - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@166afb3: defining beans [serviceImpl,server]; root of factory hierarchy
    Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'server' defined in class path resource [spring-config.xml]: Invocation of init method failed; nested exception is java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
    	java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
    	java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationWrapper_Stub (no security manager: RMI class loader disabled)
    is there a fix for this already or what am i doing wrong?
    my spring configuration for rmi remoting is very simple:

    Code:
    <beans>
    	<bean id="serviceImpl" class="tutorial.spring.server.Server"></bean>
    
    	<bean id="server" class="org.springframework.remoting.rmi.RmiServiceExporter">
    		<property name="service">
    			<ref bean="serviceImpl" />
    		</property>
    		<property name="serviceName">
    			<value>PayService</value>
    		</property>
    		<property name="serviceInterface">
    			<value>tutorial.spring.server.IServer</value>
    		</property>
    	</bean>
    
    </beans>
    i am starting app within eclipse and class org.springframework.remoting.rmi.RmiInvocationWrap per_Stub can be found (-> declaring it directly inside code no error occurs while compiling).

    thanks for help.

  • #2
    to exclude the problem eclipse IDE, i tried to start the app on command-line. same result

    Comment


    • #3
      blime, i got the reason for failure: with netstat i found out that the port was already occupied (through another rmi-registry). after having killed the process through task manager it worked.

      though i think the NoClassDefFoundError is very misleading. maybe a detailed message like ("possible reason: another rmi-server is already listening") could help more.

      Comment

      Working...
      X