[jboss-jira] [JBoss JIRA] (WFLY-9020) Wildfly 10 - JPA Entity deserialization problem on @Transient field

Nuno Godinho de Matos (JIRA) issues at jboss.org
Wed Jun 28 16:12:00 EDT 2017


Nuno Godinho de Matos created WFLY-9020:
-------------------------------------------

             Summary: Wildfly 10 - JPA Entity deserialization problem on @Transient field
                 Key: WFLY-9020
                 URL: https://issues.jboss.org/browse/WFLY-9020
             Project: WildFly
          Issue Type: Bug
          Components: Application Client
    Affects Versions: 10.0.0.Final
         Environment: Windows 7, Eclipselink 2.6.4 integration, Widlfly 10.0.0.Final
            Reporter: Nuno Godinho de Matos
            Assignee: Stuart Douglas


In Wildfly 10, 

We have some system tests that sporadically fail when the client of the application loads an entity, connected to other sub-entities, where one of these sub-entities has a @Transient field.

In Particular, we have an entity Attributes that has a field of the form:

{panel}
 @Transient
    private Map<String, String> attributeMap = new TreeMap<String, String>();
{panel}

The root cause of the deserialization problem is of the form:
{panel}
Caused by: an exception which occurred:
	in object of type java.util.TreeMap
	in field attributeMap
	in object of type basepackage.entity.Attributes
	in field attributes
	in object of type basepackage.entity.SubEntityB
	in element at index [0] of size [1]
	in field delegate
	in object of type org.eclipse.persistence.internal.indirection.jdk8.IndirectList
	in field loadUnits
	in object of type basepackage.entity.ParentEntityA
{panel}

The de-serialization execution stack looks as follows:

{panel}
Caused by: java.io.OptionalDataException
	at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:147)
	at org.jboss.marshalling.river.BlockUnmarshaller.readObject(BlockUnmarshaller.java:135)
	at org.jboss.marshalling.MarshallerObjectInputStream.readObjectOverride(MarshallerObjectInputStream.java:53)
	at org.jboss.marshalling.river.RiverObjectInputStream.readObjectOverride(RiverObjectInputStream.java:307)
	at java.io.ObjectInputStream.readObject(ObjectInputStream.java:367)
	at java.util.TreeMap.buildFromSorted(TreeMap.java:2567)
	at java.util.TreeMap.buildFromSorted(TreeMap.java:2583)
	at java.util.TreeMap.buildFromSorted(TreeMap.java:2508)
	at java.util.TreeMap.readObject(TreeMap.java:2454)
	at sun.reflect.GeneratedMethodAccessor41.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.jboss.marshalling.reflect.SerializableClass.callReadObject(SerializableClass.java:307)
	at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1637)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1285)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:276)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:224)
	at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1745)
	at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1658)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1285)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:276)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:224)
	at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1745)
	at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1658)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1285)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:276)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:224)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadCollectionObject(RiverUnmarshaller.java:180)
	at org.jboss.marshalling.river.RiverUnmarshaller.readCollectionData(RiverUnmarshaller.java:776)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:675)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:224)
	at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1745)
	at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1658)
	at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1606)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1285)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:276)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:224)
	at org.jboss.marshalling.river.RiverUnmarshaller.readFields(RiverUnmarshaller.java:1745)
	at org.jboss.marshalling.river.RiverUnmarshaller.doInitSerializable(RiverUnmarshaller.java:1658)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadNewObject(RiverUnmarshaller.java:1285)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:276)
	at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)
	at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:41)
	at org.jboss.ejb.client.remoting.MethodInvocationResponseHandler$MethodInvocationResultProducer.getResult(MethodInvocationResponseHandler.java:104)
{panel}

We are using the following cliean library:

{panel}
  <dependency>
            <groupId>org.wildfly</groupId>
            <artifactId>wildfly-client-all</artifactId>
            <version>10.0.0.Final</version>
            <scope>test</scope>   
            <optional>true</optional>         
            <exclusions>
                <exclusion>
                    <groupId>org.apache.activemq</groupId> 
                    <artifactId>artemis-commons</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.activemq</groupId> 
                    <artifactId>artemis-core-client</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>org.apache.activemq</groupId> 
                    <artifactId>artemis-jms-client</artifactId>
                </exclusion>
                 <exclusion>
                    <groupId>org.apache.activemq</groupId> 
                    <artifactId>artemis-hqclient-protocol</artifactId>
                </exclusion>
                 <exclusion>
                    <groupId> org.slf4j</groupId> 
                    <artifactId>jcl-over-slf4j</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
{panel}

Currently no sample application exists to reproduce the issue.
On weblogic the deserialization process goes without incident.

Could the @Transient annotation and the eventual (empty map vs popuated attribtues map) play a role on this issue?

Kindest regards.



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jboss-jira mailing list