I recently updated my projects from camel 2.10 which was running under jboss-fuse-6.0.0.redhat-024 to camel 2.12 in new fuse-fabric-7.3.0.redhat-199 and run into some problem with MVEL.
The problem seems to be related to OSGI environment/ class loaders. I have just forked the Camel github repo and added some code to camel-example-osgi project to reproduce exact problem. (https://github.com/andrzej-majewski/camel/commit/05cce19688c35126d9a190427260b2bd06a12162) I am happy to create pull request if that works better but i guess there should be a ticket created first. Additionally I have seen JIRA ticket (CAMEL-6680: mvel compiles expression setting TCCL to classloader ) which was suppose to fix similar. However in my experience it only make the problem worst. Any idea how to fix that?? ERROR | umer[myMvelTest] | DefaultErrorHandler | rg.apache.camel.util.CamelLogger 215 | 73 - org.apache.camel.camel-core - 2.13.0.SNAPSHOT | Failed delivery for (MessageId: ID:localhost-53318-1389377019021-1:1:1:1:56 on ExchangeId: ID-localhost-50885-1389373016025-4-57). Exhausted after delivery attempt: 1 caught: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[JmsMessage[JmsMessageID: ID:localhost-53318-1389377019021-1:1:1:1:56]] Message History --------------------------------------------------------------------------------------------------------------------------------------- RouteId ProcessorId Processor Elapsed (ms) [mvelTest ] [mvelTest ] [activemq://myMvelTest?concurrentConsumers=2 ] [ 6] [mvelTest ] [choice2 ] [when[mvel{Mvel[request.body != null]}]choice[] ] [ 3] Exchange --------------------------------------------------------------------------------------------------------------------------------------- Exchange[ Id ID-localhost-50885-1389373016025-4-57 ExchangePattern InOnly Headers {breadcrumbId=ID-localhost-53317-1389377018622-0-111, CamelRedelivered=false, CamelRedeliveryCounter=0, customer=demo, JMSCorrelationID=null, JMSDeliveryMode=2, JMSDestination=queue://myMvelTest, JMSExpiration=0, JMSMessageID=ID:localhost-53318-1389377019021-1:1:1:1:56, JMSPriority=4, JMSRedelivered=false, JMSReplyTo=null, JMSTimestamp=1389377019385, JMSType=null, JMSXGroupID=null, JMSXUserID=null} BodyType null Body [Body is null] ] Stacktrace --------------------------------------------------------------------------------------------------------------------------------------- org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[JmsMessage[JmsMessageID: ID:localhost-53318-1389377019021-1:1:1:1:56]] at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1379)[73:org.apache.camel.camel-core:2.13.0.SNAPSHOT] at org.apache.camel.impl.DefaultExchange.setException(DefaultExchange.java:283)[73:org.apache.camel.camel-core:2.13.0.SNAPSHOT] at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:95)[73:org.apache.camel.camel-core:2.13.0.SNAPSHOT] at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)[73:org.apache.camel.camel-core:2.13.0.SNAPSHOT] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398)[73:org.apache.camel.camel-core:2.13.0.SNAPSHOT] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[73:org.apache.camel.camel-core:2.13.0.SNAPSHOT] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)[73:org.apache.camel.camel-core:2.13.0.SNAPSHOT] at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105)[73:org.apache.camel.camel-core:2.13.0.SNAPSHOT] at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87)[73:org.apache.camel.camel-core:2.13.0.SNAPSHOT] at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103)[94:org.apache.camel.camel-jms:2.13.0.SNAPSHOT] at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562)[93:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500)[93:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468)[93:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)[93:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)[93:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1103)[93:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1095)[93:org.springframework.jms:3.2.4.RELEASE] at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:992)[93:org.springframework.jms:3.2.4.RELEASE] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)[:1.6.0_65] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)[:1.6.0_65] at java.lang.Thread.run(Thread.java:695)[:1.6.0_65] Caused by: java.lang.NoClassDefFoundError: org/apache/camel/language/mvel/RootObject at ASMAccessorImpl_7392784561389377019380.getValue(Unknown Source) at org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:73) at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:108) at org.mvel2.ast.BinaryOperation.getReducedValueAccelerated(BinaryOperation.java:114) at org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:42) at org.mvel2.MVEL.executeExpression(MVEL.java:954) at org.apache.camel.language.mvel.MvelExpression.evaluate(MvelExpression.java:56) at org.apache.camel.support.ExpressionSupport.matches(ExpressionSupport.java:32) at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:90) ... 18 more -- View this message in context: http://camel.465427.n5.nabble.com/Using-Mvel-in-OSGI-environment-tp5745849.html Sent from the Camel - Users mailing list archive at Nabble.com.
