0

I am trying to work with jerkson in play and with scala 2.10. However, i want to load data fixtures based on a json files. for this prcoedure I'm trying to load the json with the "parse" command from jerkson. That ultimatly fails.

I'm doing this in the "override def onStart(app: Application)" function. The error:

NoClassDefFoundError: Could not initialize class com.codahale.jerkson.Json$

Any guesses why this is happening ? I have the following libs in my deps.:

"com.codahale" % "jerkson_2.9.1" % "0.5.0",
"com.cloudphysics" % "jerkson_2.10" % "0.6.3"

my parsing command is:

com.codahale.jerkson.Json.parse[Map[String,Any]](json)

Thanks in advance

biesior
  • 55,576
  • 10
  • 125
  • 182
ins0m
  • 850
  • 10
  • 20
  • Any particular reason why you are including two versions of `jerkson`, one for scala 2.10 and one for scala 2.9.1. This is generally a bad idea. – cmbaxter May 22 '13 at 23:39
  • No, I added the 2.10 version since I'm using scala 2.10. However, moving to only one does not help – ins0m May 23 '13 at 08:38

1 Answers1

0

A NoClassDefFoundError generally means there is some sort of issues with the classpath. For starters, if you are running on scala 2.10, I would remove the following line from your sbt file:

"com.codahale" % "jerkson_2.9.1" % "0.5.0"

Then, make sure the com.cloudphysics jerkson jar file is available in your apps classpath and try your test again.

cmbaxter
  • 35,283
  • 4
  • 86
  • 95