自3.1.6起,hazelcast-client不再支持OSGI了

时间:2014-03-04 15:00:23

标签: osgi hazelcast

我一直在努力解决使用hazelcast和OSGI(equinox)的类加载问题,我希望已经修复了版本3.2-RC1(ClassLoaderUtil)。

我的问题现在是从版本3.1.6开始,hazelcast-client工件的清单不再包含任何包信息,与3.2-RC1相同。

我在问题跟踪器中找不到任何理由,所以我猜这是一个错误?

我的解决方法是在集群节点上使用3.2-RC1和客户端上的3.1.5(我没有类加载问题)不起作用,我得到了这个例外:

15:54:41.002   ERROR [hz.node1.cached.thread-1      ] ClientEngine - [127.0.0.1]:5701 [dev] [3.2-RC1] Unknown field name: 'cId' for ClassDefinition {id: 2, version: 0}
com.hazelcast.nio.serialization.HazelcastSerializationException: Unknown field name: 'cId' for ClassDefinition {id: 2, version: 0}
    at com.hazelcast.nio.serialization.DefaultPortableReader.throwUnknownFieldException(DefaultPortableReader.java:226) ~[hazelcast-3.2-RC1.jar:3.2-RC1]
    at com.hazelcast.nio.serialization.DefaultPortableReader.getPosition(DefaultPortableReader.java:269) ~[hazelcast-3.2-RC1.jar:3.2-RC1]
    at com.hazelcast.nio.serialization.DefaultPortableReader.readInt(DefaultPortableReader.java:71) ~[hazelcast-3.2-RC1.jar:3.2-RC1]
    at com.hazelcast.client.ClientRequest.readPortable(ClientRequest.java:85) ~[hazelcast-3.2-RC1.jar:3.2-RC1]
    at com.hazelcast.nio.serialization.PortableSerializer.read(PortableSerializer.java:99) ~[hazelcast-3.2-RC1.jar:3.2-RC1]
    at com.hazelcast.nio.serialization.PortableSerializer.read(PortableSerializer.java:29) ~[hazelcast-3.2-RC1.jar:3.2-RC1]
    at com.hazelcast.nio.serialization.StreamSerializerAdapter.read(StreamSerializerAdapter.java:59) ~[hazelcast-3.2-RC1.jar:3.2-RC1]
    at com.hazelcast.nio.serialization.SerializationServiceImpl.toObject(SerializationServiceImpl.java:221) ~[hazelcast-3.2-RC1.jar:3.2-RC1]
    at com.hazelcast.client.ClientEngineImpl$ClientPacketProcessor.run(ClientEngineImpl.java:349) ~[hazelcast-3.2-RC1.jar:3.2-RC1]
    at com.hazelcast.util.executor.ManagedExecutorService$Worker.run(ManagedExecutorService.java:178) [hazelcast-3.2-RC1.jar:3.2-RC1]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_45]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_45]
    at java.lang.Thread.run(Thread.java:744) [na:1.7.0_45]
    at com.hazelcast.util.executor.PoolExecutorThreadFactory$ManagedThread.run(PoolExecutorThreadFactory.java:59) [hazelcast-3.2-RC1.jar:3.2-RC1]

2 个答案:

答案 0 :(得分:2)

你是对的,看来hazelcast-client.jar上缺少捆绑信息。正如Peter在3.2中所说的那样,我正在调查它。

克里斯

答案 1 :(得分:0)

客户端版本需要与服务器版本完全相同。因此,您不能将3.1.5客户端与3.2-RC1服务器结合使用。

如果清单文件存在问题,请在此处打开一张票:

https://github.com/hazelcast/hazelcast/issues

如果在3.2发布之前修复,我们就会得到。