You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (JIRA)" <ji...@apache.org> on 2014/12/03 20:47:12 UTC
[jira] [Commented] (CAMEL-7925) groovy and osgi - Could not
initialize class script1413536396719697720774
[ https://issues.apache.org/jira/browse/CAMEL-7925?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14233421#comment-14233421 ]
Claus Ibsen commented on CAMEL-7925:
------------------------------------
Try a newer version of Camel. 2.12.x is EOL.
> groovy and osgi - Could not initialize class script1413536396719697720774
> -------------------------------------------------------------------------
>
> Key: CAMEL-7925
> URL: https://issues.apache.org/jira/browse/CAMEL-7925
> Project: Camel
> Issue Type: Bug
> Components: camel-groovy
> Environment: Apache Karaf 2.2.x
> Reporter: Charles Moulliard
> Priority: Minor
>
> When a camel route is deployed on apache Karaf using a groovy expression to be evaluated we get this error
> https://gist.github.com/cmoulliard/7294122c47e9c18df399
> Route
> {code}
> from("direct:launch").routeId("request-token")
>
> .onException(HttpOperationFailedException.class)
> .handled(true)
> .log("An error occurred")
> .to("direct:interface-status")
> .end()
>
> .setHeader(Exchange.HTTP_URI, constant(wayneUriGetSession))
> .setHeader(Exchange.HTTP_QUERY, constant("User=" + UserName + "&" + "Pass=" + Password))
> .setHeader(Exchange.HTTP_METHOD, constant("GET"))
>
> .to("https4://token-service")
> .convertBodyTo(String.class)
> .setHeader("token").groovy("body.replaceAll('\"','')")
> {code}
> {code}
> Caused by: java.lang.NoClassDefFoundError: Could not initialize class script1413536396719697720774
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[:1.7.0_51]
> at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)[:1.7.0_51]
> at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[:1.7.0_51]
> at java.lang.reflect.Constructor.newInstance(Constructor.java:526)[:1.7.0_51]
> at java.lang.Class.newInstance(Class.java:374)[:1.7.0_51]
> at org.apache.camel.language.groovy.GroovyExpression.instantiateScript(GroovyExpression.java:71)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)