You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@daffodil.apache.org by Mike Beckerle <mb...@apache.org> on 2021/12/31 00:28:09 UTC

Is this bug in 2.7.0 familiar ? Workaround?

I have a test failing that I'm running against Daffodil 2.7.0. I'm
developing a large schema for a big obscure data format.
I need the schema to work on Daffodil 2.7.0, so I'm hoping to find a
workaround.

The bug does not occur in Daffodil 3.2.1.

The issue seems related to the TDML runner's saving/reloading of the
compiled schema.

The test is a TDML parserTestCase with a data file, infoset, and expected
validation errors. It is run validation="limited" and roundTrip="twoPass".

Here's the error:

Creating DFDL Test Suite for
file:/home/mbeckerle/Documents/dataiti/git/dfdl-schemas/dfdl-p8/target/test-classes/com/owlcyberdefense/p8/p8-HfCommand.tdml

java.lang.ClassCastException: cannot assign instance of
scala.collection.immutable.List$SerializationProxy to field
org.apache.daffodil.dsom.DPathCompileInfo.enclosingElementCompileInfos of
type scala.collection.Seq in instance of
org.apache.daffodil.dsom.DPathElementCompileInfo

at
java.base/java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2227)
at
java.base/java.io.ObjectStreamClass$FieldReflector.checkObjectFieldValueTypes(ObjectStreamClass.java:2191)
at
java.base/java.io.ObjectStreamClass.checkObjFieldValueTypes(ObjectStreamClass.java:1478)
at
java.base/java.io.ObjectInputStream$FieldValues.defaultCheckFieldValues(ObjectInputStream.java:2657)
at
java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2471)
at
java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2242)
....elided lots of serialized reading nested frames....
at
java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1742)
at
java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:514)
at
java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:472)
at org.apache.daffodil.compiler.Compiler.reload(Compiler.scala:257)
at
org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.generateProcessor(DaffodilTDMLDFDLProcessor.scala:121)
at
org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.compileProcessor(DaffodilTDMLDFDLProcessor.scala:138)
at
org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.$anonfun$getProcessor$1(DaffodilTDMLDFDLProcessor.scala:154)
at
org.apache.daffodil.tdml.SchemaCache.doCompile$lzycompute$1(SchemaCache.scala:95)
at org.apache.daffodil.tdml.SchemaCache.doCompile$1(SchemaCache.scala:95)
at
org.apache.daffodil.tdml.SchemaCache.$anonfun$compileAndCache$1(SchemaCache.scala:108)
at scala.collection.mutable.HashMap.getOrElseUpdate(HashMap.scala:86)
at
org.apache.daffodil.tdml.SchemaCache$Cache.getOrElseUpdate(SchemaCache.scala:51)
at
org.apache.daffodil.tdml.SchemaCache.compileAndCache(SchemaCache.scala:107)
at
org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.getProcessor(DaffodilTDMLDFDLProcessor.scala:154)
at org.apache.daffodil.tdml.TestCase.run(TDMLRunner.scala:756)
at org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:390)
at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:144)
at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:150)
at
com.owlcyberdefense.p8.TestP8HfCommand.testHfCommand1Neg(TestP8HfCommand.scala:29)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at
org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at
org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at
org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at
org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
at
org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at
org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
at
com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
at
com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
at
com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)


Process finished with exit code 255

Re: Is this bug in 2.7.0 familiar ? Workaround?

Posted by Mike Beckerle <mb...@apache.org>.
Created https://issues.apache.org/jira/browse/DAFFODIL-2617 for this
documentation issue.

On Fri, Dec 31, 2021 at 10:16 AM Mike Beckerle <mb...@apache.org> wrote:

