?
Solved

RMI Exception

Posted on 2000-05-12
3
Medium Priority
?
290 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 300 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

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
This video teaches viewers about errors in exception handling.
Suggested Courses
Course of the Month12 days, 7 hours left to enroll

777 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