ehcache rmi方式缓存同步,报no security manager: RMI class loader disabled

馨馨馨 发布于 2015/08/04 13:13
阅读 3K+
收藏 0
同一个服务器下,两个tomcat,rim 组播,两个分别部署在两个tomcat下,这个实体也有相同的UID,都是1L,但是主要这个实体继承了fastjson的JSONOBJECT,报一下错误


 WARN  net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator - Unable to send message to remote peer.  Message was: RemoteException occurred in server thread; nested exception is: 
 java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
 java.lang.ClassNotFoundException: com.hm.web.sys.manage.model.SysDict (no security manager: RMI class loader disabled)
java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
 java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
 java.lang.ClassNotFoundException: com.hm.web.sys.manage.model.SysDict (no security manager: RMI class loader disabled)
 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:353) ~[na:1.7.0_75]
 at sun.rmi.transport.Transport$2.run(Transport.java:202) ~[na:1.7.0_75]
 at sun.rmi.transport.Transport$2.run(Transport.java:199) ~[na:1.7.0_75]
 at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_75]
 at sun.rmi.transport.Transport.serviceCall(Transport.java:198) ~[na:1.7.0_75]
 at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:567) ~[na:1.7.0_75]
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828) ~[na:1.7.0_75]
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.access$400(TCPTransport.java:619) ~[na:1.7.0_75]
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:684) ~[na:1.7.0_75]
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:681) ~[na:1.7.0_75]
 at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_75]
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:681) ~[na:1.7.0_75]
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_75]
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_75]
 at java.lang.Thread.run(Thread.java:745) ~[na:1.7.0_75]
 at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:275) ~[na:1.7.0_75]
 at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:252) ~[na:1.7.0_75]
 at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:161) ~[na:1.7.0_75]
 at net.sf.ehcache.distribution.RMICachePeer_Stub.send(Unknown Source) ~[ehcache-2.10.0.jar:2.10.0]
 at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.writeReplicationQueue(RMIAsynchronousCacheReplicator.java:314) [ehcache-2.10.0.jar:2.10.0]
 at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.replicationThreadMain(RMIAsynchronousCacheReplicator.java:127) [ehcache-2.10.0.jar:2.10.0]
 at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator.access$000(RMIAsynchronousCacheReplicator.java:58) [ehcache-2.10.0.jar:2.10.0]
 at net.sf.ehcache.distribution.RMIAsynchronousCacheReplicator$ReplicationThread.run(RMIAsynchronousCacheReplicator.java:389) [ehcache-2.10.0.jar:2.10.0]
Caused by: java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
 java.lang.ClassNotFoundException: com.hm.web.sys.manage.model.SysDict (no security manager: RMI class loader disabled)
 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:313) ~[na:1.7.0_75]
 at sun.rmi.transport.Transport$2.run(Transport.java:202) ~[na:1.7.0_75]
 at sun.rmi.transport.Transport$2.run(Transport.java:199) ~[na:1.7.0_75]
 at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_75]
 at sun.rmi.transport.Transport.serviceCall(Transport.java:198) ~[na:1.7.0_75]
 at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:567) ~[na:1.7.0_75]
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:828) ~[na:1.7.0_75]
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.access$400(TCPTransport.java:619) ~[na:1.7.0_75]
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:684) ~[na:1.7.0_75]
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler$1.run(TCPTransport.java:681) ~[na:1.7.0_75]
 at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_75]
 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:681) ~[na:1.7.0_75]
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) ~[na:1.7.0_75]
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) ~[na:1.7.0_75]
 at java.lang.Thread.run(Thread.java:745) ~[na:1.7.0_75]
Caused by: java.lang.ClassNotFoundException: com.hm.web.sys.manage.model.SysDict (no security manager: RMI class loader disabled)
 at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:393) ~[na:1.7.0_75]
 at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:185) ~[na:1.7.0_75]
 at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:637) ~[na:1.7.0_75]
 at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:264) ~[na:1.7.0_75]
 at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:214) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) ~[na:1.7.0_75]
 at java.util.ArrayList.readObject(ArrayList.java:771) ~[na:1.7.0_75]
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_75]
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_75]
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_75]
 at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_75]
 at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.defaultReadObject(ObjectInputStream.java:500) ~[na:1.7.0_75]
 at net.sf.ehcache.Element.readObject(Element.java:884) ~[ehcache-2.10.0.jar:2.10.0]
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_75]
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_75]
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_75]
 at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_75]
 at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) ~[na:1.7.0_75]
 at java.util.ArrayList.readObject(ArrayList.java:771) ~[na:1.7.0_75]
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_75]
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_75]
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_75]
 at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_75]
 at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1017) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1893) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350) ~[na:1.7.0_75]
 at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) ~[na:1.7.0_75]
 at sun.rmi.server.UnicastRef.unmarshalValue(UnicastRef.java:325) ~[na:1.7.0_75]
 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:307) ~[na:1.7.0_75]

 ... 14 common frames omitted


配置如下:

<cacheManagerPeerProviderFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
properties="peerDiscovery=automatic, multicastGroupAddress=230.0.0.1,
multicastGroupPort=40001, timeToLive=32" /> -->


<cacheManagerPeerListenerFactory
class="net.sf.ehcache.distribution.RMICacheManagerPeerListenerFactory" /> 

加载中
返回顶部
顶部