metamodel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dennis Du Krøger (JIRA) <j...@apache.org>
Subject [jira] [Commented] (METAMODEL-241) Deserializing legacy objects fails on some JREs
Date Fri, 13 May 2016 19:50:13 GMT

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

Dennis Du Krøger commented on METAMODEL-241:
--------------------------------------------

It can very well be that they updated some of their build machines. 

> Deserializing legacy objects fails on some JREs
> -----------------------------------------------
>
>                 Key: METAMODEL-241
>                 URL: https://issues.apache.org/jira/browse/METAMODEL-241
>             Project: Apache MetaModel
>          Issue Type: Bug
>    Affects Versions: 4.5.2
>         Environment: Windows 7
> JDK 1.8.0_77
> Happens both via command line build and test runs in eclipse
>            Reporter: Kasper Sørensen
>
> I just got myself a new laptop and installed a new development environment. For some
reason there seems to be a change in the JRE that causes legacy object deserialization to
fail with the following causes:
> The failing test is {code}
> java.io.InvalidClassException: cannot bind enum descriptor to a non-enum class
> 	at java.io.ObjectStreamClass.initNonProxy(Unknown Source)
> 	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
> 	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
> 	at java.io.ObjectInputStream.readEnum(Unknown Source)
> 	at java.io.ObjectInputStream.readObject0(Unknown Source)
> 	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
> 	at java.io.ObjectInputStream.readSerialData(Unknown Source)
> 	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
> 	at java.io.ObjectInputStream.readObject0(Unknown Source)
> 	at java.io.ObjectInputStream.readObject(Unknown Source)
> 	at java.util.ArrayList.readObject(Unknown Source)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
> 	at java.io.ObjectInputStream.readSerialData(Unknown Source)
> 	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
> 	at java.io.ObjectInputStream.readObject0(Unknown Source)
> 	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
> 	at java.io.ObjectInputStream.readSerialData(Unknown Source)
> 	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
> 	at java.io.ObjectInputStream.readObject0(Unknown Source)
> 	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
> 	at java.io.ObjectInputStream.readSerialData(Unknown Source)
> 	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
> 	at java.io.ObjectInputStream.readObject0(Unknown Source)
> 	at java.io.ObjectInputStream.readObject(Unknown Source)
> 	at org.apache.metamodel.util.LegacyDeserializationObjectInputStreamTest.testCreateSerializeAndDeserializeOldSchemaAndQuery(LegacyDeserializationObjectInputStreamTest.java:67)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at junit.framework.TestCase.runTest(TestCase.java:176)
> 	at junit.framework.TestCase.runBare(TestCase.java:141)
> ...
> {code}
> and underlying I found that in LegacyDeserializationObjectInputStream.isEnumExpected(...)
we run into this problem which causes the rest of the deserialization to go wrong:
> {code}
> java.lang.reflect.InvocationTargetException
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at org.apache.metamodel.util.LegacyDeserializationObjectInputStream.isEnumExpected(LegacyDeserializationObjectInputStream.java:257)
> 	at org.apache.metamodel.util.LegacyDeserializationObjectInputStream.readClassDescriptor(LegacyDeserializationObjectInputStream.java:231)
> 	at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
> 	at java.io.ObjectInputStream.readClassDesc(Unknown Source)
> 	at java.io.ObjectInputStream.readEnum(Unknown Source)
> 	at java.io.ObjectInputStream.readObject0(Unknown Source)
> 	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
> 	at java.io.ObjectInputStream.readSerialData(Unknown Source)
> 	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
> 	at java.io.ObjectInputStream.readObject0(Unknown Source)
> 	at java.io.ObjectInputStream.readObject(Unknown Source)
> 	at java.util.ArrayList.readObject(Unknown Source)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
> 	at java.io.ObjectInputStream.readSerialData(Unknown Source)
> 	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
> 	at java.io.ObjectInputStream.readObject0(Unknown Source)
> 	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
> 	at java.io.ObjectInputStream.readSerialData(Unknown Source)
> 	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
> 	at java.io.ObjectInputStream.readObject0(Unknown Source)
> 	at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
> 	at java.io.ObjectInputStream.readSerialData(Unknown Source)
> 	at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
> 	at java.io.ObjectInputStream.readObject0(Unknown Source)
> 	at java.io.ObjectInputStream.readObject(Unknown Source)
> 	at org.apache.metamodel.util.LegacyDeserializationObjectInputStreamTest.testCreateSerializeAndDeserializeOldSchemaAndQuery(LegacyDeserializationObjectInputStreamTest.java:67)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Unknown Source)
> 	at junit.framework.TestCase.runTest(TestCase.java:176)
> 	at junit.framework.TestCase.runBare(TestCase.java:141)
> ...
> Caused by: java.lang.InternalError: Unexpected call when not initialized
> 	at java.io.ObjectStreamClass.requireInitialized(Unknown Source)
> 	at java.io.ObjectStreamClass.isEnum(Unknown Source)
> 	... 53 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message