Java 8: MVEL 2.0.17 replacing with 2.2.0.Final

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Java 8: MVEL 2.0.17 replacing with 2.2.0.Final

Julio C. VERGARA-HEINRROTH

While testing Smooks with Java 8, I ran into the following stacktrace:
 
  1. Caused by: org.milyn.SmooksException: Error in 'org.milyn.javabean.BeanInstanceCreator' while processing the visitBefore event.
  2.                 at org.milyn.delivery.sax.SAXHandler.processVisitorException(SAXHandler.java:573)
  3.                 at org.milyn.delivery.sax.SAXHandler.processVisitorException(SAXHandler.java:559)
  4.                 at org.milyn.delivery.sax.SAXHandler.visitBefore(SAXHandler.java:311)
  5.                 at org.milyn.delivery.sax.SAXHandler.startElement(SAXHandler.java:173)
  6.                 at org.milyn.delivery.SmooksContentHandler.startElement(SmooksContentHandler.java:80)
  7.                 at org.milyn.edisax.EDIParser.startElement(EDIParser.java:860)
  8.                 at org.milyn.edisax.EDIParser.startElement(EDIParser.java:847)
  9.                 at org.milyn.edisax.EDIParser.startElement(EDIParser.java:842)
  10.                 at org.milyn.edisax.EDIParser.mapSegment(EDIParser.java:547)
  11.                 at org.milyn.edisax.EDIParser.mapSegments(EDIParser.java:520)
  12.                 at org.milyn.edisax.EDIParser.mapSegments(EDIParser.java:523)
  13.                 at org.milyn.edisax.EDIParser.mapSegments(EDIParser.java:523)
  14.                 at org.milyn.edisax.EDIParser.mapSegments(EDIParser.java:523)
  15.                 at org.milyn.edisax.EDIParser.mapSegments(EDIParser.java:523)
  16.                 at org.milyn.edisax.EDIParser.mapSegments(EDIParser.java:450)
  17.                 at org.milyn.edisax.EDIParser.parse(EDIParser.java:426)
  18.                 at org.milyn.edisax.EDIParser.parse(EDIParser.java:386)
  19.                 at org.milyn.smooks.edi.EDIReader.parse(EDIReader.java:110)
  20.                 at org.milyn.delivery.sax.SAXParser.parse(SAXParser.java:76)
  21.                 at org.milyn.delivery.sax.SmooksSAXFilter.doFilter(SmooksSAXFilter.java:86)
  22.                 ... 45 more
  23. Caused by: java.lang.NoSuchMethodError: sun.misc.Unsafe.defineClass(Ljava/lang/String;[BII)Ljava/lang/Class;
  24.                 at org.mvel2.optimizers.dynamic.DynamicClassLoader.defineClassX(DynamicClassLoader.java:59)
  25.                 at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.loadClass(ASMAccessorOptimizer.java:1995)
  26.                 at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer._initializeAccessor(ASMAccessorOptimizer.java:624)
  27.                 at org.mvel2.optimizers.impl.asm.ASMAccessorOptimizer.optimizeSetAccessor(ASMAccessorOptimizer.java:554)
  28.                 at org.mvel2.optimizers.dynamic.DynamicSetAccessor.optimize(DynamicSetAccessor.java:76)
  29.                 at org.mvel2.optimizers.dynamic.DynamicSetAccessor.setValue(DynamicSetAccessor.java:53)
  30.                 at org.mvel2.compiler.CompiledAccExpression.setValue(CompiledAccExpression.java:47)
  31.                 at org.mvel2.ast.DeepAssignmentNode.getReducedValueAccelerated(DeepAssignmentNode.java:80)
  32.                 at org.mvel2.MVELRuntime.execute(MVELRuntime.java:85)
  33.                 at org.mvel2.compiler.CompiledExpression.getValue(CompiledExpression.java:107)
  34.                 at org.mvel2.MVEL.executeExpression(MVEL.java:1001)
  35.                 at org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:99)
  36.                 at org.milyn.expression.MVELExpressionEvaluator.exec(MVELExpressionEvaluator.java:115)
  37.                 at org.milyn.javabean.BeanInstanceCreator.createAndSetBean(BeanInstanceCreator.java:296)
  38.                 at org.milyn.javabean.BeanInstanceCreator.visitBefore(BeanInstanceCreator.java:241)
  39.                 at org.milyn.delivery.sax.SAXHandler.visitBefore(SAXHandler.java:302)
  40.                 ... 62 more
 

The version 2.0.17 of MVEL included in the SMooks dependency is not Java 8 compatible.

I force the following dependency and the error went away:
 
  1. <dependency>
  2.     <groupId>org.mvel</groupId>
  3.     <artifactId>mvel2</artifactId>
  4.     <version>2.2.0.Final</version>
  5. </dependency>
 

Could this be included in the next release? BTW. When is the new release?
Thanks,
Julio V.