You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Alex Soto <al...@envieta.com> on 2020/01/28 18:17:40 UTC

java.lang.NoClassDefFoundError: groovy/lang/Script

Hello,

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 Karaf 2.X, I had to install features camel-script, and camel-script-groovy, but they are no longer available.


Best regards,
Alex soto





Re: java.lang.NoClassDefFoundError: groovy/lang/Script

Posted by Andrea Cosentino <an...@gmail.com>.
Camel-script has been removed

Il mar 28 gen 2020, 19:29 Alex Soto <al...@envieta.com> ha scritto:

> This appears to be a regression, as I remember seeing this problem in the
> past:
>
> https://issues.apache.org/jira/browse/CAMEL-4171 <
> https://issues.apache.org/jira/browse/CAMEL-4171>
>
> I will try your suggestion
>
> Best regards,
> Alex soto
>
>
>
>
> > On Jan 28, 2020, at 1:24 PM, Jean-Baptiste Onofré <jb...@nanthrax.net>
> wrote:
> >
> > Hi Alex,
> >
> > It sounds like a classloader issue (two classloaders, the one of
> > camel-groovy bundle and the one of your bundle).
> >
> > I guess the camel-groovy is actually missing the groovy import.
> > Can you try to enable dynamic import for camel-groovy and your bundle to
> > see if it helps ?
> >
> > If not, can you please create a Jira and assign to me ?
> >
> > Thanks
> > Regards
> > JB
> >
> > On 28/01/2020 19:17, Alex Soto wrote:
> >> Hello,
> >>
> >> 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 Karaf 2.X, I had to install features camel-script, and
> camel-script-groovy, but they are no longer available.
> >>
> >>
> >> Best regards,
> >> Alex soto
> >>
> >>
> >>
> >>
> >>
> >
> > --
> > Jean-Baptiste Onofré
> > jbonofre@apache.org
> > http://blog.nanthrax.net
> > Talend - http://www.talend.com
>
>

Re: java.lang.NoClassDefFoundError: groovy/lang/Script

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Thanks, I will fix that.

Regards
JB

On 29/01/2020 14:35, Alex Soto wrote:
> Thank you JB,
> 
> I created a new ticket:
> 
> https://issues.apache.org/jira/browse/CAMEL-14457 <https://issues.apache.org/jira/browse/CAMEL-14457>
> 
> Best regards,
> Alex soto
> 
> 
> 
> 
>> On Jan 29, 2020, at 3:15 AM, Claus Ibsen <cl...@gmail.com> wrote:
>>
>> On Wed, Jan 29, 2020 at 6:57 AM Jean-Baptiste Onofré <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
>>>
>>> Hi Alex,
>>>
>>> It's what I thought, you are welcome ;)
>>>
>>> Not sure if we consider this as an issue in camel-groovy or in usage.
>>>
>>> Can you reopen CAMEL-4171 and assign to me ? I will improve the current
>>> state.
>>
>> No do not reopen old tickets. Create a new ticket.
>>
>>>
>>> Thanks,
>>> Regards
>>> JB
>>>
>>> On 28/01/2020 19:51, Alex Soto wrote:
>>>> Adding:
>>>>
>>>>      DynamicImport-Package:  groovy.*, org.codehaus.groovy.*
>>>>
>>>> To my bundle seems to work.
>>>> So I suppose this should be added somewhere in a Camel bundle?
>>>>
>>>> Best regards,
>>>> Alex soto
>>>>
>>>>
>>>>
>>>>
>>>>> On Jan 28, 2020, at 1:29 PM, Alex Soto <al...@envieta.com> wrote:
>>>>>
>>>>> This appears to be a regression, as I remember seeing this problem in the past:
>>>>>
>>>>> https://issues.apache.org/jira/browse/CAMEL-4171 <https://issues.apache.org/jira/browse/CAMEL-4171>
>>>>>
>>>>> I will try your suggestion
>>>>>
>>>>> Best regards,
>>>>> Alex soto
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>> On Jan 28, 2020, at 1:24 PM, Jean-Baptiste Onofré <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
>>>>>>
>>>>>> Hi Alex,
>>>>>>
>>>>>> It sounds like a classloader issue (two classloaders, the one of
>>>>>> camel-groovy bundle and the one of your bundle).
>>>>>>
>>>>>> I guess the camel-groovy is actually missing the groovy import.
>>>>>> Can you try to enable dynamic import for camel-groovy and your bundle to
>>>>>> see if it helps ?
>>>>>>
>>>>>> If not, can you please create a Jira and assign to me ?
>>>>>>
>>>>>> Thanks
>>>>>> Regards
>>>>>> JB
>>>>>>
>>>>>> On 28/01/2020 19:17, Alex Soto wrote:
>>>>>>> Hello,
>>>>>>>
>>>>>>> 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 Karaf 2.X, I had to install features camel-script, and camel-script-groovy, but they are no longer available.
>>>>>>>
>>>>>>>
>>>>>>> Best regards,
>>>>>>> Alex soto
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> --
>>>>>> Jean-Baptiste Onofré
>>>>>> jbonofre@apache.org <ma...@apache.org>
>>>>>> http://blog.nanthrax.net
>>>>>> Talend - http://www.talend.com
>>>>>
>>>>
>>>>
>>>
>>> --
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>
>>
>>
>> -- 
>> Claus Ibsen
>> -----------------
>> http://davsclaus.com <http://davsclaus.com/> @davsclaus
>> Camel in Action 2: https://www.manning.com/ibsen2 <https://www.manning.com/ibsen2>
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: java.lang.NoClassDefFoundError: groovy/lang/Script

