jaki_77
asked on
RMI Exception
I'm getting an UnMarshallException while i'm running the RMI Server. It's a simple code i don't know why is it come.
I'm having both client & server on the same machine.
public interface server extends Remote{
public void getvalue()throws RemoteException;
}
serverImpl
---------
public class ServerImpl extends UnicastRemoteObject implements server{
public ServerImpl() throws RemoteException{
super();
}//const
public static void main(String[] args){
try{
ServerImpl ins = new ServerImpl();
Naming.rebind("myserv",ins );
System.out.println("regist ered");
}
catch(Exception e){System.out.println(e.ge tMessage() ;}
}//main
}
c:\javac ServerImpl.java
c:\rmic ServerImpl
c:\java ServerImpl
I'm having both client & server on the same machine.
public interface server extends Remote{
public void getvalue()throws RemoteException;
}
serverImpl
---------
public class ServerImpl extends UnicastRemoteObject implements server{
public ServerImpl() throws RemoteException{
super();
}//const
public static void main(String[] args){
try{
ServerImpl ins = new ServerImpl();
Naming.rebind("myserv",ins
System.out.println("regist
}
catch(Exception e){System.out.println(e.ge
}//main
}
c:\javac ServerImpl.java
c:\rmic ServerImpl
c:\java ServerImpl
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
actullay i've included some thing in that code i've cleared that error.
that's given below
Naming.rebind("myserv",ins ); instead of this i've changed this to
Naming.bind("//localhost/m yserv",ins );
i got correctly
that's given below
Naming.rebind("myserv",ins
Naming.bind("//localhost/m
i got correctly
Instead of e.getMessage(),
give e.printStackTrace() and give the fll exception details