Please note: Hazelcast when loaded on OSGi, it always uses the com.hazelcast.osgi.HazelcastOSGiService service and injects HazelcastOSGiServiceImpl.
But I saw the io.vertx.hazelcast needed to be wrapped as it is not an OSGi compliant bundle, which when done exports dependencies fine.
Now, When I execute, using the send("destination",{}) and consumer("destination",{}) It works only once (i.e the first message), followed by class not found exceptions.
Initially I suspected it could be because of the different bundle classloaders, but I have both the send and consumer within the same java function inside a verticle.
Sep 07, 2016 8:05:16 AM com.hazelcast.spi.impl.eventservice.impl.EventServiceImpl
SEVERE: [192.16.10.108]:5701 [dev] [3.6.3] hz._hzInstance_1_dev.event-4 caught an exception while processing task:com.hazelcast.spi.impl.eventservice.impl.LocalEventDispatcher@694ffb37
com.hazelcast.nio.serialization.HazelcastSerializationException: Problem while reading DataSerializable, namespace: 0, id: 0, class: 'io.vertx.spi.cluster.hazelcast.impl.HazelcastServerID', exception: io.vertx.spi.cluster.hazelcast.impl.HazelcastServerID
at com.hazelcast.internal.serialization.impl.DataSerializer.read(DataSerializer.java:130)
at com.hazelcast.internal.serialization.impl.DataSerializer.read(DataSerializer.java:47)
at com.hazelcast.internal.serialization.impl.StreamSerializerAdapter.read(StreamSerializerAdapter.java:46)
at com.hazelcast.internal.serialization.impl.AbstractSerializationService.toObject(AbstractSerializationService.java:170)
at com.hazelcast.map.impl.DataAwareEntryEvent.getValue(DataAwareEntryEvent.java:90)
at io.vertx.spi.cluster.hazelcast.impl.HazelcastAsyncMultiMap.entryAdded(HazelcastAsyncMultiMap.java:128)
at com.hazelcast.multimap.impl.MultiMapEventsDispatcher.dispatch0(MultiMapEventsDispatcher.java:108)
at com.hazelcast.multimap.impl.MultiMapEventsDispatcher.dispatchEntryEventData(MultiMapEventsDispatcher.java:84)
at com.hazelcast.multimap.impl.MultiMapEventsDispatcher.dispatchEvent(MultiMapEventsDispatcher.java:55)
at com.hazelcast.multimap.impl.MultiMapService.dispatchEvent(MultiMapService.java:371)
at com.hazelcast.multimap.impl.MultiMapService.dispatchEvent(MultiMapService.java:65)
at com.hazelcast.spi.impl.eventservice.impl.LocalEventDispatcher.run(LocalEventDispatcher.java:56)
at com.hazelcast.util.executor.StripedExecutor$Worker.process(StripedExecutor.java:187)
at com.hazelcast.util.executor.StripedExecutor$Worker.run(StripedExecutor.java:171)
Caused by: java.lang.ClassNotFoundException: io.vertx.spi.cluster.hazelcast.impl.HazelcastServerID
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at com.hazelcast.nio.ClassLoaderUtil.tryLoadClass(ClassLoaderUtil.java:137)
at com.hazelcast.nio.ClassLoaderUtil.loadClass(ClassLoaderUtil.java:115)
at com.hazelcast.nio.ClassLoaderUtil.newInstance(ClassLoaderUtil.java:68)
at com.hazelcast.internal.serialization.impl.DataSerializer.read(DataSerializer.java:119)
... 13 more
Since, I couldn't make much progress, I'm thinking of upgrading hazelcast to 3.7. Any use you think?
Dixie.