aspose file tools*
The moose likes Distributed Java and the fly likes Stub not found Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Distributed Java
Bookmark "Stub not found" Watch "Stub not found" New topic
Author

Stub not found

Diego Rosso
Greenhorn

Joined: Mar 04, 2005
Posts: 3
Hi all,

I am finding this problem in the startup of the rmi server.

ReportGeneratorImpl Server failed: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: com.aero.mb.rmi.report.ReportGeneratorImpl_Stub
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: com.aero.mb.rmi.report.ReportGeneratorImpl_Stub
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:352)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:207)
at sun.rmi.transport.Transport$1.run(Transport.java:148)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:144)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
...

Could anybody suggest why this is happenning?

thanks.


public interface ReportGenerator extends Remote {
public String make(
int ReportKey,
int customerId,
int branchId,
int vehileId,
int driverId,
int aggregationId,
String reportName,
String reportType,
java.util.Date iniDate,
java.util.Date endDate
) throws RemoteException; }

public class ReportGeneratorImpl extends UnicastRemoteObject implements ReportGenerator {
protected ReportGeneratorImpl() throws RemoteException { super(); }
public String make( int ReportKey , int customerId , int branchId , int vehileId , int driverId , int aggregationId , String reportName , String reportType , Date iniDate , Date endDate ) throws RemoteException { ReportMaker rm = new ReportMaker();
return rm.make( ReportKey , customerId , branchId , vehileId , driverId , aggregationId , reportName , reportType , iniDate , endDate);
}
}

public class ReportServer {
public static void main (String[] argv) {
try {
Naming.rebind("generator", new ReportGeneratorImpl());
System.out.println ("ReportGeneratorImpl Server is ready.");
} catch (Exception e) {
System.out.println ("ReportGeneratorImpl Server failed: " + e.getMessage());
e.printStackTrace();
}
}
}
adrian osullivan
Greenhorn

Joined: Sep 29, 2004
Posts: 6
Looks like your stub is not on the server's classpath. Question - have you generated the stubs? i.e. run rmic?
Diego Rosso
Greenhorn

Joined: Mar 04, 2005
Posts: 3
that is strange
because I executed the rmic and compiled normally.
the stubs had been generated
perhaps the problem has been provoked for server.classpath attribute

[]s
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Stub not found