camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Diesler (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CAMEL-9122) Ruby script cannot access request object
Date Tue, 08 Sep 2015 14:07:45 GMT
Thomas Diesler created CAMEL-9122:
-------------------------------------

             Summary: 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.16.0


{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}



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

Mime
View raw message