why do I get "no valid constructor" exception?
<p>I am serializing a class. I have the following structure:</p>

<pre><code>class A { class B { public B(); ... } }
class C extends A { class D extends A.B implements Serializable { public D(); } }
</code></pre>

<p>I can write objects of the type C.D, but whenever I try to read them back, I get the exception:</p>

<pre><code>java.io.InvalidClassException: C$D; C$D; no valid constructor
</code></pre>

<p>any ideas?</p>

<p>Just to make it clear, it says here <a href="http://docs.oracle.com/javase/1.4.2/docs/api/java/io/InvalidClassException.html" rel="nofollow">http://docs.oracle.com/javase/1.4.2/docs/api/java/io/InvalidClassException.html</a> that this exception is thrown when there is no constructor that accepts no parameters. But I do have these constructors.</p>
