Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-9020

Wildfly 10 - JPA Entity deserialization problem on @Transient field

    XMLWordPrintable

Details

    • Bug
    • Resolution: Obsolete
    • Minor
    • None
    • 10.0.0.Final
    • Application Client
    • None

    Description

      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:

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

      The root cause of the deserialization problem is of the form:

      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

      The de-serialization execution stack looks as follows:

      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)

      We are using the following cliean library:

      <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>

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            nuno.godinhomatos NUNO GODINHO DE MATOS (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: