Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Custom JDOM subclasses are not serializable #88
Hi Björn, Oliver
I have identified what the problem is...... this is not actually a Java bug, but it describes what the potential JDOM bug is... I think....
What this implies is that there is an issue in the permissions of the JDOM element hierarchy.
in my understanding, it goes like this....
org.jdom2.Element extends org.jdom2.Content.
Your class 'MyElement' is not in the org.jdom2 package, so, it cannot 'see' the no-arg constructor for (package private) org.jdom2.CloneBase.
Thus the MyElement class cannot be de-serialized.
I have 'proven' that this is the logic fault by putting the MyElement class in the org.jdom2 package, and then, miraculously, the code works. When I get home I will try it again but instead with a 'protected' no-arg constructor on org.jdom2.CloneBase, and the MyElement class in some other package..... actually, I have just tried it now, and it works.....
Thus, there are two work-arounds:
I have created a new issue, and I have attached a working CloneBase class you can add to your project temporarily.....
I will push out JDOM 2.0.3
On Thu, 9 Aug 2012 11:03:52 -0400, Oliver Ruebenacker email@example.com