I have a major problem during loading the extension into the program. I get an exception as there is no valid constructor.
The problem is in the line:
As specified in Oracle site about Serialization interface :
During deserialization, the fields of non-serializable classes will be initialized using the public or protected no-arg constructor of the class. A no-arg constructor must be accessible to the subclass that is serializable. The fields of serializable subclasses will be restored from the stream.
What I gues is that Dydaktyk
is the subclass of some class. And you have defined the parametric constructor
within the superclass
and have not defined a parameter-less constructor
within it . And the compiler isn't inserting a default constructor for that superclass
. So , You should define a parameter-less constructor
within your superclass also.
The class Dydaktyk
should have an accessible (public or protected) no-args constructor so that the serialization reflection mechanism can create an instance of the class:
public Dydaktyk() {
...
}
From the docs
During deserialization, the fields of non-serializable classes will be initialized using the public or protected no-arg constructor of the class. A no-arg constructor must be accessible to the subclass that is serializable. The fields of serializable subclasses will be restored from the stream.