Google Groups

Extraction.decompose throws exception (java.lang.NoClassDefFoundError: com/thoughtworks/paranamer/ParameterNamesNotFoundException)


parsa Jun 26, 2011 8:36 AM
Posted in group: Lift
Hi folks,

I'm trying to serialize a Map in json format using lift-json. Here's
what I do:

scala> :cp lift-json_2.8.1-2.3.jar
Added 'cp lift-json_2.8.1-2.3.jar'. Your new classpath is:
.:lift-json_2.8.1-2.3.jar

scala> implicit val formats = net.liftweb.json.DefaultFormats
formats: net.liftweb.json.DefaultFormats.type =
net.liftweb.json.DefaultFormats$@1181a6d

scala> import net.liftweb.json.JsonAST._
import net.liftweb.json.JsonAST._

scala> import net.liftweb.json.Extraction._
import net.liftweb.json.Extraction._

scala> import net.liftweb.json.Printer._
import net.liftweb.json.Printer._

scala> decompose(Map("a"->"b"))
java.lang.NoClassDefFoundError: com/thoughtworks/paranamer/
ParameterNamesNotFoundException
        at net.liftweb.json.Extraction$.gd1$1(Extraction.scala:75)
        at net.liftweb.json.Extraction$.decompose(Extraction.scala:73)
        at .<init>(<console>:9)
        at .<clinit>(<console>)
        at RequestResult$.<init>(<console>:9)
        at RequestResult$.<clinit>(<console>)
        at RequestResult$scala_repl_result(<console>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at scala.tools.nsc.Interpreter$Request$$anonfun$loadAndRun$1$$anonfun
$apply$17.apply(Interpreter.scala:988)
        at scala...

Can someone tell me what's going on here? Thanks.