camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sathwik <inbox2sath...@gmail.com>
Subject Camel-cassandra component
Date Mon, 10 Apr 2017 14:43:59 GMT
Hi,

I am trying to query Cassandra Db from camel-context. 

Below is the route:

<route=&quot;test&quot;>
    <to uri="cql://127.0.0.1:9042/empdetails?cql=select * from
employee;&amp;consistencyLevel=quorum"/>
</route>

I have included below dependencies:

<dependency>
    <groupId>org.apache.camel</groupId>
    <artifactId>camel-cassandraql</artifactId>
    <version>2.17.1</version>
	</dependency>
	<dependency>
  <groupId>com.datastax.cassandra</groupId>
  <artifactId>cassandra-driver-core</artifactId>
  <version>3.0.0-alpha1</version>
</dependency>

I am facing below exceptions:

by: java.lang.IllegalArgumentException: Prepared statement has only 0
variables, 1 values provided at
com.datastax.driver.core.BoundStatement.bind(BoundStatement.‌​java:140)[556:com.da‌​tastax.driver.core:2‌​.1.5]

Therefore i changed the my route as below:
 <to uri="cql:127.0.0.1:9042/empdetails?cql=select * from employee where
id=2"/>

I am facing below exceptions:
com.datastax.driver.core.exceptions.InvalidQueryException: Invalid amount of
bind variables
    at
com.datastax.driver.core.exceptions.InvalidQueryException.copy(InvalidQueryException.java

Please let me know the cause for this issue.

Thanks,
sathwik






--
View this message in context: http://camel.465427.n5.nabble.com/Camel-cassandra-component-tp5797319.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message