Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8731481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T09:14:59+00:00 2026-06-13T09:14:59+00:00

I am getting the following error when I connect to the Apache Cassandra database

  • 0

I am getting the following error when I connect to the Apache Cassandra database using CQL JDBC driver (cassandra-jdbc-1.1.2). I am getting the error only when I’m trying to execute UPDATE statement, SELECTs are working fine. Also I can connect to cassandra using cqlsh.

java.sql.SQLNonTransientConnectionException: org.apache.thrift.transport.TTransportException
    at org.apache.cassandra.cql.jdbc.CassandraStatement.doExecute(CassandraStatement.java:195)
    at org.apache.cassandra.cql.jdbc.CassandraStatement.execute(CassandraStatement.java:203)
    at com.concordusa.complete.dao.cassandra.keygen.MessageKeyGenerator.updateHighKeyInDatabase(MessageKeyGenerator.java:69)
    at com.concordusa.complete.dao.cassandra.keygen.MessageKeyGenerator.getNextHighKeyValue(MessageKeyGenerator.java:44)
    at com.concordusa.complete.dao.cassandra.keygen.MessageKeyGenerator.getKey(MessageKeyGenerator.java:30)
    at com.concordusa.complete.dao.cassandra.keygen.MessageKeyGenerator.main(MessageKeyGenerator.java:85)
Caused by: org.apache.thrift.transport.TTransportException
    at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:132)
    at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
    at org.apache.thrift.transport.TFramedTransport.readFrame(TFramedTransport.java:129)
    at org.apache.thrift.transport.TFramedTransport.read(TFramedTransport.java:101)
    at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
    at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
    at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
    at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
    at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
    at org.apache.cassandra.thrift.Cassandra$Client.recv_execute_cql_query(Cassandra.java:1402)
    at org.apache.cassandra.thrift.Cassandra$Client.execute_cql_query(Cassandra.java:1388)
    at org.apache.cassandra.cql.jdbc.CassandraConnection.execute(CassandraConnection.java:397)
    at org.apache.cassandra.cql.jdbc.CassandraConnection.execute(CassandraConnection.java:421)
    at org.apache.cassandra.cql.jdbc.CassandraStatement.doExecute(CassandraStatement.java:161)
    ... 5 more

I wasn’t experiencing this problem when I was using cassandra 1.0.7. I updated cassandra to 1.1.6 because versions prior to 1.1.* do not support prepared statements.

Thanks in advance!

EDIT: Here’s what I have in the server log:

    ERROR [Thrift:13] 2012-10-23 14:50:24,327 CustomTThreadPoolServer.java (line 204) Error occurred during processing of message.
java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
    at java.util.ArrayList.get(ArrayList.java:322)
    at org.apache.cassandra.cql.Term.getByteBuffer(Term.java:102)
    at org.apache.cassandra.cql.UpdateStatement.mutationForKey(UpdateStatement.java:206)
    at org.apache.cassandra.cql.UpdateStatement.prepareRowMutations(UpdateStatement.java:166)
    at org.apache.cassandra.cql.UpdateStatement.prepareRowMutations(UpdateStatement.java:130)
    at org.apache.cassandra.cql.QueryProcessor.batchUpdate(QueryProcessor.java:256)
    at org.apache.cassandra.cql.QueryProcessor.processStatement(QueryProcessor.java:596)
    at org.apache.cassandra.cql.QueryProcessor.process(QueryProcessor.java:879)
    at org.apache.cassandra.thrift.CassandraServer.execute_cql_query(CassandraServer.java:1240)
    at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3542)
    at org.apache.cassandra.thrift.Cassandra$Processor$execute_cql_query.getResult(Cassandra.java:3530)
    at org.apache.thrift.ProcessFunction.process(ProcessFunction.java:32)
    at org.apache.thrift.TBaseProcessor.process(TBaseProcessor.java:34)
    at org.apache.cassandra.thrift.CustomTThreadPoolServer$WorkerProcess.run(CustomTThreadPoolServer.java:186)
    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)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T09:15:00+00:00Added an answer on June 13, 2026 at 9:15 am

    It seems that my question was nonsence. Here’s my code:

    PreparedStatement stmt = con.prepareStatement(query);
    stmt.setLong(1, key);
    stmt.execute(query);
    

    query is (obiously) String. What fixed the problem is removing query from stmt.execute(query)

    I’m still not sure if the behavior of execute() in such a case is correct.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am getting following error when I am trying to get WebResponse using WebResponse
I am getting following error when i am trying to connect Production DB from
Using DBD::mysql with DBI, I am getting the following error when attempting to connect
I am getting following error while trying to connect to a sftp server:- ncftpput:
Getting following error while connecting to mongodb using Spring Data: java.io.IOException: couldn't connect to
I am getting the following error: Access denied for user 'apache'@'localhost' (using password: NO)
I am trying to send email through gmail using PHPMailer_V5.1. Getting the following error,
Help! I'm getting this error when trying to connect using JAX-WS webservice call: java.lang.NoClassDefFoundError:
I am getting the following error: Database connection failed: mysqlnd cannot connect to MySQL
I am getting the following error trying to connect to a local DB2 instance

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.