• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Remote Exception Error.

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi I am new to the whole RMI thing and I am desperate for some help.

Each time i run the file NodeImpl which activates a Node daemon i get the following errror

D:\virtual_router\classes>java -Djava.security.policy=client.policy -Djava.rmi.s
erver.codebase=file:// router.NodeImpl
Node Daemon error: RemoteException occurred in server thread; nested exception i
s:
java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
tion is:
java.lang.ClassNotFoundException: router.NodeImpl_Stub
java.rmi.ServerException: RemoteException occurred in server thread; nested exce
ption is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
tion is:
java.lang.ClassNotFoundException: router.NodeImpl_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:4
60)
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(Stream
RemoteCall.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 java.rmi.Naming.rebind(Naming.java:160)
at router.NodeImpl.main(NodeImpl.java:105)
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested ex
ception is:
java.lang.ClassNotFoundException: router.NodeImpl_Stub
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:342
)
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:4
60)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport
.java:701)
at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.ClassNotFoundException: router.NodeImpl_Stub
at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:219)
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:631)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.jav
a:200)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:151

The NodeImpl.class and the NodeImpl_Stub.class and the NodeImpl.Skel.class are located on D:\virtual_router\classes\router.
NodeImpl is packaged into router.

The codebase in the policy file is file:/D:/virtual_router/classes/
and the client.policy file is stored in
D:\virtual_router\classes\CLIENT.POLICY

however i am having extreme problems when i run the file i am in the directory D:\virtual_router\classes in the command prompt and use
java -Djava.security.policy=client.policy Djava.rmi.server.codebase=file:// router.NodeImpl

is this correct. because it doesnt seem to locate the stubs ore skeletons.
Any help is appreciated
 
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Nope, the codebase should be the absolute path to the classes directory -


Or did some of your command prompt get chopped off when you posted it?
 
Bally Banwait
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thanks for that,

it worked i think but i;m going to cry because i have got another error its just one thing after another. This is what it is

D:\virtual_router\classes>java -Djava.security.policy=client.policy -Djava.rmi.server.codebase=file///D:/virtual_router/classes/ router.NodeImpl
Node Daemon error: Error unmarshaling return; nested exception is: java.net.MalformedURLException: no protocol: file///D:/virtual_router/cl
asses/
java.rmi.UnmarshalException: Error unmarshaling return; nested exception is:
java.net.MalformedURLException: no protocol: file///D:/virtual_router/cl
asses/
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
217)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:350)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
at router.NodeImpl.main(NodeImpl.java:105)
Caused by: java.net.MalformedURLException: no protocol: file///D:/virtual_router
/classes/
at java.net.URL.<init>(URL.java:537)
at java.net.URL.<init>(URL.java:434)
at java.net.URL.<init>(URL.java:383)
at sun.rmi.server.LoaderHandler.pathToURLs(LoaderHandler.java:747)
at sun.rmi.server.LoaderHandler.getDefaultCodebaseURLs(LoaderHandler.jav
a:120)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:149)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257)
at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.jav
a:200)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:151
3)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
626)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:
215)
... 4 more
 
Nathan Pruett
Bartender
Posts: 4121
IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks like you're missing a colon (':') between 'file' and the first slash.
 
Bally Banwait
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
thank you so much. It works.
Thanks
 
Bally Banwait
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HI thanks for that, i had a few more problems but that was with the policy, but i'm having one more which is

D:\virtual_router\classes>java -Djava.security.policy=client.policy -Djava.rmi.s
erver.codebase=file:///D:/virtual_router/classes/ topo.TopologyServer 3000 topol
ogy.topo2
created router topology for: 192.168.0.2:1000
added neighbour: (192.168.0.2:2000) to (192.168.0.2:1000)
Begin Daemon Chat
created router topology for: 192.168.0.2:2000
added neighbour: (192.168.0.2:1000) to (192.168.0.2:2000)
Begin Daemon Chat
Error starting up topology server: null
java.util.NoSuchElementException
at java.util.StringTokenizer.nextToken(StringTokenizer.java:259)
at router.RouterAssociation.fromString(RouterAssociation.java:31)
at router.RouterAssociation.<init>(RouterAssociation.java:20)
at topo.TopologyServer.readTopology(TopologyServer.java:106)
at topo.TopologyServer.<init>(TopologyServer.java:39)
at topo.TopologyServer.main(TopologyServer.java:57)

The ip addresses get read in froma file, but i'm not sure what this problem is. Any ideas
 
Bally Banwait
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
its ok i sorted it.
 
What kind of corn soldier are you? And don't say "kernel" - that's only for this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic