Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.0.0, 3.0.1
-
None
-
Apache Karaf 4.2.8
-
Unknown
Description
With Camel 3.0.1, I am experiencing this error:
java.lang.RuntimeException: java.lang.NoClassDefFoundError: groovy/lang/Script
{{ at org.codehaus.groovy.control.CompilationUnit.convertUncaughtExceptionToCompilationError(CompilationUnit.java:1107)}}
{{ at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:1087)}}
{{ at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:634)}}
{{ at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:612)}}
{{ at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:589)}}
{{ at groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:401)}}
{{ at groovy.lang.GroovyClassLoader.access$300(GroovyClassLoader.java:89)}}
{{ at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:341)}}
{{ at groovy.lang.GroovyClassLoader$5.provide(GroovyClassLoader.java:338)}}
{{ at org.codehaus.groovy.runtime.memoize.ConcurrentCommonCache.getAndPut(ConcurrentCommonCache.java:147)}}
{{ at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:336)}}
{{ at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:320)}}
{{ at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:262)}}
{{ at groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:272)}}
{{ at org.apache.camel.language.groovy.GroovyExpression.instantiateScript(GroovyExpression.java:73)}}…
I am running Camel in Karaf OSGi environment with camel-groovy feature installed. In old Camel 2.X, I had to install features camel-script, and camel-script-groovy, but they are no longer available.
Adding:
DynamicImport-Package: groovy.*, org.codehaus.groovy.*
Fixes the issue.