Posted by Alex Soto <al...@envieta.com>.
Thank you JB,

I created a new ticket:

https://issues.apache.org/jira/browse/CAMEL-14457 <https://issues.apache.org/jira/browse/CAMEL-14457>

Best regards,
Alex soto




> On Jan 29, 2020, at 3:15 AM, Claus Ibsen <cl...@gmail.com> wrote:
> 
> On Wed, Jan 29, 2020 at 6:57 AM Jean-Baptiste Onofré <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
>> 
>> Hi Alex,
>> 
>> It's what I thought, you are welcome ;)
>> 
>> Not sure if we consider this as an issue in camel-groovy or in usage.
>> 
>> Can you reopen CAMEL-4171 and assign to me ? I will improve the current
>> state.
> 
> No do not reopen old tickets. Create a new ticket.
> 
>> 
>> Thanks,
>> Regards
>> JB
>> 
>> On 28/01/2020 19:51, Alex Soto wrote:
>>> Adding:
>>> 
>>>      DynamicImport-Package:  groovy.*, org.codehaus.groovy.*
>>> 
>>> To my bundle seems to work.
>>> So I suppose this should be added somewhere in a Camel bundle?
>>> 
>>> Best regards,
>>> Alex soto
>>> 
>>> 
>>> 
>>> 
>>>> On Jan 28, 2020, at 1:29 PM, Alex Soto <al...@envieta.com> wrote:
>>>> 
>>>> This appears to be a regression, as I remember seeing this problem in the past:
>>>> 
>>>> https://issues.apache.org/jira/browse/CAMEL-4171 <https://issues.apache.org/jira/browse/CAMEL-4171>
>>>> 
>>>> I will try your suggestion
>>>> 
>>>> Best regards,
>>>> Alex soto
>>>> 
>>>> 
>>>> 
>>>> 
>>>>> On Jan 28, 2020, at 1:24 PM, Jean-Baptiste Onofré <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
>>>>> 
>>>>> Hi Alex,
>>>>> 
>>>>> It sounds like a classloader issue (two classloaders, the one of
>>>>> camel-groovy bundle and the one of your bundle).
>>>>> 
>>>>> I guess the camel-groovy is actually missing the groovy import.
>>>>> Can you try to enable dynamic import for camel-groovy and your bundle to
>>>>> see if it helps ?
>>>>> 
>>>>> If not, can you please create a Jira and assign to me ?
>>>>> 
>>>>> Thanks
>>>>> Regards
>>>>> JB
>>>>> 
>>>>> On 28/01/2020 19:17, Alex Soto wrote:
>>>>>> Hello,
>>>>>> 
>>>>>> 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 Karaf 2.X, I had to install features camel-script, and camel-script-groovy, but they are no longer available.
>>>>>> 
>>>>>> 
>>>>>> Best regards,
>>>>>> Alex soto
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>> 
>>>>> --
>>>>> Jean-Baptiste Onofré
>>>>> jbonofre@apache.org <ma...@apache.org>
>>>>> http://blog.nanthrax.net
>>>>> Talend - http://www.talend.com
>>>> 
>>> 
>>> 
>> 
>> --
>> Jean-Baptiste Onofré
>> jbonofre@apache.org
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
> 
> 
> 
> -- 
> Claus Ibsen
> -----------------
> http://davsclaus.com <http://davsclaus.com/> @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2 <https://www.manning.com/ibsen2>

