Hi, after moving from Camel 2.8 to 2.14 I am facing a problem with the language component and ruby scripts. With concurrentConsumer > 1, a NPE is thrown by the RubyInstanceConfig class: java.lang.NullPointerException at org.jruby.RubyInstanceConfig.<init>(RubyInstanceConfig.java:1432) at org.jruby.embed.internal.AbstractLocalContextProvider.<init>(AbstractLocalContextProvider.java:42) at org.jruby.embed.internal.SingletonLocalContextProvider.<init>(SingletonLocalContextProvider.java:88) at org.jruby.embed.ScriptingContainer.getProviderInstance(ScriptingContainer.java:246) at org.jruby.embed.ScriptingContainer.<init>(ScriptingContainer.java:226) at org.jruby.embed.jsr223.JRubyEngineFactory.getScriptEngine(JRubyEngineFactory.java:170) at org.apache.camel.builder.script.ScriptBuilder.<init>(ScriptBuilder.java:136) at org.apache.camel.builder.script.ScriptBuilder.<init>(ScriptBuilder.java:89) at org.apache.camel.builder.script.ScriptLanguage.createExpression(ScriptLanguage.java:40) at org.apache.camel.component.language.LanguageProducer.process(LanguageProducer.java:85) at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:120) at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:163) 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.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:291) at org.apache.camel.component.seda.SedaConsumer.doRun(SedaConsumer.java:200) at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:147) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source)
This worked fine with Camel 2.8. I played with some of the ruby system properties like System.setProperty("org.jruby.embed.localcontext.scope", "threadsafe") but without success. I have attached a unit test to demonstrate the problem. ConcurrentJRubyTest.java <http://camel.465427.n5.nabble.com/file/n5759703/ConcurrentJRubyTest.java> The test passes with Camel 2.8, but fails with Camel 2.14. Any ideas how to solve this? Regards Christoph -- View this message in context: http://camel.465427.n5.nabble.com/NPE-with-language-ruby-and-concurrentConsumers-tp5759703.html Sent from the Camel - Users mailing list archive at Nabble.com.