camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CAMEL-9122) Ruby script cannot access request object
Date Mon, 28 Sep 2015 06:28:04 GMT

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

Claus Ibsen updated CAMEL-9122:
-------------------------------
    Fix Version/s:     (was: 2.16.0)
                   2.17.0

> Ruby script cannot access request object
> ----------------------------------------
>
>                 Key: CAMEL-9122
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9122
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-script
>            Reporter: Thomas Diesler
>             Fix For: 2.17.0
>
>
> with script
> {code}
> body = $request.getBody()
> $request.setBody("Hello " + body);
> {code}
> we get 
> {code}
> uby: body = $request.getBody();
> $request.setBody("Hello " + body);. Cause: org.jruby.embed.EvalFailedException: (NoMethodError)
undefined method `getBody' for nil:NilClass
> 	at org.apache.camel.builder.script.ScriptBuilder.createScriptEvaluationException(ScriptBuilder.java:540)
> 	at org.apache.camel.builder.script.ScriptBuilder.evaluateScript(ScriptBuilder.java:409)
> 	at org.apache.camel.builder.script.ScriptBuilder.process(ScriptBuilder.java:181)
> 	at org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63)
> 	at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:77)
> 	at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:460)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
> 	at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
> 	at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:190)
> 	at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:109)
> 	at org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:68)
> 	at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:404)
> 	at org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:372)
> 	at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:262)
> 	at org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:372)
> 	at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:230)
> 	at org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:128)
> 	at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:132)
> 	at org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:149)
> 	at org.apache.camel.impl.DefaultProducerTemplate.requestBody(DefaultProducerTemplate.java:301)
> 	at org.apache.camel.impl.DefaultProducerTemplate.requestBody(DefaultProducerTemplate.java:331)
> 	at org.wildfly.camel.test.script.ScriptIntegrationTest.scriptProcessing(ScriptIntegrationTest.java:100)
> 	at org.wildfly.camel.test.script.ScriptIntegrationTest.testRuby(ScriptIntegrationTest.java:75)
> {code}
> It seems that the scriptengine can load the script and that the request object is nil.
> This used to work 2.15.2 and earlier 2.16 snapshots 
> CrossRef: https://github.com/wildfly-extras/wildfly-camel/issues/845



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message