• Post Reply Bookmark Topic Watch Topic
  • New Topic

RMI Exception

 
Suman Mummaneni
Ranch Hand
Posts: 96
Android Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
I am having a problem with RMI client its throwing an exception. It runs find when I run it in the Sun Studio IDE or IntelliJ IDEA. But the client throws an exception when I try to run the client and server using a batch files.
The exception thrown is as follows.

java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.io.EOFException
java.io.EOFException
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:157)
at chartmanager.ClientManager_Stub.getStartupChartData(Unknown Source)
at chartui.Client.initModels(Client.java:78)
at chartui.Client.<init>(Client.java:48)
at chartui.Client.main(Client.java:152)
Caused by: java.io.EOFException
at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2502)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1267)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at java.util.ArrayList.readObject(ArrayList.java:592)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:919)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1813)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1713)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1299)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:339)
at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:290)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:139)
... 4 more
Exception in thread "main" java.lang.NullPointerException
at chartui.Client.initModels(Client.java:89)
at chartui.Client.<init>(Client.java:48)
at chartui.Client.main(Client.java:152)
Java Result: 1


I think this a problem with the stubs not being able to access the client but I do not know why its is running fine in the IDE but not when run it using the batch files. I am using the same settings for server and client.
 
Suman Mummaneni
Ranch Hand
Posts: 96
Android Java Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I figured out the problem. The project folder was shared. I do not know why but when I removed the share I batch files started working. It was a quite a releif for me now.

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!