no protocol exception, servlet call rmi remote object's method and passing in an object
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Haining_Mu
Posted On:   Monday, November 4, 2002 12:43 PM

Really need help here: RMI registry and server running in one Unix machine. Web app in Windows 2000/Tomcat 4. Has servlet looked up remote object succefully. However, when try to call remote object's method with a parameter (i.e. obj.aMethod(bObj)), the exception is throw java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.net.MalformedURLException: no protocol: Files/Apache at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247) at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)    More>>

Really need help here:



RMI registry and server running in one Unix machine.


Web app in Windows 2000/Tomcat 4. Has servlet looked up remote object succefully. However, when try to call remote object's method with a parameter (i.e. obj.aMethod(bObj)), the exception is throw

java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.net.MalformedURLException: no protocol: Files/Apache
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:133)
at com.mycompany.MyObjectImpl_Stub.aMethod(Unknown Source)
.
.
.

Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.net.MalformedURLException: no protocol: Files/Apache
Caused by: java.net.MalformedURLException: no protocol: Files/Apache



to simplify (without use of dynamic code loading), I have all classes available in both machine, including interface, stub, bObj.

And, if I run the code in stand-alone instead of in servlet, everything ok.

did I miss something in servlet, Tomcat setting to make RMI call work?

   <<Less

Re: no protocol exception, servlet call rmi remote object's method and passing in an object

Posted By:   Christopher_Koenigsberg  
Posted On:   Monday, November 4, 2002 01:11 PM

...java.net.MalformedURLException: no protocol: Files/Apache ...



This error looks like somewhere you're supposed to give a URL in one of your args, but instead of a full URL with "protocol:host/path", it is only getting a partial URL. Could you be trying to send a URL containing a path with a blank space in it ("http://servername/Program Files/Apache")?

About | Sitemap | Contact