incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward Capriolo <edlinuxg...@gmail.com>
Subject Re: JDBC, Select * Cql2 vs Cql3 problem ?
Date Wed, 30 Jan 2013 14:26:50 GMT
Darn auto correct cql2 , is only good for compact tables. Make sure you are
setting you cql version. Or frankly just switch to Hector / thrift and use
things that are know to work for years now.

On Wednesday, January 30, 2013, Edward Capriolo <edlinuxguru@gmail.com>
wrote:
> You really can't mix cql2 and cql3. Cql2 does not understand cql3s sparse
tables. Technically it ,barfs all over the place. Cql2 is only good for
contact tables.
>
> On Wednesday, January 30, 2013, Andy Cobley <
acobley@computing.dundee.ac.uk> wrote:
>> Well this is getting stranger,   for me  with this simple table
definition,
>> select key,gender from users
>> is also failing with a null pointer exception
>> Andy
>> On 29 Jan 2013, at 13:50, Andy Cobley <acobley@computing.dundee.ac.uk>
wrote:
>>
>> When connecting to Cassandra 1.2.0 from CQLSH the table was created with:
>> CREATE KEYSPACE test WITH replication = {'class': 'SimpleStrategy',
'replication_factor' : 1};
>> cqlsh> use test;
>> cqlsh:test> create columnfamily users (KEY varchar Primary key, password
varchar, gender varchar) ;
>> cqlsh:test> INSERT INTO users (KEY, password) VALUES ('jsmith',
'ch@ngem3a');
>> cqlsh:test> INSERT INTO users (KEY, gender) VALUES ('jbrown', 'male');
>> stack trace (generated et.printStackTrace()) is:
>> Can not execute statement java.lang.NullPointerException
>> at org.apache.cassandra.cql.jdbc.TypedColumn.<init>(TypedColumn.java:45)
>> at
org.apache.cassandra.cql.jdbc.CassandraResultSet.createColumn(CassandraResultSet.java:972)
>> at
org.apache.cassandra.cql.jdbc.CassandraResultSet.populateColumns(CassandraResultSet.java:156)
>> at
org.apache.cassandra.cql.jdbc.CassandraResultSet.<init>(CassandraResultSet.java:130)
>> at
org.apache.cassandra.cql.jdbc.CassandraStatement.doExecute(CassandraStatement.java:167)
>> at
org.apache.cassandra.cql.jdbc.CassandraStatement.executeQuery(CassandraStatement.java:227)
>> at uk.ac.dundee.computing.aec.test.test.doGet(test.java:51)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
>> at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
>> at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
>> at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>> at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
>> at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
>> at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:
>>
>> The University of Dundee is a Scottish Registered Charity, No. SC015096.

Mime
View raw message