Hi Andrea - It looks like you're trying to connect to the HTTP port with the protobufs client. When I replace port 8098 with 8087 in this sample code, it works fine.
Hope that helps, Andy On Wed, Nov 3, 2010 at 12:50 PM, Andrea Campolonghi <[email protected]>wrote: > Hi, > > I am trying to use the riak-java-pb-client. > Sample very very basic code > > public static void main(String[] args) { > try{ > RiakClient rc = new RiakClient("localhost",8098); > String bucket = "bucket"; > String key = "key"; > String val = "test"; > RiakObject ro = new RiakObject(bucket,key,val); > rc.store(ro); > > RiakObject[] ros = rc.fetch(bucket, key); > for(RiakObject r : ros){ > System.out.println(r.toString()); > } > > }catch(IOException e){ > e.printStackTrace(); > } > > > Running this simple test code form eclipse rerquire at least 1.5 GB ram. > Lower than this I get an out of memory exception. > > While If I run the code with that huge memory I get this error: > > java.io.EOFException > > at java.io.DataInputStream.readFully(DataInputStream.java:180) > > at java.io.DataInputStream.readFully(DataInputStream.java:152) > > at com.trifork.riak.RiakConnection.receive(RiakConnection.java:89) > > at com.trifork.riak.RiakClient.store(RiakClient.java:384) > > at com.trifork.riak.RiakClient.store(RiakClient.java:363) > > at Runner.main(Runner.java:22) > > > > Any suggestion??? > > > Andrea > > > > -- > Andrea Campolonghi > > Cell : +39 347 2298435 > [email protected] > http://www.andreacfm.com > > Railo Team > [email protected] > http://getrailo.org > > > > _______________________________________________ > riak-users mailing list > [email protected] > http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com > >
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