Re: java.lang.NoClassDefFoundError: groovy/lang/Script

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Jan 29, 2020 at 6:57 AM Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
>
> Hi Alex,
>
> It's what I thought, you are welcome ;)
>
> Not sure if we consider this as an issue in camel-groovy or in usage.
>
> Can you reopen CAMEL-4171 and assign to me ? I will improve the current
> state.

No do not reopen old tickets. Create a new ticket.

>
> Thanks,
> Regards
> JB
>
> On 28/01/2020 19:51, Alex Soto wrote:
> > Adding:
> >
> >       DynamicImport-Package:  groovy.*, org.codehaus.groovy.*
> >
> > To my bundle seems to work.
> > So I suppose this should be added somewhere in a Camel bundle?
> >
> > Best regards,
> > Alex soto
> >
> >
> >
> >
> >> On Jan 28, 2020, at 1:29 PM, Alex Soto <al...@envieta.com> wrote:
> >>
> >> This appears to be a regression, as I remember seeing this problem in the past:
> >>
> >> https://issues.apache.org/jira/browse/CAMEL-4171 <https://issues.apache.org/jira/browse/CAMEL-4171>
> >>
> >> I will try your suggestion
> >>
> >> Best regards,
> >> Alex soto
> >>
> >>
> >>
> >>
> >>> On Jan 28, 2020, at 1:24 PM, Jean-Baptiste Onofré <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
> >>>
> >>> Hi Alex,
> >>>
> >>> It sounds like a classloader issue (two classloaders, the one of
> >>> camel-groovy bundle and the one of your bundle).
> >>>
> >>> I guess the camel-groovy is actually missing the groovy import.
> >>> Can you try to enable dynamic import for camel-groovy and your bundle to
> >>> see if it helps ?
> >>>
> >>> If not, can you please create a Jira and assign to me ?
> >>>
> >>> Thanks
> >>> Regards
> >>> JB
> >>>
> >>> On 28/01/2020 19:17, Alex Soto wrote:
> >>>> Hello,
> >>>>
> >>>> 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 Karaf 2.X, I had to install features camel-script, and camel-script-groovy, but they are no longer available.
> >>>>
> >>>>
> >>>> Best regards,
> >>>> Alex soto
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>
> >>>
> >>> --
> >>> Jean-Baptiste Onofré
> >>> jbonofre@apache.org <ma...@apache.org>
> >>> http://blog.nanthrax.net
> >>> Talend - http://www.talend.com
> >>
> >
> >
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Re: java.lang.NoClassDefFoundError: groovy/lang/Script

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Alex,

It's what I thought, you are welcome ;)

Not sure if we consider this as an issue in camel-groovy or in usage.

Can you reopen CAMEL-4171 and assign to me ? I will improve the current
state.

Thanks,
Regards
JB

