2 Replies Latest reply on Jun 18, 2013 2:48 AM by ffang

    Need help to implement ehCache (without terracotta) on cluster environment

    tothekaushal_kumarkaushal.java

      Hi Freinds,

       

      When i am trying to use ehCache for cluster evn, I am getting below errors (Can also find attachment.)

       

      java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is:

       

      java.lang.ClassNotFoundException: net.sf.ehcache.distribution.RMICachePeer_Stub from bundle 235 (AppEntryRoute) (no security manager: RMI class loader disabled)

      net.sf.ehcache.CacheException: Problem starting listener for RMICachePeer //20.198.236.222:50137/rqaflowcache. 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 from bundle 235 (AppEntryRoute) (no security manager: RMI class loader disabled)

       

       

      Can anyone please suggest me how can enable RMI class loader and install security manger in fuse esb?

       

      Somehow i get to know the below code to set Security manager..

         System.setSecurityManager(new RMISecurityManager());

                    System.out.println("Security manager installed.");

      But after setting this, i am getting below errors:

       

      java.security.AccessControlException: access denied (org.osgi.framework.AdminPermission (id=242) metadata)

           at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)

           at java.security.AccessController.checkPermission(AccessController.java:546)

           at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)

           at org.apache.felix.framework.BundleImpl.getHeaders(BundleImpl.java:321)[:]

           at org.apache.felix.framework.BundleImpl.getHeaders(BundleImpl.java:312)[:]

           at org.springframework.osgi.extender.support.internal.ConfigUtils.matchExtenderVersionRange(ConfigUtils.java:112)

           at org.springframework.osgi.extender.internal.activator.ContextLoaderListener.handlerBundleMatchesExtenderVersion(ContextLoaderListener.java:615)

           at org.springframework.osgi.extender.internal.activator.ContextLoaderListener.maybeRemoveNameSpaceHandlerFor(ContextLoaderListener.java:633)

           at org.springframework.osgi.extender.internal.activator.ContextLoaderListener.access$500(ContextLoaderListener.java:139)

           at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$NamespaceBundleLister.handleEvent(ContextLoaderListener.java:204)

           at org.springframework.osgi.extender.internal.activator.ContextLoaderListener$BaseListener.bundleChanged(ContextLoaderListener.java:172)

           at org.apache.felix.framework.util.EventDispatcher$3.run(EventDispatcher.java:863)

           at java.security.AccessController.doPrivileged(Native Method)

           at org.apache.felix.framework.util.EventDispatcher.invokeBundleListenerCallback(EventDispatcher.java:860)[:]

           at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:791)[:]

           at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:515)[:]

           at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4321)[:]

           at org.apache.felix.framework.Felix.startBundle(Felix.java:1949)[:]

           at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:947)[:]

           at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:934)[:]

           at org.fusesource.fabric.agent.DeploymentAgent.updateDeployment(DeploymentAgent.java:686)[:7.0.0.fuse-061]

           at org.fusesource.fabric.agent.DeploymentAgent.doUpdate(DeploymentAgent.java:371)[:7.0.0.fuse-061]

           at org.fusesource.fabric.agent.DeploymentAgent$1.run(DeploymentAgent.java:204)[:7.0.0.fuse-061]

           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_21]

           at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_21]

           at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_21]

           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_21]

           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_21]

           at java.lang.Thread.run(Thread.java:619)[:1.6.0_21]

      2013-06-11 11:04:48,163 | ERROR | agent-1-thread-1 | DeploymentAgent                  | 63 - org.fusesource.fabric.fabric-agent - 7.0.0.fuse-061 | Unable to update agent

      java.security.AccessControlException: access denied (javax.security.auth.AuthPermission getSubject)

           at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)[:1.6.0_21]

           at java.security.AccessController.checkPermission(AccessController.java:546)[:1.6.0_21]

           at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)[:1.6.0_21]

           at javax.security.auth.Subject.getSubject(Subject.java:268)[:1.6.0_21]

           at org.apache.felix.framework.util.EventDispatcher.fireEventAsynchronously(EventDispatcher.java:754)[:]

           at org.apache.felix.framework.util.EventDispatcher.fireBundleEvent(EventDispatcher.java:525)[:]

           at org.apache.felix.framework.Felix.fireBundleEvent(Felix.java:4321)[:]

           at org.apache.felix.framework.Felix.startBundle(Felix.java:1949)[:]

           at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:947)[:]

           at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:934)[:]

           at org.fusesource.fabric.agent.DeploymentAgent.updateDeployment(DeploymentAgent.java:686)[:7.0.0.fuse-061]

           at org.fusesource.fabric.agent.DeploymentAgent.doUpdate(DeploymentAgent.java:371)[:7.0.0.fuse-061]

           at org.fusesource.fabric.agent.DeploymentAgent$1.run(DeploymentAgent.java:204)[:7.0.0.fuse-061]

           at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)[:1.6.0_21]

           at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)[:1.6.0_21]

           at java.util.concurrent.FutureTask.run(FutureTask.java:138)[:1.6.0_21]

           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_21]

           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_21]

           at java.lang.Thread.run(Thread.java:619)[:1.6.0_21]

      2013-06-11 11:04:48,165 | ERROR | agent-1-thread-1 | DeploymentAgent                  | 63 - org.fusesource.fabric.fabric-agent - 7.0.0.fuse-061 | Unable to set provisioning result

      2013-06-11 11:08:17,666 | WARN  | SocketAcceptor-1 | DefaultExceptionMonitor          | 34 - org.apache.mina.core - 2.0.4 | Unexpected exception.

      java.security.AccessControlException: access denied (java.net.SocketPermission 20.198.236.222:54159 accept,resolve)

           at java.security.AccessControlContext.checkPermission(AccessControlContext.java:323)[:1.6.0_21]

           at java.security.AccessController.checkPermission(AccessController.java:546)[:1.6.0_21]

           at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)[:1.6.0_21]

           at java.lang.SecurityManager.checkAccept(SecurityManager.java:1157)[:1.6.0_21]

           at sun.nio.ch.ServerSocketChannelImpl.accept(ServerSocketChannelImpl.java:165)[:1.6.0_21]

           at org.apache.mina.transport.socket.nio.NioSocketAcceptor.accept(NioSocketAcceptor.java:170)[:]

           at org.apache.mina.transport.socket.nio.NioSocketAcceptor.accept(NioSocketAcceptor.java:51)[:]

           at org.apache.mina.core.polling.AbstractPollingIoAcceptor$Acceptor.processHandles(AbstractPollingIoAcceptor.java:501)[:]

           at org.apache.mina.core.polling.AbstractPollingIoAcceptor$Acceptor.run(AbstractPollingIoAcceptor.java:442)[:]

           at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)[:]

           at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)[:1.6.0_21]

           at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)[:1.6.0_21]

           at java.lang.Thread.run(Thread.java:619)[:1.6.0_21]