Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] How to start a RMI service in a bundle of Equinox

Thanks for replying.
My exception is:
-------------------------------------------------------------------
 RemoteException occurred in server thread; nested exception is:
 java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
 java.lang.ClassNotFoundException: org.shuyaji.workflow.api.client.rmi.RMIEngineImpl_Stub
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:
 java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
 java.lang.ClassNotFoundException: org.shuyaji.workflow.api.client.rmi.RMIEngineImpl_Stub
 at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:352)
......
 at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:350)
 at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
 at org.shuyaji.workflow.WorkflowService.start(WorkflowService.java:79)
 at org.shuyaji.workflow.service.Activator.start(Activator.java:17)
-------------------------------------------------------------------
 
And the org.shuyaji.workflow.WorkflowService.start() method code:
-------------------------------------------------------------------
   System.out.println("MyService Name=" + serviceName);
   System.out.println("MyService Port=" + port);
   LocateRegistry.createRegistry(port);
   Registry registry = LocateRegistry.getRegistry(port);
   registry.rebind(serviceName, pt);
-------------------------------------------------------------------
 
>So, if you don't specify reachable URLs (http://, ftp:// et al) in a
>URLClassLoader (not the case in OSGi, I think), then the system property
>java.rmi.server.codebase will be used as the reference to the classes.
I think the URL is specified at the client code,but my bundle just want to start the rmi service during OSGi invoke the bundle's Activator.start() method. Maybe I didn't understand what your meaning is.
 
Another point,when I start the RMI service by invoking the start method of my Activator class in its main function(not the case in OSGi),there isn't any exception throws.
 
Thanks a lot.
 
Best regards,
Jiang_Jian

This message has been scanned for viruses and spam by CVICSE_mail_gate!


Back to the top