CUD V.1.0 and V.1.1 Common problems

Common problems and errors

I get an error 310

There was an error executing the query: error code: 310 error description: Query returned result error. line 0:-1 no viable alternative at input ‘

This means that Cassandra Driver was unable to understand the CQL query. Normally due to lack of url encoding.

For example instead of requesting: * FROM mytable


PHP has a function named urlencode(); use one similar for the language you’re using before submitting the request to the driver.

I get an error 200: can’t connect to cluster

cassandradriver-error-typicalIn this case the driver is not able to connect to your Cassandra cluster on Check that the Cassandra is up an running there (ps ax | grep cassandra) and that there is no Firewall blocking the incoming connections.

I can’t see accents, ç ć and other specials characters

This is a common encoding problem. Be sure to send the data as UTF-8.

Be sure to show the data, if is a HTML page in charset UTF-8. That is accomplished by setting the appropriate header:

Content-Type: text/html; charset=utf-8

and with a META tag in HEAD:

<meta charset=”UTF-8″>
<title>PHP Cassandra Universal Driver Sample</title>

In the image attached some rows were inserted with a wrong encoding while others where inserted with the right UTF-8 charset.

cassandradriver-common-problems-encoding-utf8Ensure your config is correct before going to Production in order to avoid storing garbage.

In the sample rows 1, 2, 5 were created with wrong encoding.

Leave a Reply

Your email address will not be published. Required fields are marked *