You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by labo <a2...@drdrb.net> on 2014/04/24 21:27:51 UTC

Problem with camel-groovy: unable to resolve class JsonSlurper

Hello, 
I already post my problem at
https://community.jboss.org/message/870242?et=watches.email.thread


Here is a summary:

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.

karaf@root()> find-class JsonSlurper
 
Apache ServiceMix :: Bundles :: json-lib (138)
net/sf/json/groovy/JsonSlurper.class
 
Groovy Runtime (158)
groovy/json/JsonSlurper.class
 
The class is there but the script complains that it cannot find it.
The bundle should find the class since I used
 
<Import-Package>
  *
</Import-Package>
 
in the maven-bundle-plugin

Thanks in advance
labo



--
View this message in context: http://camel.465427.n5.nabble.com/Problem-with-camel-groovy-unable-to-resolve-class-JsonSlurper-tp5750570.html
Sent from the Camel - Users mailing list archive at Nabble.com.