Add new tunable (errorOnUnsupportedJavaVersion) to allow running with older versions of Java

Currently we intentionally throw an exception if Daffodil is not run
with Java 8 due to bugs in how Java 7 handles decoding errors. However,
there are some cases where a user has no choice except to run under Java
7.

This patch adds a new tunable "errorOnUnsupportedJavaVersion" that causes
Java 8 check failures to be logged as a warning rather than thrown as an
exception. This allows the above use case to be possible, with the explicit
understanding that it is not fully tested and is know to have unexpected
behavior in some circumstances.

Additionally, the file "/daffodil-config.xml" can be put on the
classpath to override tunables globally, regardless of how Daffodil is
run (e.g. CLI, TDMLRunner, API, etc.). This allows one to easily run all
tests and processing with the errorOnUnsupportedJavaVersion check
disable, or other tunables modified, if desired.

DAFFODIL-1921
3 files changed
tree: 814bfcf70d737f6a0eab2e9dd07651b441a1a43c
  1. daffodil-cli/
  2. daffodil-core/
  3. daffodil-io/
  4. daffodil-japi/
  5. daffodil-lib/
  6. daffodil-macro-lib/
  7. daffodil-propgen/
  8. daffodil-runtime1/
  9. daffodil-runtime1-unparser/
  10. daffodil-sapi/
  11. daffodil-tdml/
  12. daffodil-test/
  13. daffodil-test-ibm1/
  14. eclipse-projects/
  15. project/
  16. test-stdLayout/
  17. tutorials/
  18. .classpath
  19. .ensime
  20. .gitignore
  21. .rat-excludes
  22. .travis.yml
  23. build.sbt
  24. DISCLAIMER
  25. KEYS
  26. LICENSE
  27. NOTICE
  28. README.md
README.md

Apache Daffodil (incubating)

Introduction

Apache Daffodil (incubating) is the open source implementation of the Data Format Description Language (DFDL), a specification created by the Open Grid Forum. DFDL is capable of describing many data formats, including textual and binary, commercial record-oriented, scientific and numeric, modern and legacy, and many industry standards. It leverages XML technology and concepts, using a subset of W3C XML schema type system and annotations to describe such data. Daffodil uses this description to parse data into an infoset represented as XML or JSON, easily capable of ingestion, validation, and transformation.

For more information about Daffodil, see https://daffodil.apache.org/.

Build Requirements

  • JDK 1.8
  • Scala 2.11.8
  • SBT 0.13.8

Getting Started

To build Daffodil:

$ sbt clean package

To run all Daffodil tests:

# run all unit tests
$ sbt test 
# run all integration tests
$ sbt it:test

To build the Daffodil command line interface:

$ sbt daffodil-cli/stage

The above will create Linux and Windows shell scripts in daffodil-cli/target/universal/stage/bin/. See the Command Line Interface documentation for details on its usage.

Debugging CLI Tests in Eclipse

The CLI tests in daffodil-cli execute a daffodil script to perform tests. Before testing in Eclipse, you must first build that script by running sbt daffodil-cli/stage. Additionally, because the tests spawn a sub-shell for executing the script, tests must be individually modified to make them debuggable in Eclipse--the idiom is:

  // tests all synthesize a command line into val cmd
  val cmd = .....
  // Instead of running the rest of the test, do these two lines:
  val args = cmd.split(' ').tail // cmdline minus the daffodil program name.
  Main.run(args) // Run Main directly, so we can debug.

Note that this does not perform the ‘expect’ checks, so you have to type the commands at the console pane, and inspect the output to see if it is what you want.

Getting Help

For questions, we can be reached at the dev@daffodil.apache.org or user@daffodil.apache.org mailing lists or in #Daffodil on ASF HipChat. Bugs can be reported via the Daffodil JIRA.

License

Daffodil is licensed under the Apache License, v2.0