Java Client and Data types

Chris Meiklejohn cmeiklejohn at
Wed Jan 21 05:34:11 EST 2015

On Tue, Jan 20, 2015 at 7:59 PM, Annette Bieniusa <bieniusa at> wrote:
> Hello,
> I am trying to build a small demo app involving the Java Client and the Data types by following the official documentation.
> However, map operations are not working. A fetch with the Java client always returns an empty map, writes create new maps, but they remain empty.
> In the source file that I attached, this yields a null pointer exception when doing the getRegister() in getLastName, for example.

Hi Annette,

I've loaded this code, and when I execute it, I'm getting exceptions
when getVisits() is being called, however, when it's being called,
it's before that field is created -- the constructor of User only sets
the first and last name attributes.  Removing that call prevents the

 at com.basho.riak.client.core.query.crdt.types.RiakMap.getCounter(
 at com.basho.riak.client.core.query.crdt.types.RiakMap.getCounter(
 at com.basho.riak.playground.User.getVisits(
 at com.basho.riak.playground.Main.main(

Removing the getVisits call, yields the following execution:


- Chris

More information about the riak-users mailing list