aspose file tools
The moose likes Distributed Java and the fly likes Unable to find Skeleton in the rmi invokation Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Distributed Java
Reply Bookmark "Unable to find Skeleton in the rmi invokation" Watch "Unable to find Skeleton in the rmi invokation" New topic
Author

Unable to find Skeleton in the rmi invokation

Jayasri Alaparthi
Ranch Hand

Joined: Aug 14, 2006
Posts: 67
Hello Friends,
I used one interface and implementation class to invoke RMI they are as follows

package com.rmi;
import java.rmi.Remote;
public interface CountRMI extends Remote {

public int sum() throws java.rmi.RemoteException;
public void sum(int _val) throws java.rmi.RemoteException;
public int increment() throws java.rmi.RemoteException;
}

package com.rmi;
import java.rmi.server.UnicastRemoteObject;
import java.rmi.*;


public class CountRMImpl extends UnicastRemoteObject implements CountRMI {
private int sum;

public CountRMImpl(String name) throws RemoteException{
super();
try{
Naming.rebind(name, this);
sum=0;
}
catch(Exception e){
System.out.println("Exception:" + e.getMessage());
e.printStackTrace();
}
}

public int sum() throws RemoteException{
return sum;
}
public void sum(int _val) throws RemoteException{
sum = _val;
}
public int increment() throws RemoteException{
return ++sum;
}


Implementation class, when I compile both and run rmic CountRMImpl I got the following error,

public class CountRMImpl extends UnicastRemoteObject implements CountRMI
^
Error is stated at CountRMI
please help me to over come this.

Thanks,
Bhargavi.
Yohan Liyanage
Ranch Hand

Joined: Aug 17, 2007
Posts: 132

The problem is with the packaging. If you type 'rmic <CLASSNAME>', it will not work because this class is packaged. Instead, go to the base directory of package (where your 'com' directory is), then type 'rmic com.rmi.CountRMImpl'. It will execute the rmi compiler.

Also, there are no "skeletons" in the new RMI, only "stubs". Even though many books use the concept of stub & skeleton for descriptions, in the when you execute rmic, it will only create a stub, which is named as "<classname>_Stub.class".

Hope this will solve your problem.


Yohan Liyanage
http://blog.yohanliyanage.com
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Unable to find Skeleton in the rmi invokation
 
Similar Threads
I need help to create exe file.
I am getting null value insted of system information.
jsp vs rmi
Problem with RMI code?
File Not Bound java.rmi.NotBoundException