incubator-cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aaron morton <aa...@thelastpickle.com>
Subject Re: JDBC : CreateresultSet fails with null column in CqlResultSet
Date Fri, 01 Feb 2013 18:01:58 GMT
I think http://code.google.com/a/apache-extras.org/p/cassandra-jdbc/issues/list is the place
to raise the issue. 

Can you update the mail thread with the ticket as well?

Thanks

-----------------
Aaron Morton
Freelance Cassandra Developer
New Zealand

@aaronmorton
http://www.thelastpickle.com

On 1/02/2013, at 3:25 AM, Andy Cobley <acobley@computing.dundee.ac.uk> wrote:

> As you may be aware I've been trying to track down a problem using JDBC 1.1.2 with Cassandra
1.2.0  I was getting a null pointer exception in the result set.  I've done some digging into
the JDBC driver  and found the following.
> 
> In CassandraResultSet.java the new result set is Instantiated in 
> 
> CassandraResultSet(Statement statement, CqlResult resultSet, String keyspace)
> 
> I decided to trace the result set with the following code:
> 
> rowsIterator = resultSet.getRowsIterator();
>        System.out.println("-------------------------------");
>        while(rowsIterator.hasNext()){
>           CqlRow row = rowsIterator.next();
>           curRowKey = row.getKey();
>           System.out.println("Row Key "+curRowKey);
>           List<Column> cols = row.getColumns();
>           Iterator<Column> iterator;
>           iterator = cols.iterator();     
> 	   while (iterator.hasNext()){
> 	       Column col=(Column)iterator.next();
> 	       String Name= new String(col.getName());
>               String Value = new String(col.getValue());
> 	       System.out.println("Col "+Name+ " : "+Value);
> 	        }
>        }
> 
> This produced the following output:
> 
> -------------------------------
> Row Key [B@617e53c9
> Col key : jsmith
> Col : 
> Col password : ch@ngem3a
> Row Key [B@2caee320
> Col key : jbrown
> Col : 
> Col gender : male
> -------------------------------
> 
> As you can see there is a black column at position 2 in each of the rows.  As this resultset
has come from the Cassandra thrift client ( I believe) the problem amy lay there.  There is
no blank column defined by my SQL create statements I believe. 
> 
> If I'm correct here, should I raise a ticket with JDBC or Cassandra ? (for now I've patched
my local JDBC driver so it doesn't create a TypedColumn if the result set produces a null
column)
> 
> Andy
> 
> 
> The University of Dundee is a Scottish Registered Charity, No. SC015096.
> 
> 


Mime
View raw message