Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

Vikaskarn avatar image
Vikaskarn asked ·

Getting error "no viable alternative at character"

Hi Team, I am getting "error while preparing a query in cassandra 33562624 no viable alternative at character" while updating tables metadata in SAS application. Any suggestion.

cql
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

smadhavan avatar image
smadhavan answered ·

@Vikaskarn, there is not enough information on this question to be able to help triage this. Please go ahead and update your original question with the version of Cassandra that you're running, the version of java driver that you're using, complete exception stack trace from both the client application as well as from the Cassandra node's system.log file(s), any sample snippet of code to reproduce the same will also be helpful with this triage.

I am going to take a guess here. It looks like an extended or special character has been inadvertently included in the CQL statement. If you've copied and pasted the schema definition on a Windows machine from a file such as a Word document, make sure you clean it up first. For example, you can paste the schema into Notepad and save it as a text file then use that file as your source.

2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

@smadhavan : Thanks for your response. I troubleshoot the issue after adding UTF-8 encoding in my system environment variable file. I am able to see all the tables of Cassandra DB in my SAS tool. One more time, thanks a lot for attending my query.

[Post converted to comment since it's not an "answer"]

0 Likes 0 ·

Good to know you've gotten it to work, @Vikaskarn!

0 Likes 0 ·