Thomas Heigl
Thomas Heigl
Kryo relies on the no-arg constructor to [instantiate objects](https://github.com/EsotericSoftware/kryo#instantiatorstrategy) by default. If you need to instantiate objects without a no-arg constructor, you can configure a fallback to Objenesis like this:...
@vjhpe: What has changed is that the JDK now denies illegal access to internals by default. See https://openjdk.org/jeps/396. In JDK11 you would only have got a warning message. What is...
Closing due to lack of feedback.
Please see [the docs](https://github.com/EsotericSoftware/kryo#instantiatorstrategy) about object instantiation. You can use `kryo.setInstantiatorStrategy(new DefaultInstantiatorStrategy(new StdInstantiatorStrategy()));` to instantiate objects without default constructors.
What is the root cause of this exception? Can you please share the full stack trace? Or even better, try to replicate this issue in a minimal unit test.
@kevinkwok326: Yes, you can use `StdInstantiatorStrategy` directly. Can you please provide the complete stacktrace you get when you use `new DefaultInstantiatorStrategy(new StdInstantiatorStrategy())`? Because this should also work. Errors should be...
Thanks for the info! I see, the fallback is never applied when the error happens inside the anonymous `ObjectInstantiator`. We need another fallback logic inside the instantiator, or wrap it...
I don't have much time to work on Kryo at the moment, so probably not very soon. You can always create a PR though.
A similar problem was described in #834. I debugged the issue at the time, but was unable to come up with a solution. I'd recommend that you use chunked encoding....
The disadvantage is that you will have to traverse the array multiple times, or write the data in reverse order. I'm not sure this makes sense as a general addition...