Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

java.io.InvalidClassException on updating to Epic 0.3 and using POS tagger #27

Closed
malcolmgreaves opened this issue Feb 4, 2015 · 2 comments

Comments

@malcolmgreaves
Copy link

I upgraded a project I had to use Epic 0.3 and the most recent taggers and parsers. I'm getting a pretty nasty error here:

[info]   java.io.InvalidClassException: breeze.linalg.Counter2$$anon$1; local class incompatible: stream classdesc serialVersionUID = -8653601685403516672, local class serialVersionUID = 6118148492784004600
...
[info]   at epic.models.PosTagSelector$.loadTagger(PosTagModelLoader.scala:13)

(full stacktrace below)

It looks like there's a problem in breeze.lingalg.Counter. Did the API possibly change between this upgrade? Perhaps it's related to the fact that I'm using Spark as well as Epic in my project? Here are all of my dependencies

"org.scalanlp" %% "epic" % "0.3",
"org.scalanlp" %% "epic-parser-en-span" % "2015.1.25",
"org.scalanlp" %% "epic-ner-en-conll" % "2015.1.25",
"org.scalanlp" %% "epic-pos-en" % "2015.1.25",
"org.apache.spark" % "spark-core_2.10" % "1.3.0",
"org.apache.spark" % "spark-mllib_2.10" % "1.3.0",

Stacktrace:

[info]   java.io.InvalidClassException: breeze.linalg.Counter2$$anon$1; local class incompatible: stream classdesc serialVersionUID = -8653601685403516672, local class serialVersionUID = 6118148492784004600
[info]   at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:621)
[info]   at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1623)
[info]   at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1518)
[info]   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1774)
[info]   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
[info]   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
[info]   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
[info]   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
[info]   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
[info]   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
[info]   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
[info]   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
[info]   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
[info]   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
[info]   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
[info]   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
[info]   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
[info]   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
[info]   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
[info]   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
[info]   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
[info]   at java.io.ObjectInputStream.readArray(ObjectInputStream.java:1707)
[info]   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1345)
[info]   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
[info]   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
[info]   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
[info]   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
[info]   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
[info]   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
[info]   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
[info]   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
[info]   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
[info]   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
[info]   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
[info]   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
[info]   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
[info]   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
[info]   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
[info]   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
[info]   at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1993)
[info]   at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1918)
[info]   at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1801)
[info]   at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1351)
[info]   at java.io.ObjectInputStream.readObject(ObjectInputStream.java:371)
[info]   at epic.models.ClassPathModelLoader.load(ModelLoader.scala:23)
[info]   at epic.models.DelegatingLoader.load(ModelLoader.scala:33)
[info]   at epic.models.PosTagSelector$.loadTagger(PosTagModelLoader.scala:13)
@reactormonk
Copy link
Collaborator

Are you using scala 2.10? If yes, then this is a duplicate of #26

@malcolmgreaves
Copy link
Author

I am indeed using 2.10 ! Thanks for catching this. I'll close and post on #26

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants