[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ecf-dev] Issue adding custom serialization to ecf provider

Hi Scott,


Hmm.   Would adding a no-arg constructor to RemoteServiceRegistrationImpl.Properties help?   That could be done pretty easily, but I'm not sure if that will work with Kryo's deserialization behavior.

i.e. something like:

protected Properties() {
    super();
}

i tried that locally at that got me over that point, but there seem to be other issues of similar type. I'm still investigating this.

I thought it was required/expected that the superclass null/empty constructor would always be called if subclass null constructor is called (serialization or otherwise).   Otherwise, I don't think superclasses can ever guarantee proper initialization.

I don't know. But in the described case with the Properties class there is no empty constructor ....

If you you are interested in how Kryo tries to identify the constructors and instantiate the object (before using magic if that does not work) the code is

https://github.com/EsotericSoftware/kryo/blob/master/src/com/esotericsoftware/kryo/Kryo.java

Method newInstantiatorOf at Line 1263. Without the suggested no-arg constructor that code fails to get a valid constructor and falls back to the "fallbackStrategy.newInstantiatorOf" at the end of the method which causes the nullpointer described in my original post.

I'll continue to look at the issues but since that is just a try to get it running there is no need to get it in the proposed next release.

Thx. Bye Peter