Results 1 to 7 of 7

Thread: RMI Remoting Example

  1. #1
    Join Date
    Aug 2004
    Location
    columbia, md
    Posts
    12

    Default RMI Remoting Example

    Hi,
    I receive the following class not found exception when implementing the Rmi remoting examples in the 1.1.3 reference:
    Code:
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.remoting.rmi.RmiServiceExporter' defined in class path resource [server-service-context-test.xml]: Initialization of bean 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
    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
    	at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:352)
    	at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:207)
    	at sun.rmi.transport.Transport$1.run(Transport.java:148)
    	at java.security.AccessController.doPrivileged(Native Method)
    	at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
    	at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
    	at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
    	at java.lang.Thread.run(Thread.java:534)
    	at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
    	at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
    	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:350)
    	at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
    	at org.springframework.remoting.rmi.RmiServiceExporter.afterPropertiesSet(RmiServiceExporter.java:162)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:990)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:275)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:193)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:240)
    	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:163)
    
    ...
    I am running Spring 1.1.2, Java 1.4.2 (incl. rmiregistry).

    Can anyone help please?
    Thanks!!
    sinclair

  2. #2
    Join Date
    Aug 2004
    Location
    Linz, Austria
    Posts
    391

    Default

    RmiInvocationWrapper_Stub.class is contained in spring.jar, so your class loader should be able to find it...

    Have you tried to run JPetStore with the RMI exporter turned on(uncomment the RmiServiceExporter definition in /WEB-INF/applicationContext.xml)? This is what I always test before a release, and it always works...

    To access JPetStore's RMI service, uncomment the RmiProxyFactoryBean definition in samples/jpetstore/client/clientContext.xml and run client.bat/sh with an order id. However, you should already see whether the export works when the server starts up anyway.

    Juergen

  3. #3
    Join Date
    Aug 2004
    Location
    columbia, md
    Posts
    12

    Default

    Hi ,

    Thanks for the help Juergen.

    I managed to get this to work by turning the registry off and the Spring infrastructure took care of it - by starting its own registry.

    I will try your suggestions.

    Thanks again.

    p.s Have you guys seen the openAMF project ? At this time we are assessing the use of the Spring integration (...SpringBeanInvoker) provided by this project. Flash MX -> Servlet Engine -> openAMF Gateway -> Spring. Have you done any investigation of this framework ? Any and all observations would be welcome. = )
    sinclair
    sinclair

  4. #4
    Join Date
    Nov 2004
    Location
    California
    Posts
    6

    Default Registry Off

    What did you do to turn off the registry?

    Thanks,

    Sergey

  5. #5
    Join Date
    Nov 2004
    Location
    California
    Posts
    6

    Default Same Error

    I am getting the same error.

    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
    java.lang.ClassNotFoundException: org.springframework.remoting.rmi.RmiInvocationWrap per_Stub

    But this only happens when I make the RMI Service fail and restart it. In this case I am relying on
    <property name="refreshStubOnConnectFailure" value="true"></property>

    Thanks,

    Sergey

  6. #6
    Join Date
    Nov 2004
    Location
    California
    Posts
    6

    Default Another Error

    After I made sure spring jar is in the classpath I got following exception.

    java.lang.NoSuchMethodException: org.springframework.remoting.rmi.RmiInvocationWrap per_Stub.getScorexResults(net.lmb.scorex.realtime. adapter.ScorexPacketVO)

    "getScorexResults" is my method so it is definitely not going to be on the Spring Stub. It seems like a ClassLoader problem.

    Did anyone encounter similar problem?

    Thanks,

    Sergey

  7. #7
    Join Date
    Aug 2004
    Location
    China
    Posts
    11

    Default

    run rmi using springframe in tomcat server, and it throw same error.i found my tomcat installed path include space, for example:
    C:\Program Files\Apache\Tomcat 5.5

    so i reinstall tomcat, the installed path chnage to have no any space, for example:
    c:\tomcat5

    the problem above exception did not throw.

    try it.

Similar Threads

  1. Replies: 8
    Last Post: Oct 19th, 2012, 02:49 AM
  2. Spring, Remoting and Spring Rich Client
    By shaby775 in forum Swing
    Replies: 9
    Last Post: Jan 6th, 2011, 07:30 AM
  3. CORBA remoting
    By karaznie in forum Remoting
    Replies: 5
    Last Post: Sep 5th, 2006, 09:46 AM
  4. Asynchronous Remoting with Spring and ActiveMQ
    By jpwinans in forum Remoting
    Replies: 2
    Last Post: Sep 21st, 2005, 10:29 AM
  5. Remoting Factory Objects
    By ibbo in forum Remoting
    Replies: 0
    Last Post: Sep 20th, 2004, 08:17 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •