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> 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
> 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

Reply via email to