Announcement Announcement Module
No announcement yet.
rmi remoting: unclear java.lang.ClassNotFoundException of org.springframework.remotin Page Title Module
Move Remove Collapse
Conversation Detail Module
  • 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 but no solution has been explained.

    log is:
      INFO ( - Looking for RMI registry at port '1099'
    DEBUG ( - RMI service [tutorial.spring.server.Server@18bbc5a] is an RMI invoker
    DEBUG ( - Creating JDK dynamic proxy: target source is SingletonTargetSource for target object [tutorial.spring.server.Server@18bbc5a]
     INFO ( - Binding service 'serviceName' to RMI registry: RegistryImpl_Stub[UnicastRef [liveRef: [endpoint:[](remote),objID:[0:0:0, 0]]]]
     INFO ( - Destroying singletons in 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:

    	<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 name="serviceName">
    		<property name="serviceInterface">
    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


    • #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.