Solved

RMI Exception

Posted on 2000-05-12
3
284 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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Basic Java Case or If-Else statement... 3 50
maven module vs maven project 3 23
ejb on wildfly 5 20
String array comparison 4 34
Java contains several comparison operators (e.g., <, <=, >, >=, ==, !=) that allow you to compare primitive values. However, these operators cannot be used to compare the contents of objects. Interface Comparable is used to allow objects of a cl…
By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Video by: Michael
Viewers learn about how to reduce the potential repetitiveness of coding in main by developing methods to perform specific tasks for their program. Additionally, objects are introduced for the purpose of learning how to call methods in Java. Define …
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…

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