Solved

RMI Exception

Posted on 2000-05-12
3
286 Views
Last Modified: 2013-12-29
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("registered");
  }
  catch(Exception e){System.out.println(e.getMessage();}
}//main

}

c:\javac ServerImpl.java
c:\rmic ServerImpl
c:\java ServerImpl
0
Comment
Question by:jaki_77
3 Comments
 
LVL 7

Expert Comment

by:Ravindra76
ID: 2804803

Instead of e.getMessage(),

give e.printStackTrace() and give the fll exception details
0
 
LVL 3

Accepted Solution

by:
Laminamia063099 earned 100 total points
ID: 2805226
First, you have to start the rmi-registry:
c:\rmiregistry

Also, make sure that the stub and skeleton class files are found in your classpath before you do this.

Laminamia :)
0
 

Author Comment

by:jaki_77
ID: 2806623
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/myserv",ins);

i got correctly


0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
The viewer will learn how to implement Singleton Design Pattern in Java.

679 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question