FHIR Chat · Validator logger error · tooling

Stream: tooling

Topic: Validator logger error


view this post on Zulip Mark Kramer (Mar 18 2022 at 20:49):

I got the following logging-related error running the validator under Windows. Any help would be appreciated!

> java -jar validator_cli.jar -compare -dest "c:/Users/mkramer/OneDrive - The MITRE Corporation/Documents/JLab/validator" -version 4.0 -ig hl7.fhir.us.carin-bb#1.1.0 -ig hl7.fhir.us.davinci-crd#1.0.0 -left http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-Patient -right http://hl7.org/fhir/us/davinci-crd/StructureDefinition/profile-patient

FHIR Validation tool Version 5.6.39 (Git# e053d5a2607a). Built 2022-03-18T04:06:00.616Z (14 hours old)
  Java:   17.0.1 from C:\Program Files\Eclipse Foundation\jdk-17.0.1.12-hotspot on amd64 (64bit). 4044MB available
Valid destination directory provided: "c:/Users/mkramer/OneDrive - The MITRE Corporation/Documents/JLab/validator")
  Paths:  Current = C:\Users\mkramer\OneDrive - The MITRE Corporation\Documents\JLab, Package Cache = C:\Users\mkramer\.fhir\packages
  Params: -compare -dest "c:/Users/mkramer/OneDrive - The MITRE Corporation/Documents/JLab/validator" -version 4.0 -ig hl7.fhir.us.carin-bb#1.1.0 -ig hl7.fhir.us.davinci-crd#1.0.0 -left http://hl7.org/fhir/us/carin-bb/StructureDefinition/C4BB-Patient -right http://hl7.org/fhir/us/davinci-crd/StructureDefinition/profile-patient
  Load FHIR v4.0 from hl7.fhir.r4.core#4.0.1Installing hl7.fhir.xver-extensions#0.0.11 to the package cache
  Fetching:
  Installing:  done.
 - 4575 resources (00:19.0692)
Installing hl7.terminology#3.1.0 to the package cache
  Fetching:...................................................................................
  Installing: ................................................................................... done.
  Load hl7.terminology#3.1.0 - 4117 resources (00:16.0528)
  Terminology server http://tx.fhir.org - Version 2.0.12-SNAPSHOT (00:01.0791)
  Load hl7.fhir.us.core#3.1.1 - 145 resources (00:00.0986)
  Load hl7.fhir.us.carin-bb#1.1.0 - 95 resources (00:00.0062)
  Load hl7.fhir.us.core#3.1.0 - 143 resources (00:01.0068)
  Load hl7.fhir.us.davinci-hrex#0.2.0 - 17 resources (00:00.0008)
Installing hl7.fhir.uv.sdc#current to the package cache
  Fetching:....
  Installing: .... done.
Installing hl7.fhir.r4.examples#4.0.1 to the package cache
  Fetching:..........................................................................................................
  Installing: .......................................................................................................... done.
  Load hl7.fhir.r4.examples#4.0.1Exception in thread "main" org.hl7.fhir.exceptions.FHIRException: Error reading CapabilityStatement-base.json from package hl7.fhir.r4.examples#4.0.1: Cannot invoke "org.hl7.fhir.r5.context.IWorkerContext$ILoggingService.logDebugMessage(org.hl7.fhir.r5.context.IWorkerContext$ILoggingService$LogCategory, String)" because "this.logger" is null
        at org.hl7.fhir.r5.context.SimpleWorkerContext.loadFromPackageInt(SimpleWorkerContext.java:480)
        at org.hl7.fhir.r5.context.SimpleWorkerContext.loadFromPackage(SimpleWorkerContext.java:419)
        at org.hl7.fhir.validation.IgLoader.loadIg(IgLoader.java:89)
        at org.hl7.fhir.validation.IgLoader.loadIg(IgLoader.java:81)
        at org.hl7.fhir.validation.IgLoader.loadIg(IgLoader.java:81)
        at org.hl7.fhir.validation.cli.services.ValidationService.initializeValidator(ValidationService.java:333)
        at org.hl7.fhir.validation.cli.services.ValidationService.initializeValidator(ValidationService.java:310)
        at org.hl7.fhir.validation.ValidatorCli.doLeftRightComparison(ValidatorCli.java:225)
        at org.hl7.fhir.validation.ValidatorCli.main(ValidatorCli.java:160)
Caused by: java.lang.NullPointerException: Cannot invoke "org.hl7.fhir.r5.context.IWorkerContext$ILoggingService.logDebugMessage(org.hl7.fhir.r5.context.IWorkerContext$ILoggingService$LogCategory, String)" because "this.logger" is null
        at org.hl7.fhir.r5.context.BaseWorkerContext.cacheResourceFromPackage(BaseWorkerContext.java:391)
        at org.hl7.fhir.r5.context.SimpleWorkerContext.loadFromFileJson(SimpleWorkerContext.java:407)
        at org.hl7.fhir.r5.context.SimpleWorkerContext.loadDefinitionItem(SimpleWorkerContext.java:308)
        at org.hl7.fhir.r5.context.SimpleWorkerContext.loadFromPackageInt(SimpleWorkerContext.java:477)
        ... 8 more

view this post on Zulip Lloyd McKenzie (Mar 18 2022 at 21:45):

@Grahame Grieve

view this post on Zulip David Otasek (Mar 23 2022 at 13:51):

@Mark Kramer @Lloyd McKenzie I just spotted this one today; I will try to replicate. Is it still an issue for you?

view this post on Zulip Mark Kramer (Mar 23 2022 at 13:54):

One of my colleagues replicated it, but the same type of command worked on different IGs. So it might depend on the particular profiles you test.

view this post on Zulip David Otasek (Mar 23 2022 at 18:18):

@Mark Kramer @Grahame Grieve I could replicate the issue locally, on a Ubuntu box, and I think there's a pretty straightforward solution:

https://github.com/hapifhir/org.hl7.fhir.core/pull/774


Last updated: Apr 12 2022 at 19:14 UTC