On Sep 6, 2012, at 2:33 PM, Brian Lalor <
bla...@bravo5.org> wrote:
> This time the embedded Vert.x instance throws an exception when performing an EventBus.publish(), complaining that the class "org.vertx.java.core.eventbus.impl.hazelcast.HazelcastServerID" cannot be found.
It appears I had a class loader conflict with Jenkins. I made a wrapper method for the EventBus publish method which seems to have helped:
static void ebPublish(final String addr, final JsonObject obj) {
ClassLoader oldContextClassLoader =
Thread.currentThread().getContextClassLoader();
Thread.currentThread().setContextClassLoader(PluginImpl.class.getClassLoader());
try {
getVertx().eventBus().publish(addr, obj);
} finally {
Thread.currentThread().setContextClassLoader(oldContextClassLoader);
}
}