Hi Dmitri,

it doesn't happen in my code and it does happen while the riak-client tries to deserialize a fetched object from riak in a "fetch-before-store" (see the stack), I also get this error randomly while trying just to fetch an object from the database.

And if I try to fetch the object from the cmdline I just get a 404. So I would expect the java-client just returns a null-result for this fetch and not to throw an exception.

All my objects are stored using the riak-java-client and the json-serializer.

Ahh, just tested: if I retry it sometimes works, although most of the time still fails (haven't tried with a sleep so far).

Ingo

Am 30.01.2013 16:57, schrieb Dmitri Zagidulin:
Hi Ingo.

It's difficult to diagnose the exact reason without looking at your code.
But that error is a JSON parser error. It gets thrown whenever the code
tries to parse an empty string as a json object.
The general-case solution is to validate your strings or input streams
that you're turning into JSON objects, or to catch an exception when
creating that object and deal with it accordingly.

But again, it's hard to say why it's happening exactly, in your case --
try to determine where in your code that's happening and think of ways
some input or result is empty, and check for that.

Dmitri



On Wed, Jan 30, 2013 at 10:44 AM, Ingo Rockel
<ingo.roc...@bluelionmobile.com <mailto:ingo.roc...@bluelionmobile.com>>
wrote:

    Hi,

    I wrote a java tool to convert part of our data from a
    mysql-database into riak. As this tool is running while our system
    is still up, it needs to replay all modifications done in the mysql
    database, during these modifications I sometimes get this exception
    from the riak client:

    com.basho.riak.client.convert.__ConversionException:
    java.io.EOFException: No content to map to Object due to end of input
    com.basho.riak.client.convert.__ConversionException:
    java.io.EOFException: No content to map to Object due to end of input
             at
    
com.basho.riak.client.convert.__JSONConverter.toDomain(__JSONConverter.java:167)
             at
    
com.basho.riak.client.__operations.FetchObject.__execute(FetchObject.java:110)
             at
    
com.basho.riak.client.__operations.StoreObject.__execute(StoreObject.java:112)
             at
    
com.bluelionmobile.qeep.__messaging.db.impl.__MessageKVImpl.__storeUniqueMessageDto(__MessageKVImpl.java:264)
             at
    
com.bluelionmobile.qeep.__messaging.db.impl.__MessageKVImpl.__createDataFromDTO(__MessageKVImpl.java:138)
             at
    
com.bluelionmobile.qeep.__messaging.db.impl.__MessageKVImpl.__updateDataFromDTO(__MessageKVImpl.java:205)
             at
    
com.bluelionmobile.qeep.__messaging.db.utils.Replay$__ReplayRunner.run(Replay.java:__243)
             at java.lang.Thread.run(Thread.__java:722)
    Caused by: java.io.EOFException: No content to map to Object due to
    end of input
             at
    
org.codehaus.jackson.map.__ObjectMapper._initForReading(__ObjectMapper.java:2775)
             at
    
org.codehaus.jackson.map.__ObjectMapper._readMapAndClose(__ObjectMapper.java:2718)
             at
    org.codehaus.jackson.map.__ObjectMapper.readValue(__ObjectMapper.java:1863)
             at
    
com.basho.riak.client.convert.__JSONConverter.toDomain(__JSONConverter.java:156)
             ... 7 more

    it only happens once every few thousand updates and if I check the
    object from the cmdline I only get a 404.

    Any ideas what might cause this and how to fix/workaround it?

    Ingo


    _________________________________________________
    riak-users mailing list
    riak-users@lists.basho.com <mailto:riak-users@lists.basho.com>
    http://lists.basho.com/__mailman/listinfo/riak-users___lists.basho.com
    <http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com>




_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com



--
Software Architect

Blue Lion mobile GmbH
Tel. +49 (0) 221 788 797 14
Fax. +49 (0) 221 788 797 19
Mob. +49 (0) 176 24 87 30 89

ingo.roc...@bluelionmobile.com
>>> qeep: Hefferwolf

www.bluelionmobile.com
www.qeep.net

_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to