Checked for duplicates
Yes - I've already checked
🐛 Describe the bug
When validating a Product_Resource label (introduced in PDS4 IM schema version 1Q00), validate fails with a noisy JAXB unmarshal error and silently skips content validation for the product.
The root cause is that pds4-jparser's JAXB context is generated from schema version 1K00 (pom.xml model-version property), so ProductResource is not a known type. Two symptoms result:
- Noisy error logs to stderr from
FileAreaExtractor.findAndFlagBadFilenames() (line 89-91), which logs a ParseException at ERROR level when it encounters any unrecognized product type:
[main] ERROR gov.nasa.pds.tools.validate.rule.FileAreaExtractor - Error occurred while trying to get the table file areas: unexpected element (uri:"http://pds.nasa.gov/pds4/pds/v1", local:"Product_Resource")
Fatal error: [...url=.../tc_Invalid_Product_Resource.xml...]: unexpected element (uri:"http://pds.nasa.gov/pds4/pds/v1", local:"Product_Resource")
[main] ERROR gov.nasa.pds.objectAccess.ObjectAccess - Failed to load the product from the label.
- Content/data validation is silently skipped —
DataDefinitionAndContentValidationRule.validate() catches ParseException from Label.open() and ignores it (line 160: // Ignore. Shouldn't happen), so any data-level validation for Product_Resource labels is never performed.
Note: Schema and Schematron validation still work correctly (they don't use JAXB), so structural label errors are still caught.
🕵️ Expected behavior
- No noisy JAXB error logs when a valid but unrecognized product type is encountered
- Once pds4-jparser is updated to include
Product_Resource (schema 1Q00), full content validation should work
📜 To Reproduce
- Run validate against any label with root element
<Product_Resource xmlns="http://pds.nasa.gov/pds4/pds/v1" ...>
- Observe ERROR-level logs from
FileAreaExtractor and ObjectAccess in stderr
🩺 Test Data / Additional context
Test files from pds4-information-model:
model-lddtool/src/test/resources/data/update_version/github931/tc_Invalid_Product_Resource.xml
model-lddtool/src/test/resources/data/update_version/github931/tc_Valid_Product_Resource.xml
⚙️ Engineering Details
Primary fix (pds4-jparser): Update pds4-jparser to generate JAXB classes from schema 1Q00 (which defines Product_Resource). See sister issue: NASA-PDS/pds4-jparser#192
Secondary fix (validate): In FileAreaExtractor.java:89, change LOG.error(...) to LOG.debug(...) — a ParseException from an unknown product type is expected behavior when validate encounters a newer IM version than pds4-jparser was built against, not an error condition.
🎉 Integration & Test
- Add Cucumber test scenario for
Product_Resource label validation once pds4-jparser is updated
Checked for duplicates
Yes - I've already checked
🐛 Describe the bug
When validating a
Product_Resourcelabel (introduced in PDS4 IM schema version 1Q00), validate fails with a noisy JAXB unmarshal error and silently skips content validation for the product.The root cause is that pds4-jparser's JAXB context is generated from schema version 1K00 (
pom.xmlmodel-version property), soProductResourceis not a known type. Two symptoms result:FileAreaExtractor.findAndFlagBadFilenames()(line 89-91), which logs aParseExceptionat ERROR level when it encounters any unrecognized product type:DataDefinitionAndContentValidationRule.validate()catchesParseExceptionfromLabel.open()and ignores it (line 160:// Ignore. Shouldn't happen), so any data-level validation forProduct_Resourcelabels is never performed.Note: Schema and Schematron validation still work correctly (they don't use JAXB), so structural label errors are still caught.
🕵️ Expected behavior
Product_Resource(schema 1Q00), full content validation should work📜 To Reproduce
<Product_Resource xmlns="http://pds.nasa.gov/pds4/pds/v1" ...>FileAreaExtractorandObjectAccessin stderr🩺 Test Data / Additional context
Test files from pds4-information-model:
model-lddtool/src/test/resources/data/update_version/github931/tc_Invalid_Product_Resource.xmlmodel-lddtool/src/test/resources/data/update_version/github931/tc_Valid_Product_Resource.xml⚙️ Engineering Details
Primary fix (pds4-jparser): Update pds4-jparser to generate JAXB classes from schema 1Q00 (which defines
Product_Resource). See sister issue: NASA-PDS/pds4-jparser#192Secondary fix (validate): In
FileAreaExtractor.java:89, changeLOG.error(...)toLOG.debug(...)— aParseExceptionfrom an unknown product type is expected behavior when validate encounters a newer IM version than pds4-jparser was built against, not an error condition.🎉 Integration & Test
Product_Resourcelabel validation once pds4-jparser is updated