> This combination works: Java 11, Scala 2.12.11, Daffodil 2.7.0
>
> Using scala 2.12.11 has the further implication that one cannot use Java
> 17 as Java 17 requires scala version 2.12.15.
>
> We probably need to add a matrix of this compatibility to our releases
> main page.
>
> On Fri, Dec 31, 2021 at 8:46 AM Steve Lawrence <sl...@apache.org>
> wrote:
>
>> Yes, this sounds very familiar.
>>
>> We had a pull request from Scala steward to updated scala to from
>> 2.12.11 to 2.12.13 which triggered what I think is the same bug:
>>
>>    https://github.com/apache/daffodil/pull/505
>>
>> Based on some of my comments in the PR, I tracked it down to a change in
>> Scala 2.12.12 that caused some deserialization issues. Daffodil 2.7.0
>> ships with Scala 2.12.11, but if you're overriding that dependency to
>> use a newer version of Scala, that might be the cause.
>>
>> The fix (added to that same PR) required code changes, so I don't think
>> there is a workaround aside from downgrading Scala to 2.12.11.
>>
>> Also, this fix was part of Daffodil 3.1.0, so any previous Daffodil
>> versions probably shouldn't use a Scala version newer than 2.12.11, at
>> least if there are plans to save/reload parsers.
>>
>>
>> On 12/30/21 7:28 PM, Mike Beckerle wrote:
>> > I have a test failing that I'm running against Daffodil 2.7.0. I'm
>> > developing a large schema for a big obscure data format.
>> > I need the schema to work on Daffodil 2.7.0, so I'm hoping to find a
>> > workaround.
>> >
>> > The bug does not occur in Daffodil 3.2.1.
>> >
>> > The issue seems related to the TDML runner's saving/reloading of the
>> > compiled schema.
>> >
>> > The test is a TDML parserTestCase with a data file, infoset, and
>> expected
>> > validation errors. It is run validation="limited" and
>> roundTrip="twoPass".
>> >
>> > Here's the error:
>> >
>> > Creating DFDL Test Suite for
>> >
>> file:/home/mbeckerle/Documents/dataiti/git/dfdl-schemas/dfdl-p8/target/test-classes/com/owlcyberdefense/p8/p8-HfCommand.tdml
>> >
>> > java.lang.ClassCastException: cannot assign instance of
>> > scala.collection.immutable.List$SerializationProxy to field
>> > org.apache.daffodil.dsom.DPathCompileInfo.enclosingElementCompileInfos
>> of
>> > type scala.collection.Seq in instance of
>> > org.apache.daffodil.dsom.DPathElementCompileInfo
>> >
>> > at
>> > java.base/java.io
>> .ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2227)
>> > at
>> > java.base/java.io
>> .ObjectStreamClass$FieldReflector.checkObjectFieldValueTypes(ObjectStreamClass.java:2191)
>> > at
>> > java.base/java.io
>> .ObjectStreamClass.checkObjFieldValueTypes(ObjectStreamClass.java:1478)
>> > at
>> > java.base/java.io
>> .ObjectInputStream$FieldValues.defaultCheckFieldValues(ObjectInputStream.java:2657)
>> > at
>> > java.base/java.io
>> .ObjectInputStream.readSerialData(ObjectInputStream.java:2471)
>> > at
>> > java.base/java.io
>> .ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2242)
>> > ....elided lots of serialized reading nested frames....
>> > at
>> > java.base/java.io
>> .ObjectInputStream.readObject0(ObjectInputStream.java:1742)
>> > at
>> > java.base/java.io
>> .ObjectInputStream.readObject(ObjectInputStream.java:514)
>> > at
>> > java.base/java.io
>> .ObjectInputStream.readObject(ObjectInputStream.java:472)
>> > at org.apache.daffodil.compiler.Compiler.reload(Compiler.scala:257)
>> > at
>> >
>> org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.generateProcessor(DaffodilTDMLDFDLProcessor.scala:121)
>> > at
>> >
>> org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.compileProcessor(DaffodilTDMLDFDLProcessor.scala:138)
>> > at
>> >
>> org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.$anonfun$getProcessor$1(DaffodilTDMLDFDLProcessor.scala:154)
>> > at
>> >
>> org.apache.daffodil.tdml.SchemaCache.doCompile$lzycompute$1(SchemaCache.scala:95)
>> > at
>> org.apache.daffodil.tdml.SchemaCache.doCompile$1(SchemaCache.scala:95)
>> > at
>> >
>> org.apache.daffodil.tdml.SchemaCache.$anonfun$compileAndCache$1(SchemaCache.scala:108)
>> > at scala.collection.mutable.HashMap.getOrElseUpdate(HashMap.scala:86)
>> > at
>> >
>> org.apache.daffodil.tdml.SchemaCache$Cache.getOrElseUpdate(SchemaCache.scala:51)
>> > at
>> >
>> org.apache.daffodil.tdml.SchemaCache.compileAndCache(SchemaCache.scala:107)
>> > at
>> >
>> org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.getProcessor(DaffodilTDMLDFDLProcessor.scala:154)
>> > at org.apache.daffodil.tdml.TestCase.run(TDMLRunner.scala:756)
>> > at
>> org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:390)
>> > at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:144)
>> > at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:150)
>> > at
>> >
>> com.owlcyberdefense.p8.TestP8HfCommand.testHfCommand1Neg(TestP8HfCommand.scala:29)
>> > at
>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
>> > Method)
>> > at
>> >
>> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
>> > at
>> >
>> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>> > at java.base/java.lang.reflect.Method.invoke(Method.java:568)
>> > at
>> >
>> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
>> > at
>> >
>> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
>> > at
>> >
>> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
>> > at
>> >
>> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
>> > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
>> > at
>> >
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
>> > at
>> >
>> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
>> > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
>> > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
>> > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
>> > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
>> > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
>> > at
>> >
>> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
>> > at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
>> > at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
>> > at
>> >
>> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
>> > at
>> >
>> com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
>> > at
>> >
>> com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
>> > at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
>> >
>> >
>> > Process finished with exit code 255
>> >
>>
>>