On 28/01/2020 19:51, Alex Soto wrote:
> Adding:
> 
> 	DynamicImport-Package:  groovy.*, org.codehaus.groovy.*
> 
> To my bundle seems to work.
> So I suppose this should be added somewhere in a Camel bundle?
> 
> Best regards,
> Alex soto
> 
> 
> 
> 
>> On Jan 28, 2020, at 1:29 PM, Alex Soto <al...@envieta.com> wrote:
>>
>> This appears to be a regression, as I remember seeing this problem in the past:
>>
>> https://issues.apache.org/jira/browse/CAMEL-4171 <https://issues.apache.org/jira/browse/CAMEL-4171>
>>
>> I will try your suggestion
>>
>> Best regards,
>> Alex soto
>>
>>
>>
>>
>>> On Jan 28, 2020, at 1:24 PM, Jean-Baptiste Onofré <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
>>>
>>> Hi Alex,
>>>
>>> It sounds like a classloader issue (two classloaders, the one of
>>> camel-groovy bundle and the one of your bundle).
>>>
>>> I guess the camel-groovy is actually missing the groovy import.
>>> Can you try to enable dynamic import for camel-groovy and your bundle to
>>> see if it helps ?
>>>
>>> If not, can you please create a Jira and assign to me ?
>>>
>>> Thanks
>>> Regards
>>> JB
>>>
>>> On 28/01/2020 19:17, Alex Soto wrote:
>>>> Hello,
>>>>
>>>> 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 Karaf 2.X, I had to install features camel-script, and camel-script-groovy, but they are no longer available.
>>>>
>>>>
>>>> Best regards,
>>>> Alex soto
>>>>
>>>>
>>>>
>>>>
>>>>
>>>
>>> -- 
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org <ma...@apache.org>
>>> http://blog.nanthrax.net
>>> Talend - http://www.talend.com
>>
> 
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: java.lang.NoClassDefFoundError: groovy/lang/Script

Posted by Alex Soto <al...@envieta.com>.
Maybe ticket https://issues.apache.org/jira/browse/CAMEL-4171 <https://issues.apache.org/jira/browse/CAMEL-4171>  should be reopened, or a new one created, not sure. Will leave it to somebody that knows better.


Best regards,
Alex soto




> On Jan 28, 2020, at 1:51 PM, Alex Soto <al...@envieta.com> wrote:
> 
> Adding:
> 
> 	DynamicImport-Package:  groovy.*, org.codehaus.groovy.*
> 
> To my bundle seems to work.
> So I suppose this should be added somewhere in a Camel bundle?
> 
> Best regards,
> Alex soto
> 
> 
> 
> 
>> On Jan 28, 2020, at 1:29 PM, Alex Soto <alex.soto@envieta.com <ma...@envieta.com>> wrote:
>> 
>> This appears to be a regression, as I remember seeing this problem in the past:
>> 
>> https://issues.apache.org/jira/browse/CAMEL-4171 <https://issues.apache.org/jira/browse/CAMEL-4171>
>> 
>> I will try your suggestion
>> 
>> Best regards,
>> Alex soto
>> 
>> 
>> 
>> 
>>> On Jan 28, 2020, at 1:24 PM, Jean-Baptiste Onofré <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
>>> 
>>> Hi Alex,
>>> 
>>> It sounds like a classloader issue (two classloaders, the one of
>>> camel-groovy bundle and the one of your bundle).
>>> 
>>> I guess the camel-groovy is actually missing the groovy import.
>>> Can you try to enable dynamic import for camel-groovy and your bundle to
>>> see if it helps ?
>>> 
>>> If not, can you please create a Jira and assign to me ?
>>> 
>>> Thanks
>>> Regards
>>> JB
>>> 
>>> On 28/01/2020 19:17, Alex Soto wrote:
>>>> Hello,
>>>> 
>>>> 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 Karaf 2.X, I had to install features camel-script, and camel-script-groovy, but they are no longer available.
>>>> 
>>>> 
>>>> Best regards,
>>>> Alex soto
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>> 
>>> -- 
>>> Jean-Baptiste Onofré
>>> jbonofre@apache.org <ma...@apache.org>
>>> http://blog.nanthrax.net <http://blog.nanthrax.net/>
>>> Talend - http://www.talend.com
>> 
> 


