0

我已經在3 EC2實例中安裝了openfire,並在所有三個實例中添加了hazelcast插件。所有三個節點都正常工作。但有一段時間,我在stderror日誌中得到這個異常,請幫助我確定爲什麼會發生此異常,並且如何避免此錯誤日誌? ? ?類未找到在集羣環境中的openfire中的Hazelcast插件中的異常

Apr 15, 2015 12:16:18 PM com.hazelcast.spi.OperationService 
SEVERE: [172.31.22.121]:5701 [openfire] java.lang.ClassNotFoundException: com.jivesoftware.util.cache.ClusteredCacheFactory$CallableTask 
com.hazelcast.nio.serialization.HazelcastSerializationException: java.lang.ClassNotFoundException: com.jivesoftware.util.cache.ClusteredCacheFactory$CallableTask 
    at com.hazelcast.nio.serialization.DefaultSerializers$ObjectSerializer.read(Defaul tSerializers.java:190) 
    at com.hazelcast.nio.serialization.StreamSerializerAdapter.read(StreamSerializerAd apter.java:40) 
    at com.hazelcast.nio.serialization.SerializationServiceImpl.readObject(Serializati onServiceImpl.java:276) 
    at com.hazelcast.nio.serialization.ByteArrayObjectDataInput.readObject(ByteArrayOb jectDataInput.java:431) 
    at com.hazelcast.executor.BaseCallableTaskOperation.readInternal(BaseCallableTaskO peration.java:91) 
    at com.hazelcast.spi.Operation.readData(Operation.java:295) 
    at com.hazelcast.nio.serialization.DataSerializer.read(DataSerializer.java:105) 
    at com.hazelcast.nio.serialization.DataSerializer.read(DataSerializer.java:36) 
    at com.hazelcast.nio.serialization.StreamSerializerAdapter.read(StreamSerializerAd apter.java:59) 
    at com.hazelcast.nio.serialization.SerializationServiceImpl.toObject(Serialization ServiceImpl.java:218) 
    at com.hazelcast.spi.impl.NodeEngineImpl.toObject(NodeEngineImpl.java:156) 
    at com.hazelcast.spi.impl.OperationServiceImpl$RemoteOperationProcessor.run(Operat ionServiceImpl.java:724) 
    at com.hazelcast.util.executor.ManagedExecutorService$Worker.run(ManagedExecutorSe rvice.java:166) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 
    at java.lang.Thread.run(Thread.java:745) 
    at com.hazelcast.util.executor.PoolExecutorThreadFactory$ManagedThread.run(PoolExe cutorThreadFactory.java:59) 
Caused by: java.lang.ClassNotFoundException: com.jivesoftware.util.cache.ClusteredCacheFactory$CallableTask 
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366) 
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358) 
    at com.hazelcast.nio.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:83) 
    at com.hazelcast.nio.IOUtil$1.resolveClass(IOUtil.java:77) 
    at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1612) 
    at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1517) 
    at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1771) 
    at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350) 
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) 
    at com.hazelcast.nio.serialization.DefaultSerializers$ObjectSerializer.read(Defaul tSerializers.java:185) 
    ... 16 more 

回答

0

看來你必須在你的Hazelcast集羣中部署一些openfire jar。 Hazelcast由於安全原因不提供遠程類加載(否則每個人都可以注入一切)。

+0

你能否具體說明我需要將哪個jar添加到hazelcast插件jar中,以及我必須添加哪個位置? – udhaya

+0

節點不知道,但我會猜想openfire.jar? – noctarius

+0

我重新啓動了所有3個節點,發現這個異常發生在2.30小時之後,並且每秒拋出一次。這與垃圾收集器有關嗎?是否因爲clusteredcachefactory類被垃圾收集,這就是發生這種異常的原因? – udhaya