Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-2266

Daffodil does not validate compatability with pre-compiled parsers

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.0
    • 3.2.0
    • Middle "End"
    • None

    Description

      In general, we do not claim to support untrusted input as pre-compiled parsers, so not validating pre-compiled parsers is reasonable.

      However, a common mistake users are likely to make is using a parser compiled with a different version of Daffodil. While this is not supported, we do not fail gracefully, instead throwing the below unhandled exception. We should instead detect this case, and issue a user-friendly error indicating the problem.

      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      !! An unexpected exception occurred. This is a bug! !!
      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

      Please report this bug and help us fix it:

      https://daffodil.apache.org/community/#issue-tracker

      Please include the following exception, the command you
      ran, and any input, schema, or tdml files used that led
      to this bug.

      java.io.InvalidClassException: org.apache.daffodil.processors.DataProcessor; local class incompatible: stream classdesc serialVersionUID = 875658728054701677, local class serialVersionUID = 886020291118569922
      at java.io.ObjectStreamClass.initNonProxy(ObjectStreamClass.java:699)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1885)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1751)
      at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1885)
      at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1751)
      at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2042)
      at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1573)
      at java.io.ObjectInputStream.readObject(ObjectInputStream.java:431)
      at org.apache.daffodil.compiler.Compiler.reload(Compiler.scala:293)
      at org.apache.daffodil.compiler.Compiler.reload(Compiler.scala:276)
      at org.apache.daffodil.Main$.$anonfun$createProcessorFromParser$1(Main.scala:638)
      at org.apache.daffodil.util.Timer$.getTimeResult(Timer.scala:76)
      at org.apache.daffodil.util.Timer$.getResult(Timer.scala:35)
      at org.apache.daffodil.Main$.createProcessorFromParser(Main.scala:638)
      at org.apache.daffodil.Main$.run(Main.scala:819)
      at org.apache.daffodil.Main$.main(Main.scala:1388)
      at org.apache.daffodil.Main.main(Main.scala

      Attachments

        Activity

          People

            slawrence Steve Lawrence
            brandon.sloane Brandon Sloane
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: