vert-x3 / vertx-zookeeper

Zookeeper based cluster manager implementation
Other
73 stars 67 forks source link

Missing guava lib caused NoClassDefFoundError in 3.9.0 #95

Closed yaoligang closed 4 years ago

yaoligang commented 4 years ago

Issue

I just upgraded vertx-zookeeper to 3.9.0 and found the following errors when launching my verticles:

java.lang.NoClassDefFoundError: com/google/common/base/Function
    at org.apache.curator.framework.CuratorFrameworkFactory$Builder.build(CuratorFrameworkFactory.java:145)
    at io.vertx.spi.cluster.zookeeper.ZookeeperClusterManager.lambda$join$9(ZookeeperClusterManager.java:336)
    at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:316)
    at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function
    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    ... 8 more

The issue is resolved after I manually added guava lib. I do not know why guava was moved to test scope in 3.9.0 but it caused issue now.

Version

3.9.0

vietj commented 4 years ago

looks like a regression we did.

you should add it manually in the meantime.

Julien

On 1 Apr 2020, at 06:38, yaoligang notifications@github.com wrote:

Issue

I just upgraded vertx-zookeeper to 3.9.0 and found the following errors when launching my verticles:

java.lang.NoClassDefFoundError: com/google/common/base/Function at org.apache.curator.framework.CuratorFrameworkFactory$Builder.build(CuratorFrameworkFactory.java:145) at io.vertx.spi.cluster.zookeeper.ZookeeperClusterManager.lambda$join$9(ZookeeperClusterManager.java:336) at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:316) at io.vertx.core.impl.TaskQueue.run(TaskQueue.java:76) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:583) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521) ... 8 more The issue is resolved after I manually added guava lib. I do not know why guava was moved to test scope in 3.9.0 but it caused issue now.

Version

3.9.0

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/vert-x3/vertx-zookeeper/issues/95, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABXDCQEZAOVCKHZRWQZERLRKLAMZANCNFSM4LYNA2LA.