2 stark summer stark_summer 于 2014.12.10 22:58 提问

zookeeper java.lang.NoSuchMethodError异常

没找到问题所在 就是在myeclipse有出现 但在IDEA上就没有这个错误 错误如下:
java.lang.NoSuchMethodError: org.apache.zookeeper.ZooKeeper.(Ljava/lang/String;ILorg/apache/zookeeper/Watcher;Z)V
at org.apache.curator.utils.DefaultZookeeperFactory.newZooKeeper(DefaultZookeeperFactory.java:29)
at org.apache.curator.framework.imps.CuratorFrameworkImpl$2.newZooKeeper(CuratorFrameworkImpl.java:160)
at org.apache.curator.HandleHolder$1.getZooKeeper(HandleHolder.java:94)
at org.apache.curator.HandleHolder.getZooKeeper(HandleHolder.java:55)
at org.apache.curator.ConnectionState.reset(ConnectionState.java:218)
at org.apache.curator.ConnectionState.start(ConnectionState.java:102)
at org.apache.curator.CuratorZookeeperClient.start(CuratorZookeeperClient.java:189)
at org.apache.curator.framework.imps.CuratorFrameworkImpl.start(CuratorFrameworkImpl.java:263)
at com.gome.clover.common.zk.ZKConnect.start(ZKConnect.java:55)
at com.gome.clover.common.zk.ServerDict.init(ServerDict.java:51)
at com.gome.clover.common.zk.ServerDict.(ServerDict.java:45)
at com.gome.clover.common.zk.ServerDict.(ServerDict.java:41)
at com.gome.clover.core.module.AbstractModuleScheduler.registerToZK(AbstractModuleScheduler.java:74)
at com.gome.clover.core.module.ModuleSchedulerClient.startup(ModuleSchedulerClient.java:76)
at com.gome.clover.server.module.SchedulerClientInitial.init(SchedulerClientInitial.java:77)
at org.apache.catalina.core.StandardWrapper.initServlet(StandardWrapper.java:1284)
at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1197)
at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:1087)
at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:5210)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5493)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1073)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

2个回答

sunbo624
sunbo624   2014.12.12 17:17

看一下myeclipse中你项目的build path

sky_walker85
sky_walker85   Rxr 2014.12.11 08:31

在类路径中看看有没有 org.apache.zookeeper.ZooKeeper这个类的jar包

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!