Run the server of a aplication rmi
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   carlos_piriz
Posted On:   Sunday, July 16, 2006 09:42 PM

Hello, I have a example of a rmi aplication, then I write other , compile the files (have the stub and the skel), run the rmiregistry And when I write: java -cp . -Djava.security.policy=Permisos.txt Servidor, where "Servidor" is the class of the server and "Permisos.txt" is for the security ... Then I have this problem: java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: java.lang.ClassNotFoundException: Servidor_Stub at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:385 ) at sun.rmi.server.UnicastServerRef.dispatc   More>>

Hello,

I have a example of a rmi aplication, then I write other , compile the files (have the stub and the skel), run the rmiregistry


And when I write:


java -cp . -Djava.security.policy=Permisos.txt Servidor, where "Servidor" is the class of the server and "Permisos.txt" is for the security ...
Then I have this problem:






java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: Servidor_Stub
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:385
)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
60)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
.java:701)
at java.lang.Thread.run(Thread.java:595)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknow
n Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Unknown Source)
at Servidor.main(Servidor.java:31)
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested ex
ception is:
java.lang.ClassNotFoundException: Servidor_Stub
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:375
)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:240)
at sun.rmi.transport.Transport$1.run(Transport.java:153)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:4
60)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
.java:701)
at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException: Servidor_Stub
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:430)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:620)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:247)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.jav
a:197)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:153
8)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1460)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
693)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
... 9 more


But I don't know the solution,
sorry , I don't know english really, but colud you help me.
thanks.


Carlos    <<Less

Re: Run the server of a aplication rmi

Posted By:   Edward_Harned  
Posted On:   Monday, July 17, 2006 11:22 AM

The registry needs access to your stub.


Try setting the CLASSPATH. Then start the registry.

About | Sitemap | Contact