You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.
I'm trying to pickle and unpickle a ValueSet, alas without success. Here is the repl input/output:
scala>importscala.pickling._importscala.pickling._
scala>importjson._importjson._
scala>objectWindDirectionextendsEnumeration {
valN, NE, E, SE, S, SW, W, NW=Value
}
defined objectWindDirection
scala>vala=WindDirection.ValueSet(WindDirection.E, WindDirection.NE)
a:WindDirection.ValueSet=WindDirection.ValueSet(NE, E)
scala>valb= a.pickle
b: scala.pickling.json.JSONPickle=JSONPickle({
"tpe":"scala.Enumeration.ValueSet",
"nnIds": {
"tpe":"scala.collection.immutable.BitSet.BitSet1",
"elems":"6"
}
})
scala>valc= b.unpickle[WindDirection.ValueSet]
java.lang.RuntimeException:error: cannot find classor module withtypename'scala.Enumeration.ValueSet'
full typestring:'scala.Enumeration.ValueSet'
at scala.sys.package$.error(package.scala:27)
at scala.pickling.internal.package$.liftedTree1$1(package.scala:59)
at scala.pickling.internal.package$.typeFromString(package.scala:54)
at scala.pickling.FastTypeTag$.apply(FastTags.scala:69)
at scala.pickling.json.JSONPickleReader$$anonfun$beginEntry$2.apply(JSONPickleFormat.scala:216)
at scala.pickling.json.JSONPickleReader$$anonfun$beginEntry$2.apply(JSONPickleFormat.scala:205)
at scala.pickling.PickleTools$class.withHints(Tools.scala:480)
at scala.pickling.json.JSONPickleReader.withHints(JSONPickleFormat.scala:167)
at scala.pickling.json.JSONPickleReader.beginEntry(JSONPickleFormat.scala:205)
at scala.pickling.json.JSONPickleReader.beginEntryNoTagDebug(JSONPickleFormat.scala:204)
at scala.pickling.json.JSONPickleReader.beginEntryNoTag(JSONPickleFormat.scala:202)
... 65 elided
This is on:
Scala version 2.11.6
OpenJDK Server VM, Java 1.7.0_79
Pickling version 0.9.1 (latest on maven afaik)
Am I doing something wrong or is unpickling of ValueSets just not supported?
Best,
Cornelius
The text was updated successfully, but these errors were encountered:
cornim
changed the title
Can't pickle ValueSet
Can't unpickle ValueSet
Jul 12, 2016
Hi,
I'm trying to pickle and unpickle a ValueSet, alas without success. Here is the repl input/output:
This is on:
Scala version 2.11.6
OpenJDK Server VM, Java 1.7.0_79
Pickling version 0.9.1 (latest on maven afaik)
Am I doing something wrong or is unpickling of ValueSets just not supported?
Best,
Cornelius
The text was updated successfully, but these errors were encountered: