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: NPE in running "ClientOnlyExample"
Date Sun, 17 Feb 2013 16:19:04 GMT
This is a bad example to follow. This is the internal client the
Cassandra nodes use to talk to each other (fat client) usually you do
not use this unless you want to write some embedded code on the
Cassandra server.

Typically clients use thrift/native transport. But you are likely
getting the error you are seeing because the keyspace or column family
is not created yet.

On Sat, Feb 16, 2013 at 11:41 PM, Jain Rahul <jainr@ivycomptech.com> wrote:
> Hi All,
>
>
>
> I am newbie to Cassandra and trying to run an example program
> “ClientOnlyExample”  taken from
> https://raw.github.com/apache/cassandra/cassandra-1.2/examples/client_only/src/ClientOnlyExample.java.
> But while executing  the program it gives me a null pointer exception. Can
> you guys please help me out what I am missing.
>
>
>
> I am using Cassandra 1.2.1 version. I have pasted the logs at
> http://pastebin.com/pmADWCYe
>
>
>
> Exception in thread "main" java.lang.NullPointerException
>
>       at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:71)
>
>       at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:66)
>
>       at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:61)
>
>       at org.apache.cassandra.db.ColumnFamily.create(ColumnFamily.java:56)
>
>       at org.apache.cassandra.db.RowMutation.add(RowMutation.java:183)
>
>       at org.apache.cassandra.db.RowMutation.add(RowMutation.java:204)
>
>       at ClientOnlyExample.testWriting(ClientOnlyExample.java:78)
>
>       at ClientOnlyExample.main(ClientOnlyExample.java:135)
>
>
>
> Regards,
>
> Rahul
>
> This email and any attachments are confidential, and may be legally
> privileged and protected by copyright. If you are not the intended recipient
> dissemination or copying of this email is prohibited. If you have received
> this in error, please notify the sender by replying by email and then delete
> the email completely from your system. Any views or opinions are solely
> those of the sender. This communication is not intended to form a binding
> contract unless expressly indicated to the contrary and properly authorised.
> Any actions taken on the basis of this email are at the recipient's own
> risk.

Mime
View raw message