java - What can be the reason for the InvalidQueryException: Unknown identifier? -


i have table in cassandra defined columns. have cassandra 2.2.0 , camel 2.17.1.

cassandra@cqlsh> describe table logkeyspace.mytable  create table logkeyspace.mytable (     id text,     timestamp timestamp,     col03 text,     col04 text,     col05 text,     col06 text,     col07 text,     col08 text,     col09 text,     col10 text,     col11 text,     primary key (id, timestamp) ) clustering order (timestamp asc)     , bloom_filter_fp_chance = 0.01     ...     , speculative_retry = '99.0percentile'; create index mytable_idx_07 on logkeyspace.mytable (col07); create index mytable_idx_09 on logkeyspace.mytable (col09); 

command (with other order of columns):

cassandra@cqlsh> insert logkeyspace.mytable(id,timestamp,col11,col08,col06,col03,col07,col09,col04,col10,col05) values ('1',dateof(now()),'tnt','sol','fb','cs','rt','st','h','s','p'); 

works well.

but same query fired camel cassandra end point ended exception:

java.util.concurrent.executionexception: com.datastax.driver.core.exceptions.invalidqueryexception: unknown identifier col09

only col09 not known.

this column added later using alter table logkeyspace.mytable add col09; cql command.

i had checked, when remove col09, works fine, not problem e.g. length of parameters list.

where search problem, might root cause of this?

the important part of stacktrace is:

caused by: com.datastax.driver.core.exceptions.invalidqueryexception: unknown identifier col09         @ com.datastax.driver.core.exceptions.invalidqueryexception.copy(invalidqueryexception.java:50)          @ com.datastax.driver.core.driverthrowables.propagatecause(driverthrowables.java:37)          @ com.datastax.driver.core.abstractsession.prepare(abstractsession.java:79)          @ org.apache.camel.component.cassandra.cassandraendpoint.preparestatement(cassandraendpoint.java:169)          @ org.apache.camel.component.cassandra.cassandraendpoint.preparestatement(cassandraendpoint.java:180)          @ org.apache.camel.component.cassandra.cassandraproducer.dostart(cassandraproducer.java:55)          @ org.apache.camel.support.servicesupport.start(servicesupport.java:61)          @ org.apache.camel.impl.defaultcamelcontext.startservice(defaultcamelcontext.java:3275)          @ org.apache.camel.impl.defaultcamelcontext.doaddservice(defaultcamelcontext.java:1243)          @ org.apache.camel.impl.defaultcamelcontext.addservice(defaultcamelcontext.java:1204)          @ org.apache.camel.impl.producercache.dogetproducer(producercache.java:442)          ... 73 more caused by: com.datastax.driver.core.exceptions.invalidqueryexception: unknown identifier col09         @ com.datastax.driver.core.responses$error.asexception(responses.java:102)          @ com.datastax.driver.core.sessionmanager$4.apply(sessionmanager.java:205)          @ com.datastax.driver.core.sessionmanager$4.apply(sessionmanager.java:182) 


Comments