[ 
https://issues.apache.org/jira/browse/CAMEL-7089?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Claus Ibsen updated CAMEL-7089:
-------------------------------

      Component/s: camel-script
    Fix Version/s: 2.13.0
                   2.12.3

> The "context" attribute does not exist in Groovy ScriptContext
> --------------------------------------------------------------
>
>                 Key: CAMEL-7089
>                 URL: https://issues.apache.org/jira/browse/CAMEL-7089
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-groovy, camel-script
>    Affects Versions: 2.12.2
>            Reporter: John Yin
>            Priority: Minor
>             Fix For: 2.12.3, 2.13.0
>
>
> When using the "context" attribute in a language://groovy.resource.classpath: 
> endpoint, I received the error below.  But since the "request" attribute is 
> still available, there is an easy workaround to access the CamelContext via 
> Message and Exchange.
> groovy.lang.MissingPropertyException: No such property: context for class: 
> script1387662776758798628846
>       at 
> org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:50)
>       at 
> org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:49)
>       at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGroovyObjectGetProperty(AbstractCallSite.java:231)
>       at 
> script1387662776758798628846.run(script1387662776758798628846.groovy:93)
>       at 
> org.apache.camel.language.groovy.GroovyExpression.evaluate(GroovyExpression.java:52)
>       at 
> org.apache.camel.component.language.LanguageProducer.process(LanguageProducer.java:82)
>       at 
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>       at 
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110)
>       at 
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
>       at 
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)
>       at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>       at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
>       at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
>       at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>       at 
> org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:401)
>       at 
> org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:201)
>       at 
> org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:165)
>       at 
> org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187)
>       at 
> org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114)
>       at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>       at 
> java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
>       at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
>       at 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
>       at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
>       at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
>       at java.lang.Thread.run(Thread.java:722)



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to