Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-4326

HHH-4786 Hibernate SerializableType + Custom Serializable Class Causes CL Problems

    XMLWordPrintable

    Details

    • Affects:
      Release Notes
    • Release Notes Text:
      Hide
      The changes for <ulink url="https://jira.jboss.org/browse/JBPAPP-4471">JBPAPP-4471</ulink>
      caused an issue when users mapped non-JDK Serializable classes with <varname>SerializableType</varname>, and attempted to cache those values into a second level cache.
      <varname>SerializableType</varname> reported the classloader of <classname>java.io.Serializable</classname>
      as the classloader to use for deserialization. However, this classloader could not see into the classloader, or non-JDK classes.

      The classloader from
      <methodname>org.hibernate.util.SerializationHelper.deserialize(InputStream, ClassLoader)</methodname> now attempts to resolve the classloader that needs to be deserialized. If it cannot do this successfully, it uses the context classloader from the current thread and the classloader that loads the Hibernate class.
      Show
      The changes for <ulink url=" https://jira.jboss.org/browse/JBPAPP-4471 "> JBPAPP-4471 </ulink> caused an issue when users mapped non-JDK Serializable classes with <varname>SerializableType</varname>, and attempted to cache those values into a second level cache. <varname>SerializableType</varname> reported the classloader of <classname>java.io.Serializable</classname> as the classloader to use for deserialization. However, this classloader could not see into the classloader, or non-JDK classes. The classloader from <methodname>org.hibernate.util.SerializationHelper.deserialize(InputStream, ClassLoader)</methodname> now attempts to resolve the classloader that needs to be deserialized. If it cannot do this successfully, it uses the context classloader from the current thread and the classloader that loads the Hibernate class.
    • Release Notes Docs Status:
      Documented as Resolved Issue

      Description

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rrajesh Rajesh Rajasekaran
                  Reporter:
                  jiwils Jimmy Wilson
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: