OSGI,OSGI - 捆绑和Hazelcast反序列化类未找到异常

时间:2014-10-26 08:06:21

标签: java osgi classloader hazelcast osgi-bundle

我的问题是

我有两个osgi包,其中一个包有hazelcast(3.3版)jar并且我已经导出了所有包...这意味着另一个包可以使用第一个包中可用的所有hazelcast包。 / p>

所以我的计划是,      - >一捆用于将淡褐色罐子保持为普通捆绑。      - >其他包用于执行业务操作,其中第一个包将是依赖包,

我有hazelcast xml,其中有一个序列化工厂映射。

注意:序列化工厂类在其他bundle中(不在hazelcast jar包中),那么当我启动hazelcast服务器时会发生这种情况,它清楚地表明找不到序列化工厂类。

com.hazelcast.nio.serialization.HazelcastSerializationException: java.lang.ClassNotFoundException: com.test.beans.SerializableFactory
at com.hazelcast.nio.serialization.SerializationServiceBuilder.buildDataSerializableFactories(SerializationServiceBuilder.java:290)
at com.hazelcast.nio.serialization.SerializationServiceBuilder.addConfigDataSerializableFactories(SerializationServiceBuilder.java:247)
at com.hazelcast.nio.serialization.SerializationServiceBuilder.build(SerializationServiceBuilder.java:169)
at com.hazelcast.instance.Node.createSerializationService(Node.java:193)
at com.hazelcast.instance.Node.<init>(Node.java:140)
at com.hazelcast.instance.HazelcastInstanceImpl.<init>(HazelcastInstanceImpl.java:120)
at com.hazelcast.instance.HazelcastInstanceFactory.constructHazelcastInstance(HazelcastInstanceFactory.java:153)
at com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:136)
at com.hazelcast.instance.HazelcastInstanceFactory.newHazelcastInstance(HazelcastInstanceFactory.java:112)
at com.hazelcast.core.Hazelcast.newHazelcastInstance(Hazelcast.java:58)

对于您的信息,我已尝试 config.setClassloader

0 个答案:

没有答案