fast-serialization icon indicating copy to clipboard operation
fast-serialization copied to clipboard

java.lang.NullPointerException: "org.nustaq.serialization.FSTClazzInfo$FSTFieldInfo.getPossibleClasses()"

Open rhishirajnema opened this issue 3 years ago • 5 comments

I am receiving this error from class FSTObjectInput - line number 357.

java.lang.NullPointerException: Cannot load from object array because the return value of "org.nustaq.serialization.FSTClazzInfo$FSTFieldInfo.getPossibleClasses()" is null

What should I have in possibleClasses so that it does not result in NullPointerException? Here is the FSTFieldInfo for which this is failing - Screen Shot 2021-06-16 at 10 30 01 PM

I have another with same information but that works and code resolved is not equals to 1 -

Screen Shot 2021-06-16 at 10 31 51 PM

rhishirajnema avatar Jun 17 '21 02:06 rhishirajnema

Same here, using as a drop in replacement for redisson.

Sneakometer avatar Mar 14 '22 19:03 Sneakometer

We have stopped using this library and all our issues are resolved. I don't think this library provides any advantage even in terms of performance.

rhishirajnema avatar Mar 14 '22 20:03 rhishirajnema

We have stopped using this library and all our issues are resolved. I don't think this library provides any advantage even in terms of performance.

What are you using now? Inbuild java object serialization?

Sneakometer avatar Mar 14 '22 20:03 Sneakometer

We have stopped using this library and all our issues are resolved. I don't think this library provides any advantage even in terms of performance.

What are you using now? Inbuild java object serialization?

Yes.

rhishirajnema avatar Mar 14 '22 20:03 rhishirajnema

I had the same exception and it was related to using the same encode instance in multiple threads, since it is not threadsafe.

Make sure to use a construct like the following as described on https://github.com/RuedigerMoeller/fast-serialization/wiki/Serialization

static ThreadLocal<FSTConfiguration> conf = new ThreadLocal() { public FSTConfiguration initialValue() { return FSTConfiguration.createDefaultConfiguration(); } };

bluelu avatar Jun 10 '22 12:06 bluelu