Results 1 to 8 of 8
Thread: RMI UnmarshalException error
- 10-09-2010, 12:51 PM #1
Member
- Join Date
- Oct 2010
- Posts
- 8
- Rep Power
- 0
RMI UnmarshalException error
I too have the same problem as ChrisMayhew. But i am using Wifi, how overcome this problem in localhost. While running server program (in jdk/bin), i am receiving the following error message...
Exception java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: ArmstrongImp_StubRaised
-
Kowsi, I have moved your post out of this thread: java-rmi-problem since you have a new question. It may be related to the question in the old thread (hence the link) but is a hijack of the old thread. We like to put new questions in their own threads. Thanks for your cooperation and best of luck.
- 10-11-2010, 03:24 PM #3
Member
- Join Date
- Oct 2010
- Posts
- 8
- Rep Power
- 0
Hi, i have attached server program. The problem is server is not connecting to local host...
This is Interface...
import java.rmi.*;
public interface ArmstrongInf extends java.rmi.Remote
{
public boolean isArmstrong(long num)throws java.rmi.RemoteException;
}This implements interface..
import java.rmi.*;
import java.rmi.server.*;
public class ArmstrongImp extends java.rmi.server.UnicastRemoteObject implements ArmstrongInf
{
public ArmstrongImp() throws java.rmi.RemoteException
{
super();
}
public boolean isArmstrong(long num) throws java.rmi.RemoteException
{
long n=num;
int arm=0,len=(Long.toString(num)).length();
while(n>0)
{
arm+=Math.pow(n%10,len);
n=n/10;
}
if(num==arm)
return true;
else
return false;
}
}Its showing unmarshall exception... How to get rid off this...This is Server...
import java.rmi.Naming;
public class ArmstrongServer
{
public ArmstrongServer()
{
try
{
ArmstrongInf Arm = new ArmstrongImp();
Naming.rebind("rmi://localhost:8080/Armstrong",Arm);
}
catch(Exception e){System.out.println("Exception "+e+"Raised");}
}
public static void main(String args[])
{
new ArmstrongServer();
}
}
- 10-11-2010, 05:16 PM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
What's the full exception including stack trace.
Your catch block only seems to be printing the exception name, which isn't as helpful.
- 10-13-2010, 03:17 AM #5
Member
- Join Date
- Oct 2010
- Posts
- 8
- Rep Power
- 0
I cannt get u... I dont know what you are asking... I dont know much about java... It cannot able to connect the server to local host... I think its due to vista...
- 10-13-2010, 08:53 AM #6
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
This tells you next to nothing about the problem.Java Code:System.out.println("Exception "+e+"Raised")
this will tell you exactly what exception has occurred and, more importantly, where it occurred.Java Code:e.printStackTrace();
Always print the stack trace on an exception.
- 10-15-2010, 04:39 PM #7
Member
- Join Date
- Oct 2010
- Posts
- 8
- Rep Power
- 0
i got following error...
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: ArmstrongImp_Stub
at sun.rmi.server.UnicastServerRef.oldDispatch(Unicas tServerRef.java:396
)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastSe rverRef.java:250)
at sun.rmi.transport.Transport$1.run(Transport.java:1 59)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport. java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages( TCPTransport.java:5
35)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run0(TCPTranspor
t.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run(TCPTransport
.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:619)
at sun.rmi.transport.StreamRemoteCall.exceptionReceiv edFromServer(Stream
RemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(Str eamRemoteCall.java:
233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:3 59)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
at ArmstrongServer.<init>(ArmstrongServer.java:10)
at ArmstrongServer.main(ArmstrongServer.java:16)
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested ex
ception is:
java.lang.ClassNotFoundException: ArmstrongImp_Stub
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknow n Source)
at sun.rmi.server.UnicastServerRef.oldDispatch(Unicas tServerRef.java:386
)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastSe rverRef.java:250)
at sun.rmi.transport.Transport$1.run(Transport.java:1 59)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport. java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages( TCPTransport.java:5
35)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run0(TCPTranspor
t.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandl er.run(TCPTransport
.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.run Task(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: ArmstrongImp_Stub
at java.net.URLClassLoader$1.run(URLClassLoader.java: 200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.j ava:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:3 07)
at java.lang.ClassLoader.loadClass(ClassLoader.java:2 52)
at java.lang.ClassLoader.loadClassInternal(ClassLoade r.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandl er.java:434)
at sun.rmi.server.LoaderHandler.loadClass(LoaderHandl er.java:165)
at java.rmi.server.RMIClassLoader$2.loadClass(RMIClas sLoader.java:620)
at java.rmi.server.RMIClassLoader.loadClass(RMIClassL oader.java:247)
at sun.rmi.server.MarshalInputStream.resolveClass(Mar shalInputStream.jav
a:197)
at java.io.ObjectInputStream.readNonProxyDesc(ObjectI nputStream.java:157
5)
at java.io.ObjectInputStream.readClassDesc(ObjectInpu tStream.java:1496)
at java.io.ObjectInputStream.readOrdinaryObject(Objec tInputStream.java:1
732)
at java.io.ObjectInputStream.readObject0(ObjectInputS tream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputSt ream.java:351)
... 12 more
- 10-22-2010, 02:33 PM #8
Member
- Join Date
- Oct 2010
- Posts
- 8
- Rep Power
- 0
Similar Threads
-
Thread: Error 500--Internal Server Error java.lang.NullPointerException
By jackdear44 in forum New To JavaReplies: 1Last Post: 12-05-2009, 07:28 AM -
java.lang.Error: Error opening DSound for capture
By NARs in forum NetworkingReplies: 1Last Post: 10-26-2009, 04:38 PM -
Err:java.rmi.UnMarshalException
By Deepa in forum New To JavaReplies: 4Last Post: 06-11-2009, 01:22 PM -
Diference Between compiler error Garbage collection and Runtime Error?
By makpandian in forum New To JavaReplies: 3Last Post: 01-23-2009, 08:53 AM -
Getting UnmarshalException n ClassNotFoundException in RMI
By anuj_1983 in forum New To JavaReplies: 0Last Post: 07-09-2008, 12:36 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks