user2032027
user2032027

Reputation: 51

Getting cassandra connection error

I am unable to connect to Cassandra (ver2.0.5) using Eclipse. Here is the complete log from the error:

16:06:59.818 [main] WARN c.d.driver.core.FrameCompressor - Cannot find Snappy class, you should make sure the Snappy library is in the classpath if you intend to use it. Snappy compression will not be available for the protocol.

[...] omitted for brevity

Upvotes: 4

Views: 7651

Answers (3)

Ric
Ric

Reputation: 21

I just hit the same problems, seems due to some update of the libs. Here is my solution, by adding these dependencies in the POM.xml.

groupid/ artifactId/version:

  • com.datastax.cassandra cassandra-driver-core 2.1.0
  • com.google.guava guava 16.0.1 io.netty netty 3.9.0.Final
  • com.codahale.metrics metrics-core 3.0.2
  • org.slf4j slf4j-api 1.7.5
  • org.slf4j slf4j-simple 1.6.1
  • net.jpountz.lz4 lz4 1.2.0
  • org.xerial.snappy snappy-java 1.1.1.3

The last 3 are not mentioned in the Datastax user manual but reminded in the compiling process. Just try!

Upvotes: 2

lilott8
lilott8

Reputation: 1116

Use maven to import snappy/lz4 or whatever other compression your using.

LZ4

Snappy

Upvotes: 11

Jay
Jay

Reputation: 20126

You are missing files from your class path. Depending on which driver you are using, you need to ensure you are including all dependent JAR files.

Tthe Datastax 2.0 driver has less dependencies, the 1.x series has more. 1.x depends on basically all the cassandra jar files.

Upvotes: 0

Related Questions