FHIR Chat · Strange Java Validator error · implementers

Stream: implementers

Topic: Strange Java Validator error


view this post on Zulip Matthijs van der Wielen (Oct 21 2020 at 09:06):

I was trying to validate against a local package, but the validator gives a strange error:

  Load hl7.fhir.r4.elements#4.0.1Exception in thread "main" java.io.IOException: Unable to find the file package/StructureDefinition-de-TestScript.destination.index.json in the package hl7.fhir.r4.elements

What I did is:

  • Install package through Torinox: fhir install ehealthplatform.be.r4.federalprofiles
  • Try to validate an instanse: java -jar validator_cli.jar Voorbeeld1.xml -ig ehealthplatform.be.r4.federalprofiles#1.1.23-beta

That ends with the error mentioned above. Complete output:

FHIR Validation tool Version 5.1.17 (Git# 44f7dca1c794). Built 2020-10-14T20:04:32.293Z (6 days old)
  Java:   1.8.0_241 from C:\Program Files\Java\jre1.8.0_241 on amd64 (64bit). 3616MB available
  Paths:  Current = C:\Users\Ardon\Desktop\TestBE, Package Cache = C:\Users\Ardon\.fhir\packages
  Params: Voorbeeld1.xml -ig ehealthplatform.be.r4.federalprofiles#1.1.23-beta
Scanning for versions (no -version parameter):
Installing ehealthplatform.be.r4.federalprofiles#1.1.23-beta to the package cache
  Fetching:.
  Installing: . done.
  Package ehealthplatform.be.r4.federalprofiles#1.1.23-beta: 4.0
-> use version 4.0
Loading
  Load FHIR v4.0 from hl7.fhir.r4.core#4.0.1 - 4575 resources (00:08.0135)
  Terminology server http://tx.fhir.org - Version 1.0.360 (00:02.0921)
Installing hl7.terminology.r4#1.0.0 to the package cache
  Fetching:............................................................................
  Installing: ............................................................................ done.
  Load hl7.terminology.r4#1.0.0 - 3816 resources (00:08.0482)
Installing hl7.fhir.r4.expansions#4.0.1 to the package cache
  Fetching:......................
  Installing: ...................... done.
  Load hl7.fhir.r4.expansions#4.0.1 - 553 resources (00:03.0452)
Installing hl7.fhir.r4.examples#4.0.1 to the package cache
  Fetching:..........................................................................................................
  Installing: .......................................................................................................... done.
  Load hl7.fhir.r4.examples#4.0.1 - 4582 resources (00:31.0030)
Installing hl7.fhir.r4.elements#4.0.1 to the package cache
  Fetching:............................................................................................................
  ...........................
  Installing: ........................................................................................................................
  ............... done.
  Load hl7.fhir.r4.elements#4.0.1Exception in thread "main" java.io.IOException: Unable to find the file package/StructureDefinition-de-TestScript.destination.index.json in the package hl7.fhir.r4.elements
        at org.hl7.fhir.utilities.npm.NpmPackage.load(NpmPackage.java:661)
        at org.hl7.fhir.r5.context.SimpleWorkerContext.loadFromPackageInt(SimpleWorkerContext.java:444)
        at org.hl7.fhir.r5.context.SimpleWorkerContext.loadFromPackage(SimpleWorkerContext.java:386)
        at org.hl7.fhir.validation.ValidationEngine.loadIg(ValidationEngine.java:1075)
        at org.hl7.fhir.validation.ValidationEngine.loadIg(ValidationEngine.java:1067)
        at org.hl7.fhir.validation.cli.services.ValidationService.getValidator(ValidationService.java:213)
        at org.hl7.fhir.validation.Validator.main(Validator.java:190)

view this post on Zulip Lloyd McKenzie (Oct 21 2020 at 15:43):

@Grahame Grieve

view this post on Zulip Grahame Grieve (Oct 21 2020 at 19:26):

can you post the 2 files C:\Users\Ardon\.fhir\packages\healthplatform.be.r4.federalprofiles#1.1.23-beta\package.json and healthplatform.be.r4.federalprofiles#1.1.23-beta\.index.json please

view this post on Zulip Matthijs van der Wielen (Oct 26 2020 at 07:33):

@Grahame Grieve of course.
The package.json
package.json

And the .index.json
.index.json


Last updated: Apr 12 2022 at 19:14 UTC