Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add missing core.properties dependency #34

Closed
galenatjpl opened this issue Jul 1, 2019 · 0 comments
Closed

Add missing core.properties dependency #34

galenatjpl opened this issue Jul 1, 2019 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@galenatjpl
Copy link
Contributor

I was able to successfully build the latest validate software.

I built the full tar.gz distribution as well.
However, there seems to be a reliance on a core.properties file, that I think may have been part of the original codebase, before the refactoring.

When I run it now, I get:

$ ./validate-1.16.0-SNAPSHOT/bin/validate --report-style json -D -R pds4.bundle -c ./validate_config.txt ./insight_cameras
Exception in thread "main" java.lang.ExceptionInInitializerError
at gov.nasa.pds.validate.ValidateLauncher.(ValidateLauncher.java:218)
at gov.nasa.pds.validate.ValidateLauncher.main(ValidateLauncher.java:1085)
Caused by: java.lang.NullPointerException
at java.util.Properties$LineReader.readLine(Properties.java:434)
at java.util.Properties.load0(Properties.java:353)
at java.util.Properties.load(Properties.java:341)
at gov.nasa.pds.tools.util.VersionInfo.(VersionInfo.java:71)
... 2 more

This seems to be failing, when loading core.properties:

props.load(VersionInfo.class.getResourceAsStream("/core.properties"));

See this line:
https://github.com/NASA-PDS-Incubator/validate/blob/21c039264f1ddb22cac617c33ceb4fd822c475df/src/main/java/gov/nasa/pds/tools/util/VersionInfo.java#L70

I’m pretty sure the file it’s looking for, is this one:
https://github.jpl.nasa.gov/PDSEN/pds4-java/blob/dev/preparation/core/src/main/resources/core.properties

It’s present in the 1.15.0 distribution “core-1.15.0.jar” file:

The META-INF/MANIFEST.MF file of the 1.15 version contains core-1.15.0.jar in its classpath, but 1.16 does not.

Anyway, this dependency:

gov.nasa.pds.2010.preparation
core
${core-version}

Needs to be incorporated, but the “gov.nasa.pds.2010.preparation:core:jar” is not in the public maven repo.

So the core.properties needs to be brought in.

@galenatjpl galenatjpl self-assigned this Jul 1, 2019
galenatjpl pushed a commit that referenced this issue Jul 2, 2019
 * Added missing core.properties file (with model 1C00)
 * Added missing other schema, schematron, etc... resources
 * Updated SchemaFactory parameter, to be compliant with new version
   (uses XMLConstants.W3C_XML_SCHEMA_NS_URI now)

The validate tool now runs, as I verified on some InSight mission data.
galenatjpl pushed a commit that referenced this issue Jul 2, 2019
* Added missing schema, schematron, and other missing resources
@jordanpadams jordanpadams added the bug Something isn't working label Aug 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants