0

I'm running DSE 3.2.1 and using datastax java driver cassandra-driver-core-1.0.5-dse.jar

Can confirm DSE is up and listener configured:

# lsof -p 27418 |grep -i listen |sed 's/^/    /'
java    27418 alan  202u  IPv4          120289525      0t0       TCP *:48749 (LISTEN)
java    27418 alan  203u  IPv4          120289526      0t0       TCP *:7199 (LISTEN)
java    27418 alan  204u  IPv4          120289527      0t0       TCP *:49952 (LISTEN)
java    27418 alan  209u  IPv4          120291873      0t0       TCP *:8983 (LISTEN)
java    27418 alan  224u  IPv4          120291754      0t0       TCP karma:afs3-fileserver (LISTEN)
java    27418 alan  227u  IPv4          120289911      0t0       TCP *:8009 (LISTEN)
java    27418 alan  259u  IPv4          120291894      0t0       TCP karma:9042 (LISTEN)
java    27418 alan  260u  IPv4          120291895      0t0       TCP karma:9160 (LISTEN)
@karma:conf  grep -i native *yaml |grep -v ^#
start_native_transport: true
native_transport_port: 9042

But cannot connect using this driver. Scala code:

  import com.datastax.driver.core.
  ... 
  def open() {
  logger.info("DatastaxEnterprise cluster host: {} port: {}", host, port)
  cluster = Cluster.builder.addContactPoint(host).withPort(port).build

Getting this excep:

14:55:45.316 [run-main] INFO  DSE - DatastaxEnterprise cluster host: karma port: 9042
14:55:45.791 [run-main] DEBUG com.datastax.driver.core.Cluster - Starting new cluster with contact points [karma/192.168.0.24]
14:55:46.486 [run-main] DEBUG c.d.driver.core.ControlConnection - [Control connection]    Refreshing node list and token map
14:55:47.559 [New I/O worker #1] DEBUG com.datastax.driver.core.Connection - Defuncting connection to karma/192.168.0.24
com.datastax.driver.core.TransportException: [karma/192.168.0.24] Unexpected exception triggered (java.lang.NoSuchMethodError:     com.google.common.collect.Maps.immutableEnumMap(Ljava/util/Map;)Lcom/google/common/collect/ImmutableMap;)
    at     com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:581) [cassandra-driver-core-1.0.5-dse.jar:na]
    at     org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:112) [netty-3.6.6.Final.jar:na] 
...
14:55:47.560 [run-main] DEBUG c.d.driver.core.ControlConnection - [Control connection] error on karma/192.168.0.24 connection (com.datastax.driver.core.TransportException: [karma/192.168.0.24] Unexpected exception triggered (java.lang.NoSuchMethodError: com.google.common.collect.Maps.immutableEnumMap(Ljava/util/Map;)Lcom/google/common/collect/ImmutableMap;)), no more host to try
14:55:47.562 [run-main] DEBUG com.datastax.driver.core.Cluster - Shutting down

Any ideas? Do I use port 9160 or 9042 with this driver? Using reference code examples from here: http://www.datastax.com/documentation/developer/java-driver/1.0/java-driver/quick_start/qsSimpleClientCreate_t.html

TIA, JM.

Erick Ramirez
  • 13,964
  • 1
  • 18
  • 23
Alan Jurgensen
  • 813
  • 11
  • 20
  • I think you need to make sure that you have Guava 14.0.1 in the classpath. – vitalii Feb 15 '14 at 21:52
  • The real problem is SBT is bringing in Guava 13.0.1 instead of 14. I've tried forcing it to use version 14 to no luck. How can I solve it? How can I tell which package is depending on Guava 13. – Alan Jurgensen Feb 16 '14 at 23:47
  • https://github.com/jrudolph/sbt-dependency-graph will visualize dependency tree. See this question on how to exclude wrong dependency http://stackoverflow.com/q/10958215/1573825 – vitalii Feb 17 '14 at 09:04

0 Answers0