4
votes

When I try doing the serialization examples from Ruminations of a Programmer's "JSON Serialization for Scala Objects" article I run into the error:

Exception in thread "main" java.lang.NoClassDefFoundError: scala/util/parsing/syntax/Tokens.

I have found that it happens when trying to deserialize. I was just wondering if there was a simple fix. I would really like not having to redo my whole project and downloading all my jars again.

1
What jar files did you download? What version of Scala are you using? It seems like it could be running code that's been compiled for 2.8.0 executed with a 2.7.x flavor. - huynhjl

1 Answers

0
votes

This mainly occurs when the scala library is not present in your source path. just check that it is present in build path. If you are using eclipse the plugin doesnt work properly some times.Just make a new folder in your project and paste scala library into it and give it to build path.