Re: java.lang.NoClassDefFoundError: groovy/lang/Script

Posted by Alex Soto <al...@envieta.com>.
Adding:

	DynamicImport-Package:  groovy.*, org.codehaus.groovy.*

To my bundle seems to work.
So I suppose this should be added somewhere in a Camel bundle?

Best regards,
Alex soto




> On Jan 28, 2020, at 1:29 PM, Alex Soto <al...@envieta.com> wrote:
> 
> This appears to be a regression, as I remember seeing this problem in the past:
> 
> https://issues.apache.org/jira/browse/CAMEL-4171 <https://issues.apache.org/jira/browse/CAMEL-4171>
> 
> I will try your suggestion
> 
> Best regards,
> Alex soto
> 
> 
> 
> 
>> On Jan 28, 2020, at 1:24 PM, Jean-Baptiste Onofré <jb@nanthrax.net <ma...@nanthrax.net>> wrote:
>> 
>> Hi Alex,
>> 
>> It sounds like a classloader issue (two classloaders, the one of
>> camel-groovy bundle and the one of your bundle).
>> 
>> I guess the camel-groovy is actually missing the groovy import.
>> Can you try to enable dynamic import for camel-groovy and your bundle to
>> see if it helps ?
>> 
>> If not, can you please create a Jira and assign to me ?
>> 
>> Thanks
>> Regards
>> JB
>> 
>> On 28/01/2020 19:17, Alex Soto wrote:
>>> Hello,
>>> 
>>> 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 Karaf 2.X, I had to install features camel-script, and camel-script-groovy, but they are no longer available.
>>> 
>>> 
>>> Best regards,
>>> Alex soto
>>> 
>>> 
>>> 
>>> 
>>> 
>> 
>> -- 
>> Jean-Baptiste Onofré
>> jbonofre@apache.org <ma...@apache.org>
>> http://blog.nanthrax.net
>> Talend - http://www.talend.com
> 


Re: java.lang.NoClassDefFoundError: groovy/lang/Script

Posted by Alex Soto <al...@envieta.com>.
This appears to be a regression, as I remember seeing this problem in the past:

https://issues.apache.org/jira/browse/CAMEL-4171 <https://issues.apache.org/jira/browse/CAMEL-4171>

I will try your suggestion

Best regards,
Alex soto




> On Jan 28, 2020, at 1:24 PM, Jean-Baptiste Onofré <jb...@nanthrax.net> wrote:
> 
> Hi Alex,
> 
> It sounds like a classloader issue (two classloaders, the one of
> camel-groovy bundle and the one of your bundle).
> 
> I guess the camel-groovy is actually missing the groovy import.
> Can you try to enable dynamic import for camel-groovy and your bundle to
> see if it helps ?
> 
> If not, can you please create a Jira and assign to me ?
> 
> Thanks
> Regards
> JB
> 
> On 28/01/2020 19:17, Alex Soto wrote:
>> Hello,
>> 
>> 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 Karaf 2.X, I had to install features camel-script, and camel-script-groovy, but they are no longer available.
>> 
>> 
>> Best regards,
>> Alex soto
>> 
>> 
>> 
>> 
>> 
> 
> -- 
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com


Re: java.lang.NoClassDefFoundError: groovy/lang/Script

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Alex,

It sounds like a classloader issue (two classloaders, the one of
camel-groovy bundle and the one of your bundle).

I guess the camel-groovy is actually missing the groovy import.
Can you try to enable dynamic import for camel-groovy and your bundle to
see if it helps ?

If not, can you please create a Jira and assign to me ?

Thanks
Regards
JB

On 28/01/2020 19:17, Alex Soto wrote:
> Hello,
> 
> 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 Karaf 2.X, I had to install features camel-script, and camel-script-groovy, but they are no longer available.
> 
> 
> Best regards,
> Alex soto
> 
> 
> 
> 
> 

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com