Re: Is this bug in 2.7.0 familiar ? Workaround?

Posted by Mike Beckerle <mb...@apache.org>.
This combination works: Java 11, Scala 2.12.11, Daffodil 2.7.0

Using scala 2.12.11 has the further implication that one cannot use Java 17
as Java 17 requires scala version 2.12.15.

We probably need to add a matrix of this compatibility to our releases main
page.

On Fri, Dec 31, 2021 at 8:46 AM Steve Lawrence <sl...@apache.org> wrote:

> Yes, this sounds very familiar.
>
> We had a pull request from Scala steward to updated scala to from
> 2.12.11 to 2.12.13 which triggered what I think is the same bug:
>
>    https://github.com/apache/daffodil/pull/505
>
> Based on some of my comments in the PR, I tracked it down to a change in
> Scala 2.12.12 that caused some deserialization issues. Daffodil 2.7.0
> ships with Scala 2.12.11, but if you're overriding that dependency to
> use a newer version of Scala, that might be the cause.
>
> The fix (added to that same PR) required code changes, so I don't think
> there is a workaround aside from downgrading Scala to 2.12.11.
>
> Also, this fix was part of Daffodil 3.1.0, so any previous Daffodil
> versions probably shouldn't use a Scala version newer than 2.12.11, at
> least if there are plans to save/reload parsers.
>
>
> On 12/30/21 7:28 PM, Mike Beckerle wrote:
> > I have a test failing that I'm running against Daffodil 2.7.0. I'm
> > developing a large schema for a big obscure data format.
> > I need the schema to work on Daffodil 2.7.0, so I'm hoping to find a
> > workaround.
> >
> > The bug does not occur in Daffodil 3.2.1.
> >
> > The issue seems related to the TDML runner's saving/reloading of the
> > compiled schema.
> >
> > The test is a TDML parserTestCase with a data file, infoset, and expected
> > validation errors. It is run validation="limited" and
> roundTrip="twoPass".
> >
> > Here's the error:
> >
> > Creating DFDL Test Suite for
> >
> file:/home/mbeckerle/Documents/dataiti/git/dfdl-schemas/dfdl-p8/target/test-classes/com/owlcyberdefense/p8/p8-HfCommand.tdml
> >
> > java.lang.ClassCastException: cannot assign instance of
> > scala.collection.immutable.List$SerializationProxy to field
> > org.apache.daffodil.dsom.DPathCompileInfo.enclosingElementCompileInfos of
> > type scala.collection.Seq in instance of
> > org.apache.daffodil.dsom.DPathElementCompileInfo
> >
> > at
> > java.base/java.io
> .ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2227)
> > at
> > java.base/java.io
> .ObjectStreamClass$FieldReflector.checkObjectFieldValueTypes(ObjectStreamClass.java:2191)
> > at
> > java.base/java.io
> .ObjectStreamClass.checkObjFieldValueTypes(ObjectStreamClass.java:1478)
> > at
> > java.base/java.io
> .ObjectInputStream$FieldValues.defaultCheckFieldValues(ObjectInputStream.java:2657)
> > at
> > java.base/java.io
> .ObjectInputStream.readSerialData(ObjectInputStream.java:2471)
> > at
> > java.base/java.io
> .ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2242)
> > ....elided lots of serialized reading nested frames....
> > at
> > java.base/java.io
> .ObjectInputStream.readObject0(ObjectInputStream.java:1742)
> > at
> > java.base/java.io
> .ObjectInputStream.readObject(ObjectInputStream.java:514)
> > at
> > java.base/java.io
> .ObjectInputStream.readObject(ObjectInputStream.java:472)
> > at org.apache.daffodil.compiler.Compiler.reload(Compiler.scala:257)
> > at
> >
> org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.generateProcessor(DaffodilTDMLDFDLProcessor.scala:121)
> > at
> >
> org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.compileProcessor(DaffodilTDMLDFDLProcessor.scala:138)
> > at
> >
> org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.$anonfun$getProcessor$1(DaffodilTDMLDFDLProcessor.scala:154)
> > at
> >
> org.apache.daffodil.tdml.SchemaCache.doCompile$lzycompute$1(SchemaCache.scala:95)
> > at org.apache.daffodil.tdml.SchemaCache.doCompile$1(SchemaCache.scala:95)
> > at
> >
> org.apache.daffodil.tdml.SchemaCache.$anonfun$compileAndCache$1(SchemaCache.scala:108)
> > at scala.collection.mutable.HashMap.getOrElseUpdate(HashMap.scala:86)
> > at
> >
> org.apache.daffodil.tdml.SchemaCache$Cache.getOrElseUpdate(SchemaCache.scala:51)
> > at
> >
> org.apache.daffodil.tdml.SchemaCache.compileAndCache(SchemaCache.scala:107)
> > at
> >
> org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.getProcessor(DaffodilTDMLDFDLProcessor.scala:154)
> > at org.apache.daffodil.tdml.TestCase.run(TDMLRunner.scala:756)
> > at
> org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:390)
> > at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:144)
> > at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:150)
> > at
> >
> com.owlcyberdefense.p8.TestP8HfCommand.testHfCommand1Neg(TestP8HfCommand.scala:29)
> > at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> > Method)
> > at
> >
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> > at
> >
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> > at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> > at
> >
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> > at
> >
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> > at
> >
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> > at
> >
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> > at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> > at
> >
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> > at
> >
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> > at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> > at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> > at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> > at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> > at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> > at
> >
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> > at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> > at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> > at
> >
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> > at
> >
> com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
> > at
> >
> com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
> > at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
> >
> >
> > Process finished with exit code 255
> >
>
>

