Kryo Deserialization: java.lang.IndexOutOfBoundsException

1,737 views
Skip to first unread message

mred...@web.de

unread,
Nov 11, 2015, 4:51:11 AM11/11/15
to kryo-users
All,

I currently have problem deserializing objects which are stored in a BLOB in the database.
We use Kryo version 2.24.0

The stacktrace looks as follows:

java.lang.IndexOutOfBoundsException: Index: 104, Size: 5
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at com.esotericsoftware.kryo.util.MapReferenceResolver.getReadObject(MapReferenceResolver.java:42)
at com.esotericsoftware.kryo.Kryo.readReferenceOrNull(Kryo.java:805)
at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:677)
at com.esotericsoftware.kryo.serializers.ObjectField.read(ObjectField.java:106)
at com.esotericsoftware.kryo.serializers.FieldSerializer.read(FieldSerializer.java:528)
at com.esotericsoftware.kryo.Kryo.readObject(Kryo.java:657)

The object to be deserialized is a Pojo which contains some easy attributes (Long, String, long, boolean) and one Map<Long, Pojo2>.
The field which is the map is the one that causes the problem.

Any help is greatly appreciated since this is currently a production problem :(

Regards,
-Marcus

Martin Grotzke

unread,
Nov 11, 2015, 5:27:22 AM11/11/15
to kryo-...@googlegroups.com
Hi Marcus,

please check the results of
https://github.com/EsotericSoftware/kryo/issues?q=is%3Aissue+IndexOutOfBoundsException
and see if some of the issues there apply to your case (most of the
issues were wrong usage).

You could try to make the issue reproducable in a unit test, by taking a
blob that triggers the issue and deserialize it. This should help
analyzing this.
With this you could update kryo to the latest version (maybe try the
latest SNAPSHOT) and see if the issue persists.
If this is the case, you should create a self contained / isolated test
case that's reduced to the possible minimum (http://sscce.org/) and
submit an issue with this, then we're able to analyze this.

Cheers,
Martin

PS I replied to your private email earlier but received an "Undelivered
Mail Returned to Sender", maybe you already received my forwarded mail.
> --
> You received this message because you are subscribed to the "kryo-users"
> group.
> http://groups.google.com/group/kryo-users
> ---
> You received this message because you are subscribed to the Google
> Groups "kryo-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to kryo-users+...@googlegroups.com
> <mailto:kryo-users+...@googlegroups.com>.
> For more options, visit https://groups.google.com/d/optout.

--
inoio gmbh - http://inoio.de
Schulterblatt 36, 20357 Hamburg
Amtsgericht Hamburg, HRB 123031
Geschäftsführer: Dennis Brakhane, Martin Grotzke, Ole Langbehn

signature.asc
Reply all
Reply to author
Forward
0 new messages