[JBoss JIRA] (JBESB-3961) SmooksAction with XML-to-Java enum mapping may throw an exception under heavy load
by László van den Hoek (JIRA)
[ https://issues.jboss.org/browse/JBESB-3961?page=com.atlassian.jira.plugin... ]
László van den Hoek edited comment on JBESB-3961 at 5/26/14 8:13 AM:
---------------------------------------------------------------------
The actual exception occurs at {{org.mvel2.asm.ClassWriter}}; this class is not within {{milyn-smooks-all.jar}} but in {{mvel2-2.1.x.jar}} (where x = {{mvel2-2.1.0.drools10}} for JBoss ESB 4.12).
Have you tried replacing the MVEL2 JAR with a newer 2.1.x version (newest = {{2.1.9.Final}}) or even the very latest one ({{2.2.0.Final}})?
was (Author: laszlovandenhoek):
The actual exception occurs at org.mvel2.asm.ClassWriter; this class is not within {{milyn-smooks-all.jar}} but in {{mvel2-2.1.x.jar}} (where x = {{mvel2-2.1.0.drools10}} for JBoss ESB 4.12).
Have you tried replacing the MVEL2 JAR with a newer 2.1.x version (newest = {{2.1.9.Final}}) or even the very latest one ({{2.2.0.Final}})?
> SmooksAction with XML-to-Java enum mapping may throw an exception under heavy load
> ----------------------------------------------------------------------------------
>
> Key: JBESB-3961
> URL: https://issues.jboss.org/browse/JBESB-3961
> Project: JBoss ESB
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Transformation Service
> Affects Versions: 4.12
> Reporter: Tadayoshi Sato
> Labels: smooks
> Attachments: JBESB-3961-reproducer.zip
>
>
> Under heavy load (more that 10 requests per second), SmooksAction sometimes throws an exception like the following. Note that this error may occur only if SmooksAction has the Smooks config of XML-to-Java mapping which involves enum type mapping with default value specified (see attached reproducer project).
> {code}
> org.milyn.SmooksException: Unable to filter InputStream for target profile [org.milyn.profile.Profile#default_profile].
> at org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:294)
> at org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:243)
> at org.milyn.delivery.dom.SmooksDOMFilter.doFilter(SmooksDOMFilter.java:216)
> at org.milyn.Smooks._filter(Smooks.java:516)
> at org.milyn.Smooks.filterSource(Smooks.java:475)
> at org.milyn.container.plugin.PayloadProcessor.process(PayloadProcessor.java:112)
> at org.jboss.soa.esb.smooks.SmooksAction.process(SmooksAction.java:217)
> at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:667)
> at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.processPipeline(ActionProcessingPipeline.java:614)
> at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:442)
> at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:587)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:744)
> Caused by: org.milyn.expression.ExpressionEvaluationException: Error evaluating MVEL expression 'this.type = (com.redhat.samples.esb.model.Type.X);' against object type 'com.redhat.samples.esb.model.Hello'. Common issues include:
> 1. Referencing a variable that is not bound into the context. In this case use the 'isdef' operator to check if the variable is bound in the context.
> 2. Invalid expression reference to a List/Array based variable token. Example List/Array referencing expression token: 'order.orderItems[0].productId'.
> at org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:110)
> at org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:115)
> at org.milyn.javabean.BeanInstanceCreator.createAndSetBean(BeanInstanceCreator.java:269)
> at org.milyn.javabean.BeanInstanceCreator.visitBefore(BeanInstanceCreator.java:210)
> at org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.processMapping(SmooksDOMFilter.java:759)
> at org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.process(SmooksDOMFilter.java:710)
> at org.milyn.delivery.dom.SmooksDOMFilter$ElementProcessor.access$000(SmooksDOMFilter.java:666)
> at org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:385)
> at org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:317)
> at org.milyn.delivery.dom.SmooksDOMFilter.filter(SmooksDOMFilter.java:292)
> ... 13 more
> Caused by: [Error: value X]
> [Near : {... this.type = (com.redhat.sample ....}]
> ^
> [Line: 1, Column: 1]
> at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:883)
> at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeAccessor(ASMAccessorOptimizer.java:243)
> at org.mvel2.optimizers.dynamic.DynamicGetAccessor.optimize(DynamicGetAccessor.java:90)
> at org.mvel2.optimizers.dynamic.DynamicGetAccessor.getValue(DynamicGetAccessor.java:64)
> at org.mvel2.ast.ASTNode.getReducedValueAccelerated(ASTNode.java:108)
> at org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:38)
> at org.mvel2.ast.Substatement.getReducedValueAccelerated(Substatement.java:44)
> at org.mvel2.compiler.ExecutableAccessor.getValue(ExecutableAccessor.java:38)
> at org.mvel2.ast.DeepAssignmentNode.getReducedValueAccelerated(DeepAssignmentNode.java:92)
> at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
> at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:126)
> at org.mvel2.MVEL.executeExpression(MVEL.java:930)
> at org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:99)
> ... 22 more
> Caused by: java.lang.IllegalArgumentException: value X
> at org.mvel2.asm.ClassWriter.newConstItem(ClassWriter.java:906)
> at org.mvel2.asm.MethodWriter.visitLdcInsn(MethodWriter.java:1014)
> at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.getBeanProperty(ASMAccessorOptimizer.java:1229)
> at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.compileAccessor(ASMAccessorOptimizer.java:758)
> ... 34 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.2.3#6260)