Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Let me guess: you serialized (through java's built-in serialization) a class that contains a <code>ClassManifest</code> (from whom <code>ClassTypeManifest</code> is a subtype) to a file (or database), then upgraded your scala version, and are now attempting to deserialize that file, right? Or you are sending a serialized object from one JVM process to another, and they run different versions of scala.</p> <p>Well, don't do it. The first reason is that <code>ClassTypeManifest</code> declares no explicit <code>serialVersionUID</code> field (see <a href="https://stackoverflow.com/questions/285793/what-is-a-serialversionuid-and-why-should-i-use-it">What is a serialVersionUID and why should I use it?</a>), which clearly indicates that any change to the class might change the serialization format. You cannot really expect any backward compatibility in <code>ClassTypeManifest</code>'s serailized streams. In addition, in scala 2.10 <code>ClassManifest</code> is not even a class anymore: it's a mere alias to <code>ClassTag</code> which is a significantly different class.</p> <p>So really, don't expect to be able to serialize (using java's serialization) a <code>ClassManifest</code> and read it back with another version of scala.</p> <p>If you really need to do use java reflection, you might try to replace your <code>ClassManifest</code> fields with <code>java.lang.Class</code> fields (which are always safe to serialize/deserialize).</p> <p>Otherwise, you could look into using other serialization libraries.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload