Skip to main content

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

I want to migrate my old RMI service into equinox,but I don't know how can I attach -Djava.security.policy=myplicy.properties into the bundle.
Now I attach it to the VM arguments of my Equinox OSGi framework Run item.But when running,an exception throws like this:
--------------------------------------------------
- JDK 1.4+ collections available
- Commons Collections 3.x available
- engine [CoreEngine] has been initialized.
- engine [Engine] has been initialized.
- 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.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)
 at java.lang.Thread.run(Thread.java:534)
 at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
 at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
 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)
 at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:991)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:985)
 at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:966)
 at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:317)
 at org.eclipse.osgi.framework.internal.core.AbstractBundle.resume(AbstractBundle.java:329)
 at org.eclipse.osgi.framework.internal.core.Framework.resumeBundle(Framework.java:1037)
 at org.eclipse.osgi.framework.internal.core.StartLevelManager.resumeBundles(StartLevelManager.java:573)
 at org.eclipse.osgi.framework.internal.core.StartLevelManager.incFWSL(StartLevelManager.java:495)
 at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:275)
 at org.eclipse.osgi.framework.internal.core.StartLevelManager.dispatchEvent(StartLevelManager.java:455)
 at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:189)
 at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:291)
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
 java.lang.ClassNotFoundException: org.shuyaji.workflow.api.client.rmi.RMIEngineImpl_Stub
 at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
 at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:342)
 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)
 at java.lang.Thread.run(Thread.java:534)
Caused by: java.lang.ClassNotFoundException: org.shuyaji.workflow.api.client.rmi.RMIEngineImpl_Stub
 at java.net.URLClassLoader$1.run(URLClassLoader.java:199)
 at java.security.AccessController.doPrivileged(Native Method)
 at java.net.URLClassLoader.findClass(URLClassLoader.java:187)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:289)
 at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
 at java.lang.Class.forName0(Native Method)
 at java.lang.Class.forName(Class.java:219)
 at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:430)
 at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:165)
 at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:631)
 at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:257)
 at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:200)
 at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1513)
 at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1435)
 at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1626)
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1274)
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:324)
 ... 9 more
-----------------------------------------------------------------------
 
If there is any information I can get,it would be very appreciated.
 
Best regards,
Jiang_Jian

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


Back to the top