Saturday 15 May 2010

serialization - Deserialization throws 'ClassNotFoundException: JavaConversions$SeqWrapper' in Scala 2.10 -


I have a pretty complex object graph, sorted by Scala-2.9 and I need to read it in Scala-2.10. However, the object graph throws deeper into Scala-2.10:

 ! Java.lang.ClassNotFoundException: scala.collection.JavaConversions $ SeqWrapper! Java.net.URLClassLoader at $ 1.run (URLClassLoader.java 366) ~ [na: 1.7.0_21]! Java.net.URLClassLoader at $ 1.run (URLClassLoader.java:355) ~ [na: 1.7.0_21]! On Java.security.AccessController Privileged (basic method) ~ [na: 1.7.0_21]! At Java.net.URLClassLoader.findClass (URLClassLoader.java:354) ~ [na: 1.7.0_21]! Java.lang.ClassLoader.loadClass (ClassLoader.java:423) ~ [na: 1.7.0_21]! Sun.misc.Launcher $ AppClassLoader.loadClass (Launcher.java308) ~ [na: 1.7.0_21]! Java.lang.ClassLoader.loadClass (ClassLoader.java356) ~ [na: 1.7.0_21]! Java.lang.Class.forName0 (the original method) ~ [na: 1.7.0_21]! At Java.lang.Class.forName (Class.Java Film 66) ~ [na: 1.7.0_21]! Java.io.ObjectInputStream.resolveClass (ObjectInputStream.java:623) ~ [na: 1.7.0_21] ...   

The easiest way to load this serial object in Scala What is it? 2.10? The object deserializes correctly with Scala-2.9, but sounds like have gone around in the standard library. Most members of scala.collection.javaConversions are going to go ahead, scala.collection.convert.Wrappers

I'm also more interested in the large scale Specify the strong methods to keep the complex object graphs sorted without any category.

Thoughts, no real help:

  1. For the skala compilation, the underlying implementation has collided against a change which is reflected in the same ordering. You are unable to "just load it" in 2.10, so you need a few common grounds.

  2. You can walk with each version of Scala in this form as the collection is not fully settled.

  3. I think your intention is to load your graph using code based on 2.9, convert to some new format and create a new "normal" format.

  4. In the Java world, I reach JAXB or SDO; Maybe I doubt that Scala will be aware of collection types.

  5. I think you've already seen it.

  6. Can your object graph be completely changed based on some basic Java data types?

No comments:

Post a Comment