Re: Is this bug in 2.7.0 familiar ? Workaround?

Posted by Steve Lawrence <sl...@apache.org>.
Yes, this sounds very familiar.

We had a pull request from Scala steward to updated scala to from 
2.12.11 to 2.12.13 which triggered what I think is the same bug:

   https://github.com/apache/daffodil/pull/505

Based on some of my comments in the PR, I tracked it down to a change in 
Scala 2.12.12 that caused some deserialization issues. Daffodil 2.7.0 
ships with Scala 2.12.11, but if you're overriding that dependency to 
use a newer version of Scala, that might be the cause.

The fix (added to that same PR) required code changes, so I don't think 
there is a workaround aside from downgrading Scala to 2.12.11.

Also, this fix was part of Daffodil 3.1.0, so any previous Daffodil 
versions probably shouldn't use a Scala version newer than 2.12.11, at 
least if there are plans to save/reload parsers.


On 12/30/21 7:28 PM, Mike Beckerle wrote:
> I have a test failing that I'm running against Daffodil 2.7.0. I'm
> developing a large schema for a big obscure data format.
> I need the schema to work on Daffodil 2.7.0, so I'm hoping to find a
> workaround.
> 
> The bug does not occur in Daffodil 3.2.1.
> 
> The issue seems related to the TDML runner's saving/reloading of the
> compiled schema.
> 
> The test is a TDML parserTestCase with a data file, infoset, and expected
> validation errors. It is run validation="limited" and roundTrip="twoPass".
> 
> Here's the error:
> 
> Creating DFDL Test Suite for
> file:/home/mbeckerle/Documents/dataiti/git/dfdl-schemas/dfdl-p8/target/test-classes/com/owlcyberdefense/p8/p8-HfCommand.tdml
> 
> java.lang.ClassCastException: cannot assign instance of
> scala.collection.immutable.List$SerializationProxy to field
> org.apache.daffodil.dsom.DPathCompileInfo.enclosingElementCompileInfos of
> type scala.collection.Seq in instance of
> org.apache.daffodil.dsom.DPathElementCompileInfo
> 
> at
> java.base/java.io.ObjectStreamClass$FieldReflector.setObjFieldValues(ObjectStreamClass.java:2227)
> at
> java.base/java.io.ObjectStreamClass$FieldReflector.checkObjectFieldValueTypes(ObjectStreamClass.java:2191)
> at
> java.base/java.io.ObjectStreamClass.checkObjFieldValueTypes(ObjectStreamClass.java:1478)
> at
> java.base/java.io.ObjectInputStream$FieldValues.defaultCheckFieldValues(ObjectInputStream.java:2657)
> at
> java.base/java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2471)
> at
> java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2242)
> ....elided lots of serialized reading nested frames....
> at
> java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1742)
> at
> java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:514)
> at
> java.base/java.io.ObjectInputStream.readObject(ObjectInputStream.java:472)
> at org.apache.daffodil.compiler.Compiler.reload(Compiler.scala:257)
> at
> org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.generateProcessor(DaffodilTDMLDFDLProcessor.scala:121)
> at
> org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.compileProcessor(DaffodilTDMLDFDLProcessor.scala:138)
> at
> org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.$anonfun$getProcessor$1(DaffodilTDMLDFDLProcessor.scala:154)
> at
> org.apache.daffodil.tdml.SchemaCache.doCompile$lzycompute$1(SchemaCache.scala:95)
> at org.apache.daffodil.tdml.SchemaCache.doCompile$1(SchemaCache.scala:95)
> at
> org.apache.daffodil.tdml.SchemaCache.$anonfun$compileAndCache$1(SchemaCache.scala:108)
> at scala.collection.mutable.HashMap.getOrElseUpdate(HashMap.scala:86)
> at
> org.apache.daffodil.tdml.SchemaCache$Cache.getOrElseUpdate(SchemaCache.scala:51)
> at
> org.apache.daffodil.tdml.SchemaCache.compileAndCache(SchemaCache.scala:107)
> at
> org.apache.daffodil.tdml.processor.TDMLDFDLProcessorFactory.getProcessor(DaffodilTDMLDFDLProcessor.scala:154)
> at org.apache.daffodil.tdml.TestCase.run(TDMLRunner.scala:756)
> at org.apache.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:390)
> at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:144)
> at org.apache.daffodil.tdml.Runner.runOneTest(RunnerFactory.scala:150)
> at
> com.owlcyberdefense.p8.TestP8HfCommand.testHfCommand1Neg(TestP8HfCommand.scala:29)
> at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method)
> at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
> at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.base/java.lang.reflect.Method.invoke(Method.java:568)
> at
> org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> at
> org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> at
> org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> at
> org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
> at
> org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
> at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
> at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
> at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
> at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
> at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
> at
> org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
> at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
> at
> com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69)
> at
> com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
> at
> com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
> at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
> 
> 
> Process finished with exit code 255
>