[Simple-support] Problem deserializing an inner class
Brought to you by:
niallg
|
From: Alan D. <Ala...@zn...> - 2008-08-23 00:15:21
|
I got stuck on this. I'm using inner classes and a CycleStrategy, and
the serialization seems to work fine. However on de-serialization I get
an exception thrown:
> java.lang.NoSuchMethodException: com.test.Outer$Inner.<init>()
> at java.lang.Class.getConstructor0(Class.java:2706)
> at java.lang.Class.getDeclaredConstructor(Class.java:1985)
> at
> org.simpleframework.xml.graph.Instance.getInstance(Instance.java:75)
> at
> org.simpleframework.xml.graph.Instance.getInstance(Instance.java:62)
(etc)
This is from the template:
@Root public class Outer {
....
@Element private String whatever;
public class Inner {
@Element private String whenever;
}
@ElementList protected ArrayList<Inner> innards;
}
It doesn't make any difference whether I put a constructor on the inner
class or not. However the XML output looks as logical as a
checkerboard. Any ideas what is going wrong?
Regards,
--
Alan
|