Forum Home » Fuse Distributions » Fuse ESB

Thread: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle [servic

 

Permlink Replies: 9 - Last Post: Jun 18, 2013 6:28 AM Last Post By: tothekaushal
jpepalmero

Posts: 53
Registered: 11/24/11
net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle [servic
Posted: Jun 14, 2012 2:58 PM
  Click to reply to this thread Reply
This is my problem:

rred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle servicemix-cxf-se (no security manager: RMI class loader disabled)
at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:155)
at org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker.createFault(AbstractJAXWSMethodInvoker.java:86)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:121)
at org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:61)
at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:75)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
at org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:106)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
at org.apache.cxf.transport.jbi.JBIDispatcherUtil.dispatch(JBIDispatcherUtil.java:156)
at org.apache.servicemix.cxfse.CxfSeEndpoint.process(CxfSeEndpoint.java:518)
at org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:630)
at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:587)
at org.apache.servicemix.common.AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:485)
at org.apache.servicemix.common.AsyncBaseLifeCycle$2.run(AsyncBaseLifeCycle.java:360)
at org.apache.servicemix.executors.impl.ExecutorImpl$1.run(ExecutorImpl.java:64)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //myserver:46046/cacheDistribuida. Initial cause was RemoteException occurred in server thread; nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle servicemix-cxf-se (no security manager: RMI class loader disabled)
at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:538)
at net.sf.ehcache.event.CacheManagerEventListenerRegistry.notifyCacheAdded(CacheManagerEventListenerRegistry.java:159)
at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:1172)
at net.sf.ehcache.CacheManager.addConfiguredCaches(CacheManager.java:708)
at net.sf.ehcache.CacheManager.doInit(CacheManager.java:426)
at net.sf.ehcache.CacheManager.init(CacheManager.java:352)
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:237)
at net.sf.ehcache.CacheManager.create(CacheManager.java:856)
at net.sf.ehcache.CacheManager.create(CacheManager.java:800)
at
java.lang.ClassNotFoundException: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle servicemix-cxf-se (no security manager: RMI class loader disabled)
at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:396)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:250)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:255)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:233)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:359)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
at net.sf.ehcache.distribution.RMICacheManagerPeerListener.bind(RMICacheManagerPeerListener.java:234)
at net.sf.ehcache.distribution.RMICacheManagerPeerListener.notifyCacheAdded(RMICacheManagerPeerListener.java:536)
... 38 more
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:
java.lang.ClassNotFoundException: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle servicemix-cxf-se (no security manager: RMI class loader disabled)
at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)

Edited by: jpepalmero on Jun 17, 2012 8:52 AM
dstanley

Posts: 124
Registered: 08/17/07
Re: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle [servic
Posted: Jun 14, 2012 5:51 PM   in response to: jpepalmero in response to: jpepalmero
  Click to reply to this thread Reply
This issue looks similar but is not currently reproducible.

http://fusesource.com/issues/browse/ENTESB-174

Can you provide some steps to reproduce? What version of the ESB are you using.

Regards
/Dave

Edited by: dstanley on Jun 14, 2012 5:51 PM
jpepalmero

Posts: 53
Registered: 11/24/11
Re: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle [servic
Posted: Jun 14, 2012 7:54 PM   in response to: dstanley in response to: dstanley
  Click to reply to this thread Reply
My version is 4.4.1

Edited by: jpepalmero on Jun 14, 2012 7:54 PM
jpepalmero

Posts: 53
Registered: 11/24/11
Re: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle [servic
Posted: Jun 15, 2012 8:05 AM   in response to: jpepalmero in response to: jpepalmero
  Click to reply to this thread Reply
It could be a problem like this:

http://svn.apache.org/viewvc/servicemix/components/engines/servicemix-cxf-se/trunk/pom.xml?r1=953235&r2=960493&pathrev=960493&diff_format=h
ffang

Posts: 1,320
Registered: 12/24/07
Re: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle [servic
Posted: Jun 15, 2012 8:45 AM   in response to: jpepalmero in response to: jpepalmero
  Click to reply to this thread Reply
No, I don't think so.

The exception you run into more related to
no security manager: RMI class loader disabled

So add exta package-import won't fix it, especially servicemix-cxf-se won't use net.sf.ehcache.distribution.

Anyway, you can try to add Package-Import net.sf.ehcache.distribution for your customer bundle to see if it can make any difference.

Otherwise could you provide a test project which we can build and reproduce this issue?

Freeman
jpepalmero

Posts: 53
Registered: 11/24/11
Re: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle [servic
Posted: Jun 18, 2012 2:28 PM   in response to: ffang in response to: ffang
  Click to reply to this thread Reply
This is the ehcache implementation that gives the error.
ffang

Posts: 1,320
Registered: 12/24/07
Re: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle [servic
Posted: Jun 20, 2012 1:06 AM   in response to: jpepalmero in response to: jpepalmero
  Click to reply to this thread Reply
Hi,

I may miss something but I can't see any exception when I install/start the bundle building from your testcase to FUSE ESB, also I can't see your testcase use any servicemix-cxf-se related stuff.

Could you elaborate the steps to reproduce the exception? Also please tell us the exact FUSE ESB 4.4.1 version you're using.

Freeman
jpepalmero

Posts: 53
Registered: 11/24/11
Re: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle [servic
Posted: Jun 20, 2012 7:58 AM   in response to: ffang in response to: ffang
  Click to reply to this thread Reply
When I invoke the method getCache () produces the error described.
tothekaushal

Posts: 7
Registered: 06/11/13
Re: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle [servic
Posted: Jun 14, 2013 10:45 AM   in response to: jpepalmero in response to: jpepalmero
  Click to reply to this thread Reply
Hi,
I am also facing same issue, After a lot of analysis i came to know that RMI resigry is not started for fuse or you can say RMI is not loaded on fuse.

Can anyone tell me that how can start the RMI feature or start rmiregistry on fuse system ?

We can do on java side by below code:
System.setSecurityManager(new RMISecurityManager());

But this not work for fuse, basically Fuse jvm not able to set rmi registry that why its not able to load classes which is on different port/cluster.

Please correct me if i m wrong...
Please reply as soon as u can ... any thoughts are welcome :)

Edited by: tothekaushal on Jun 14, 2013 4:30 PM

tothekaushal

Posts: 7
Registered: 06/11/13
Re: net.sf.ehcache.distribution.RMICachePeer_Stub not found from bundle [servic
Posted: Jun 18, 2013 6:28 AM   in response to: tothekaushal in response to: tothekaushal
  Click to reply to this thread Reply
Thanks GOD!!!

Finally my issue resolved...
Only i change my ehcache jar verrion. Just use ehcache2.7.1 and got solution :)