Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8268380

ClassNotFoundException not propagated to stack trace during deserialization

    XMLWordPrintable

Details

    Description

      In a recent issue, a customer had a client-server RMI setup which communicated was throwing a StreamCorruptedException (bug linked below)

      Upon investigation, it was discovered that the true problem was actually a ClassNotFoundException due to missing packages. The client and server both used differing JDK vendors which resulted in the same package being in 2 different locations on each jdk.

      Looking at the stack trace from the issue, there was no mention of the ClassNotFoundException and it was only discovered as a result of manually debugging the execution of the java.util.Vector.readObject

      As outlined in more detail in the linked bug, there was an associated CNFE returned from ObjectInputStream.LookupTable.lookupException which was not referenced in the stack trace

      Had this been present, the underlying cause of the StreamCorruptedException would have been seen from the start

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              ewhelan Evan Whelan (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: