You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Dave Thompson (Jira)" <ji...@apache.org> on 2021/11/22 17:54:00 UTC
[jira] [Reopened] (DAFFODIL-2579) java compile compatibility issue with Java 16/17
[ https://issues.apache.org/jira/browse/DAFFODIL-2579?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Dave Thompson reopened DAFFODIL-2579:
-------------------------------------
I built daffodil with java 8 and java 17 and executed the hexWords sbt test on each to verify tests run on both. The ran successfully on both.
Then I bulit daffodil on java 17, switched to use java 8 and executed the hexWords sbt tests. All of the tests failed with the following error below.
[info] Test TestHexWords.test_hexWords1 started
[error] Test TestHexWords.test_hexWords1 failed: org.apache.daffodil.exceptions.Abort: Invariant broken. Runtime.scala - Leaked exception: java.lang.NoSuchMethodError: java.nio.CharBuffer.position(I)Ljava/nio/CharBuffer;
[error] java.lang.NoSuchMethodError: java.nio.CharBuffer.position(I)Ljava/nio/CharBuffer;
[error] at org.apache.daffodil.io.InputSourceDataInputStream.lookingAt(InputSourceDataInputStream.scala:702)
[error] at org.apache.daffodil.processors.parsers.AssertPatternParser.$anonfun$parse$1(AssertPatternParsers.scala:75)
[error] at org.apache.daffodil.processors.parsers.AssertPatternParser.$anonfun$parse$1$adapted(AssertPatternParsers.scala:75)
[error] at org.apache.daffodil.util.LocalStackBase.apply(OnStack.scala:41)
[error] at org.apache.daffodil.processors.parsers.AssertPatternParser.parse(AssertPatternParsers.scala:75)
[error] at org.apache.daffodil.processors.parsers.Parser.parse1(Parser.scala:82)
[error] at org.apache.daffodil.processors.parsers.Parser.parse1$(Parser.scala:76)
[error] at org.apache.daffodil.processors.parsers.AssertPatternParser.parse1(AssertPatternParsers.scala:52)
[error] at org.apache.daffodil.processors.parsers.Unseparated.parseOne(UnseparatedSequenceParsers.scala:29)
[error] at org.apache.daffodil.processors.parsers.Unseparated.parseOne$(UnseparatedSequenceParsers.scala:27)
[error] at org.apache.daffodil.processors.parsers.ScalarOrderedUnseparatedSequenceChildParser.parseOne(UnseparatedSequenceParsers.scala:37)
[error] at org.apache.daffodil.processors.parsers.SequenceParserBase.parseOneInstanceWithMaybePoU(SequenceParserBases.scala:437)
[error] at org.apache.daffodil.processors.parsers.SequenceParserBase.parseOneInstance(SequenceParserBases.scala:422
[error] at org.apache.daffodil.processors.parsers.SequenceParserBase.parse(SequenceParserBases.scala:265)
[error] at org.apache.daffodil.processors.parsers.Parser.parse1(Parser.scala:82)
[error] at org.apache.daffodil.processors.parsers.Parser.parse1$(Parser.scala:76)
[error] at org.apache.daffodil.processors.parsers.CombinatorParser.parse1(Parser.scala:161)
[error] at org.apache.daffodil.processors.parsers.ElementParserBase.parse(ElementCombinator1.scala:135)
[error] at org.apache.daffodil.processors.parsers.Parser.parse1(Parser.scala:82)
[error] at org.apache.daffodil.processors.parsers.Parser.parse1$(Parser.scala:76)
[error] at org.apache.daffodil.processors.parsers.CombinatorParser.parse1(Parser.scala:161)
[error] at org.apache.daffodil.processors.parsers.Unseparated.parseOne(UnseparatedSequenceParsers.scala:29)
[error] at org.apache.daffodil.processors.parsers.Unseparated.parseOne$(UnseparatedSequenceParsers.scala:27)
[error] at org.apache.daffodil.processors.parsers.RepOrderedWithMinMaxUnseparatedSequenceChildParser.parseOne(UnseparatedSequenceParsers.scala:64)
[error] at org.apache.daffodil.processors.parsers.SequenceParserBase.parseOneInstanceWithMaybePoU(SequenceParserBases.scala:437)
[error] at org.apache.daffodil.processors.parsers.SequenceParserBase.parseOneInstance(SequenceParserBases.scala:422
[error] at org.apache.daffodil.processors.parsers.SequenceParserBase.parse(SequenceParserBases.scala:157)
[error] at org.apache.daffodil.processors.parsers.Parser.parse1(Parser.scala:82)
[error] at org.apache.daffodil.processors.parsers.Parser.parse1$(Parser.scala:76)
[error] at org.apache.daffodil.processors.parsers.CombinatorParser.parse1(Parser.scala:161)
[error] at org.apache.daffodil.processors.parsers.ElementParserBase.parse(ElementCombinator1.scala:135)
[error] at org.apache.daffodil.processors.parsers.Parser.parse1(Parser.scala:82)
[error] at org.apache.daffodil.processors.parsers.Parser.parse1$(Parser.scala:76)
[error] at org.apache.daffodil.processors.parsers.CombinatorParser.parse1(Parser.scala:161)
[error] at org.apache.daffodil.processors.DataProcessor.doParse(DataProcessor.scala:502)
[error] at org.apache.daffodil.processors.DataProcessor.parse(DataProcessor.scala:446)
[error] at org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.doParseWithBothApis(DaffodilTDMLDFDLProcessor.scala:311)
[error] at org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.parse(DaffodilTDMLDFDLProcessor.scala:247)
[error] at org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.parse(DaffodilTDMLDFDLProcessor.scala:252)
[error] at org.apache.daffodil.tdml.ParserTestCase.doParseExpectSuccess(TDMLRunner.scala:1059)
[error] at org.apache.daffodil.tdml.ParserTestCase.runParseExpectSuccess(TDMLRunner.scala:1202)
[error] at org.apache.daffodil.tdml.ParserTestCase.$anonfun$runProcessor$2(TDMLRunner.scala:953)
[error] at org.apache.daffodil.tdml.ParserTestCase.$anonfun$runProcessor$2$adapted(TDMLRunner.scala:950)
[error] at scala.util.Either$RightProjection.foreach(Either.scala:652)
[error] at org.apache.daffodil.tdml.ParserTestCase.runProcessor(TDMLRunner.scala:950)
[error] at org.apache.daffodil.tdml.TestCase.run(TDMLRunner.scala:903)
[error] at org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:418)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:191)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:197)
[error] at TestHexWords.test_hexWords1(TestHexWords.java:36)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[error] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[error] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[error] at java.lang.reflect.Method.invoke(Method.java:498)
[error] at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
[error] at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
[error] at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
[error] at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
[error] at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
[error] at org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
[error] at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
[error] at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
[error] at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
[error] at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
[error] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
[error] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
[error] at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
[error] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
[error] at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
[error] at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
[error] at org.junit.runners.Suite.runChild(Suite.java:128)
[error] at org.junit.runners.Suite.runChild(Suite.java:27)
[error] at org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
[error] at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
[error] at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
[error] at org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
[error] at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
[error] at org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
[error] at org.junit.runners.ParentRunner.run(ParentRunner.java:413)
[error] at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
[error] at org.junit.runner.JUnitCore.run(JUnitCore.java:115)
[error] at com.novocode.junit.JUnitRunner$1.execute(JUnitRunner.java:132)
[error] at sbt.TestRunner.runTest$1(TestFramework.scala:140)
[error] at sbt.TestRunner.run(TestFramework.scala:155)
[error] at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.$anonfun$apply$1(TestFramework.scala:318)
[error] at sbt.TestFramework$.sbt$TestFramework$$withContextLoader(TestFramework.scala:278)
[error] at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:318)
[error] at sbt.TestFramework$$anon$3$$anonfun$$lessinit$greater$1.apply(TestFramework.scala:318)
[error] at sbt.TestFunction.apply(TestFramework.scala:330)
[error] at sbt.Tests$.$anonfun$toTask$1(Tests.scala:435)
[error] at sbt.std.Transform$$anon$3.$anonfun$apply$2(Transform.scala:46)
[error] at sbt.std.Transform$$anon$4.work(Transform.scala:68)
[error] at sbt.Execute.$anonfun$submit$2(Execute.scala:282)
[error] at sbt.internal.util.ErrorHandling$.wideConvert(ErrorHandling.scala:23)
[error] at sbt.Execute.work(Execute.scala:291)
[error] at sbt.Execute.$anonfun$submit$1(Execute.scala:282)
[error] at sbt.ConcurrentRestrictions$$anon$4.$anonfun$submitValid$1(ConcurrentRestrictions.scala:265)
[error] at sbt.CompletionService$$anon$2.call(CompletionService.scala:64)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
[error] at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[error] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[error] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[error] at java.lang.Thread.run(Thread.java:748)
[error]
[error] org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:137)
[error] org.apache.daffodil.exceptions.Assert$.invariantFailed(Assert.scala:183)
[error] org.apache.daffodil.processors.DataProcessor.doParse(DataProcessor.scala:561)
[error] org.apache.daffodil.processors.DataProcessor.parse(DataProcessor.scala:446), took 6.399 sec
[error] at org.apache.daffodil.exceptions.Assert$.abort(Assert.scala:137)
[error] at org.apache.daffodil.exceptions.Assert$.invariantFailed(Assert.scala:183)
[error] at org.apache.daffodil.processors.DataProcessor.doParse(DataProcessor.scala:561)
[error] at org.apache.daffodil.processors.DataProcessor.parse(DataProcessor.scala:446)
[error] at org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.doParseWithBothApis(DaffodilTDMLDFDLProcessor.scala:311)
[error] at org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.parse(DaffodilTDMLDFDLProcessor.scala:247)
[error] at org.apache.daffodil.tdml.processor.DaffodilTDMLDFDLProcessor.parse(DaffodilTDMLDFDLProcessor.scala:252)
[error] at org.apache.daffodil.tdml.ParserTestCase.doParseExpectSuccess(TDMLRunner.scala:1059)
[error] at org.apache.daffodil.tdml.ParserTestCase.runParseExpectSuccess(TDMLRunner.scala:1202)
[error] at org.apache.daffodil.tdml.ParserTestCase.$anonfun$runProcessor$2(TDMLRunner.scala:953)
[error] at org.apache.daffodil.tdml.ParserTestCase.$anonfun$runProcessor$2$adapted(TDMLRunner.scala:950)
[error] at scala.util.Either$RightProjection.foreach(Either.scala:652)
[error] at org.apache.daffodil.tdml.ParserTestCase.runProcessor(TDMLRunner.scala:950)
[error] at org.apache.daffodil.tdml.TestCase.run(TDMLRunner.scala:903)
[error] at org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:418)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:191)
[error] at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:197)
[error] at TestHexWords.test_hexWords1(TestHexWords.java:36)
[error] ...
> java compile compatibility issue with Java 16/17
> ------------------------------------------------
>
> Key: DAFFODIL-2579
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2579
> Project: Daffodil
> Issue Type: Improvement
> Components: General
> Affects Versions: 3.2.0
> Reporter: Mike Beckerle
> Assignee: Steve Lawrence
> Priority: Major
> Fix For: 3.2.0
>
>
> When testing the OpenDFDL hexWords example, I got this error message:
> {code}
> [warn] /home/mbeckerle/Documents/dataiti/git/dfdl-schemas/dfdl-examples/hexWords/src/main/java/hexWords/MessageParser.java: /home/mbeckerle/.ivy2/local/org.apache.daffodil/daffodil-japi_2.12/3.2.0-SNAPSHOT/jars/daffodil-japi_2.12.jar(/org/apache/daffodil/japi/ValidationMode.class): major version 61 is newer than 60, the highest major version supported by this compiler.
> {code}
> This appears to be due to the fact that my local snapshot of Daffodil had been compiled using Java 17, but my java-based hexWords application is using Java 16.
> Recompiling Daffodil with Java 16 fixes this.
> This does suggest that we must compile the Daffodil 3.2.0 distribution with Java 8, or we risk the daffodil libraries being incompatible backward for a user that is still using Java 8.
> Perhaps we need compilation options on Daffodil so that no matter what JVM/java version you are using, the jar files are backward compatible to Java 8?
--
This message was sent by Atlassian Jira
(v8.20.1#820001)