camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Willem Jiang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CAMEL-7089) The "context" attribute does not exist in Groovy ScriptContext
Date Thu, 26 Dec 2013 01:57:53 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-7089?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13856707#comment-13856707
] 

Willem Jiang commented on CAMEL-7089:
-------------------------------------

It looks like groovy is using context for the other use case, I already update the wiki page
for it.


> 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
>            Assignee: Willem Jiang
>            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)

Mime
View raw message