Cassandra抛出异常:
com.datastax.driver.core.exceptions.InvalidQueryException: Undefined column name permissions at com.datastax.driver.core.exceptions.InvalidQueryException.copy (InvalidQueryException.java:50) at com.datastax.driver.core.DriverThrowables.propagateCause (DriverThrowables.java:37) at com.datastax.driver.core.AbstractSession.prepare (AbstractSession.java:100) at org.accells.connection.CassandraSession.prepare(CassandraSession.java:120)
不幸的是我在网上找不到任何关于此的信息。请指教。 抛出此异常的行是cassandra代码:
/**
* Prepares the provided query string.
*
* @param query the CQL query string to prepare
* @return the prepared statement corresponding to {@code query}.
* @throws NoHostAvailableException if no host in the cluster can be
* contacted successfully to prepare this query.
*/
PreparedStatement prepare(String query);
提供的查询是SQL有效查询。
答案 0 :(得分:2)
此错误告诉您,您尝试查询的表中不存在列permissions
。
它来自这里:
ColumnDefinition def = cfm.getColumnDefinition(id);
if (def == null)
throw new InvalidRequestException(String.format("Undefined column name %s", toString()));
return def;
ColumnDefinition.java
中的(我还没有与代码相关联,因为我不知道您正在运行的版本。