You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Mike Beckerle (Jira)" <ji...@apache.org> on 2021/11/29 22:52:00 UTC

[jira] [Commented] (DAFFODIL-2591) Negative TDML Test causes reflective access serialization error using Java 17

    [ https://issues.apache.org/jira/browse/DAFFODIL-2591?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17450753#comment-17450753 ] 

Mike Beckerle commented on DAFFODIL-2591:
-----------------------------------------

I made sure the p8 schema was requesting scala 2.12.15 libraries in the build.sbt.

I also changed project settings to request Java 8 "Project Language Level". 

I still get this failure from the testHfCommand1Neg

{{java.io.InvalidObjectException: ReflectiveOperationException during deserialization

	at java.base/java.lang.invoke.SerializedLambda.readResolve(SerializedLambda.java:280)
	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 java.base/java.io.ObjectStreamClass.invokeReadResolve(ObjectStreamClass.java:1321)
	at java.base/java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2251)
	at java.base/java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1742)
	at java.base/java.io.ObjectInputStream$FieldValues.<init>(ObjectInputStream.java:2584)}}

> Negative TDML Test causes reflective access serialization error using Java 17
> -----------------------------------------------------------------------------
>
>                 Key: DAFFODIL-2591
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2591
>             Project: Daffodil
>          Issue Type: Bug
>          Components: General
>    Affects Versions: 3.1.0
>            Reporter: Mike Beckerle
>            Assignee: Steve Lawrence
>            Priority: Minor
>
> I have a reproducible case where I build daffodil from source using Java 17, I publishLocal, then I have a DFDL schema project where one test fails - a TDML-based negative test.
> The error has to do with reflective access and object deserialization - there are reflective capabilities that are no longer supported in Java 17; however, the question is why does this one negative TDML test cause this error when many/most other things do not. 
> Unfortunately, the DFDL schema for this is non-public. It is called the p8 schema for reference purposes. 
> I've listed this as minor priority because using Java 11, or Java 8 for the DFDL schema, this problem does not occur, even if Daffodil itself was built with a Java 17 JVM. 
> Note that this test was done AFTER the daffodil git commit bf576e8be961016df11b2b3caf50e0d8f9616867 which adds the "-release 8" to scalac and javac options.
> Is it the case that one must use these -release 8 options for a DFDL schema project (which contains scala test driver code) as well in order to avoid this compatibility error?



--
This message was sent by Atlassian Jira
(v8.20.1#820001)