Exception in main thread java.lang.NoClassDefFoundError

谁都会走 提交于 2019-12-04 16:46:15
markc

to setup your environment, you'll need the following resources:

  • cassandra-driver-core-2.1.0.jar
  • netty-3.9.0-Final.jar
  • guava-16.0.1.jar
  • metrics-core-3.0.2.jar
  • slf4j-api-1.7.5.jar

(as outlined in this link: http://www.datastax.com/documentation/developer/java-driver/2.1/java-driver/reference/settingUpJavaProgEnv_r.html)

Otherwise you could use Maven if you are using an IDE like Eclipse. See the following link for a dependancy example: http://www.datastax.com/documentation/developer/java-driver/2.1/common/drivers/introduction/driverDependencies_r.html

Note you also need to ensure that the the start_native_transport: true is in your cassandra.yaml configuration file also outlined in the above link.

To install Maven into Eclipse I'd recommend using this excellent step-by-step: Maven in Eclipse: step by step installation

Hope this helps!

You need to have cassandra-driver-core-2.0.1.jar , netty-3.9.0-Final.jar , guava-16.0.1.jar , metrics-core-3.0.2.jar , and slf4j-api-1.7.5.jar on the classpath.

i too faced the same issue but after adding the following jars the issue get resolved, 1. bsh-2.0b4.jar 2. guava-16.0.1.jar 3. jcommander-1.27.jar 4. log4j-1.2.17.jar 5. lz4-1.2.0.jar 6. metrics-core-3.0.2.jar 7. netty-3.9.0.Final 8. slf4j-api-1.7.5.jar 9. slf4j-log4j12-1.7.6.jar 10. snappy-java-1.0.5.jar.

hope this will help you :)

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!