4 Replies Latest reply on Apr 24, 2014 7:48 PM by Freeman(Yue) Fang

    Problem with camel-groovy: unable to resolve class JsonSlurper

    labo32 Newbie

      Hello together,

       

      I try to use the following groovy script in my camel route (deployed in karaf 3.0.1, jdk 1.7, ubuntu 13,10) which works fine with former camel versions

      also with version 2.12.3

       

      import groovy.json.*

      def slurper = new JsonSlurper()

      def result = slurper.parseText(request.body)

      ......

      ..........

       

      but I got an exception that the class JsonSlurper cannot be resolved.

      Seems to be an problem with groovy ( as I know newer versions does not contain a groovy-all jar).

       

      I tried to install an older versions with install -s mvn:org.codehaus.groovy/groovy-all/1.8.9

      but my camel route shows the same error.

       

      How can I enable a full featured groovy (including groovy-json-x.x.x.jar, groovy-sql-x.x.x.jar........) again ?

       

      Thanks

      labo