title: cassandra java client throws string index out of range exception
body: <p>I am getting following exception when running a query from Cassandra cql java client.</p>
  
  <pre><code>java.lang.StringIndexOutOfBoundsException: String index out of range: -1
  at java.lang.String.substring(String.java:1949)
  at org.apache.cassandra.cql.jdbc.CassandraResultSet.createColumn(CassandraResultSet.java:1159)
  at org.apache.cassandra.cql.jdbc.CassandraResultSet.populateMetaData(CassandraResultSet.java:220)
  at org.apache.cassandra.cql.jdbc.CassandraResultSet.&lt;init&gt;(CassandraResultSet.java:190)
  at org.apache.cassandra.cql.jdbc.CassandraStatement.doExecute(CassandraStatement.java:169)
  at org.apache.cassandra.cql.jdbc.CassandraStatement.executeQuery(CassandraStatement.java:229)
  at com.jolbox.bonecp.StatementHandle.executeQuery(StatementHandle.java:503)
  at com.wyh.cluster.node.connect.JDBCConnect.query(JDBCConnect.java:77)
  at com.wyh.service.TripWorker.runRouteQuery(TripWorker.java:3557)
  at com.wyh.service.TripWorker.getRouteInfo(TripWorker.java:3495)
  at com.wyh.service.TripWorker.run(TripWorker.java:607)
  at org.jppf.server.node.NodeTaskWrapper.run(NodeTaskWrapper.java:136)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
  at java.util.concurrent.FutureTask.run(FutureTask.java:166)
  at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
  at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
  at java.util.concurrent.FutureTask.run(FutureTask.java:166)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:701)
  </code></pre>
  
  <p>When I look at CassandraResultSet.java:1159 here
  <a href="http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/browse/src/main/java/org/apache/cassandra/cql/jdbc/CassandraResultSet.java?spec=svn3be43d719cf12d92d067c20b3d1c23682c25a304&amp;r=61cefd982fd281f80fbb6485754c8f7831193114" rel="nofollow">http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/source/browse/src/main/java/org/apache/cassandra/cql/jdbc/CassandraResultSet.java?spec=svn3be43d719cf12d92d067c20b3d1c23682c25a304&amp;r=61cefd982fd281f80fbb6485754c8f7831193114</a></p>
  
  <p>It seems more of a bug to me. The cql query which is being generated in the code is working in the cqlsh client. Any workaround for this.</p>
  
  <p><em>UPDATE</em></p>
  
  <p>I am now moved to datastax driver where I am using these jar files.
  <a href="http://www.datastax.com/documentation/developer/java-driver/2.0/java-driver/reference/settingUpJavaProgEnv_r.html" rel="nofollow">http://www.datastax.com/documentation/developer/java-driver/2.0/java-driver/reference/settingUpJavaProgEnv_r.html</a></p>
  
  <p>Now, whenever I am trying to obtain the session I am getting this exception. Surprise to the fact that the method is there in the class.</p>
  
  <pre><code>Caused by: java.lang.NoSuchMethodError: com.google.common.util.concurrent.ListenableFutureTask.create(Ljava/util/concurrent/Callable;)Lcom/google/common/util/concurrent/ListenableFutureTask;
  at com.google.common.util.concurrent.AbstractListeningExecutorService.newTaskFor(AbstractListeningExecutorService.java:46)
  at com.google.common.util.concurrent.AbstractListeningExecutorService.newTaskFor(AbstractListeningExecutorService.java:37)
  at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:131)
  at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:58)
  at com.datastax.driver.core.SessionManager.addOrRenewPool(SessionManager.java:247)
  at com.datastax.driver.core.SessionManager.init(SessionManager.java:66)
  at com.datastax.driver.core.Cluster.connect(Cluster.java:199)
  </code></pre>