Stream: IG creation
Topic: Validator error
David Pyke (May 14 2020 at 14:55):
I'm trying to run the validator (on my linux system) against the definitions from SANER locally but I'm getting this error:
..Detect format for /home/loftwyr/Downloads/CT24/saner/spec.internals
[Fatal Error] :1:1: Content is not allowed in prolog.
.. validate [Epic-MR-REad-2.json]
Validation Infrastructure fail validating Epic-MR-REad-2.json: null
Exception in thread "main" java.lang.NullPointerException
at org.hl7.fhir.validation.instance.InstanceValidator.checkReference(InstanceValidator.java:2216)
at org.hl7.fhir.validation.instance.InstanceValidator.checkChild(InstanceValidator.java:4155)
at org.hl7.fhir.validation.instance.InstanceValidator.validateElement(InstanceValidator.java:4012)
at org.hl7.fhir.validation.instance.InstanceValidator.startInner(InstanceValidator.java:3472)
at org.hl7.fhir.validation.instance.InstanceValidator.start(InstanceValidator.java:3396)
at org.hl7.fhir.validation.instance.InstanceValidator.validateResource(InstanceValidator.java:4727)
at org.hl7.fhir.validation.instance.InstanceValidator.validate(InstanceValidator.java:709)
at org.hl7.fhir.validation.instance.InstanceValidator.validate(InstanceValidator.java:563)
at org.hl7.fhir.validation.ValidationEngine.validate(ValidationEngine.java:1099)
at org.hl7.fhir.validation.ValidationEngine.validate(ValidationEngine.java:1006)
at org.hl7.fhir.validation.cli.services.ValidationService.validateSources(ValidationService.java:53)
at org.hl7.fhir.validation.Validator.main(Validator.java:202)
Any ideas what I'm doing wrong? The error persists after I remove the BOM
David Pyke (May 14 2020 at 16:59):
java -jar ./org.hl7.fhir.validator.jar -ig /home/loftwyr/Downloads/CT24/saner/ -version 4.0.1 $1
David Pyke (May 14 2020 at 17:03):
FHIR Validation tool Version 4.2.30-SNAPSHOT (Git# fd09f8be936b). Built 2020-05-12T11:40:09.571+10:00 (60 hours old)
David Pyke (May 14 2020 at 17:03):
Linux www 5.4.0-29-generic #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
David Pyke (May 14 2020 at 17:03):
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-3ubuntu1)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-3ubuntu1, mixed mode, sharing)
David Pyke (May 14 2020 at 17:33):
strangely, I get the same error on my windows VM. What version of java should I be running?
Lloyd McKenzie (May 14 2020 at 18:02):
It's having trouble resolving one of your target profiles. I'll add some code to catch and raise a better error. Dunno when Grahame will have a chance to release though
David Pyke (May 14 2020 at 18:07):
Okay, I'll do without it for now
Grahame Grieve (May 14 2020 at 18:09):
against the definitions from SANER locally
What did you do? which definitions?
Grahame Grieve (May 14 2020 at 18:11):
but looking at the stack, there's no reason to think that the error has anything to do with your definitions. Instead, it's something in your instance. @David Pyke please run again with the latest validator so I know what line it is
David Pyke (May 14 2020 at 18:13):
I downloaded the definitions.json.zip and extracted it in a directory. I thought I was using the latest.
David Pyke (May 14 2020 at 18:15):
Is 4.2.30 not the latest version?
Grahame Grieve (May 14 2020 at 18:17):
that's the stack from 4.2.30? ouch
Grahame Grieve (May 14 2020 at 18:18):
I downloaded the definitions.json.zip and extracted it in a directory
Just use the package hl7.fhir.us.saner#current. But that isn't the issue here
Lloyd McKenzie (May 14 2020 at 18:20):
The code was looking for a structure definition and the presuming it was found - pull request to check to see if it's null
David Pyke (May 14 2020 at 18:20):
Using the package version fails because it can't find a Measure profile. Reese Adamson said that it worked with a local copy of the definitions, so I've been trying with that.
Grahame Grieve (May 14 2020 at 18:24):
I don't understand any of this, can you send me the instance?
David Pyke (May 14 2020 at 18:32):
I downloaded the definitions.json.zip from here: http://build.fhir.org/ig/HL7/fhir-saner/definitions.json.zip and am validating this file with them Epic-MR-REad-2.json
David Pyke (May 14 2020 at 18:45):
for completeness, if I try to run the validator with -ig hl7.fhir.us.saner#current I get:
Warning @ MeasureReport (line 9, col87) : The Measure "http://hl7.org/fhir/us/saner/StructureDefinition/PublicHealthMeasure" could not be resolved, so no validation can be performed against the Measure
Yet the meansure exists.
Grahame Grieve (May 14 2020 at 18:53):
well, you should read the error, because the error is perfectly correct
Grahame Grieve (May 14 2020 at 18:53):
there us no Measure "http://hl7.org/fhir/us/saner/StructureDefinition/PublicHealthMeasure" because that's a Profile
David Pyke (May 14 2020 at 18:54):
Of course. Thank you. I"ve stared at that 50 times and didn't think of that.
Grahame Grieve (May 14 2020 at 19:02):
@Lloyd McKenzie the problem with the NPE - downloading the definitions.json.zip and loading the profiles means that dependencies are not resolved. And this refers to US core IG which is not loaded. I'm not sure how the validator should handle this case, really
Grahame Grieve (May 14 2020 at 19:05):
I guess I'll settle for adding this in the output:
Error @ MeasureReport.subject (line 13, col24) : Unable to resolve the profile reference "http://hl7.org/fhir/us/core/StructureDefinition/us-core-location"
Grahame Grieve (May 14 2020 at 19:05):
it's not strictly a problem in the instance,so the location is not directly correct, but I don't really have a better location to report
Last updated: Apr 12 2022 at 19:14 UTC