Closed KMCGit closed 1 year ago
Could you please provide step by step instructions on how to replicate this issue with the latest Validator?
A sample file, and any scripting or code required to produce the error you are seeing can help us diagnose what is actually happening.
This is the example map file from The Gravity IG. Using this file and the command below would reproduce the error.
It will not let me upload the .map file so I have pasted into word document. Attempting to compile the FHIR Mapping Language contained, with the below command should recreate the issue:
java -jar validator_cli.jar -ig $MAPFILENAME -compile http://hl7.org/fhir/us/sdoh-clinicalcare/StructureMap/SDOHCC-StructureMapHungerVitalSign -version 4.0.1 -output map/SDOHCC-Hunger-Vital-Sign-Example.json
I wanted to add to this that I have been able to use the 5.6.81 Version to Compile the maps and then used those R4 Maps with a newer Java Jar / Validator. It throws several warnings/errors but the output appears to resolve. (If it is worth opening a separate issue, please let me know, but at least wanted to mention and bring to attention).
Inputting the below command shows several java.lang.NullPointerException (1 for each map it looks like), yet a success message at the end and an output file the appears correct.
java -jar validator_cli.jar file_0.hunger -output outputHVS.json -transform https://fhir-example.azurewebsites.net/StructureMap/SDOHCC-StructureMapHungerVitalSign -version 4.0.1 -ig logical/ -ig map/ FHIR Validation tool Version 5.6.117 (Git# 3c04b80fdb35). Built 2023-03-29T14:03:46.971Z (21 days old) Java: 17.0.6 from /Library/Java/JavaVirtualMachines/microsoft-17.jdk/Contents/Home on aarch64 (64bit). 16384MB available Paths: Current = /Users/Kenneth.Crawford/Documents/dev/delete-test-newjar/sdc-extract, Package Cache = /Users/Kenneth.Crawford/.fhir/packages Params: file_0.hunger -output outputHVS.json -transform https://fhir-example.azurewebsites.net/StructureMap/SDOHCC-StructureMapHungerVitalSign -version 4.0.1 -ig logical/ -ig map/ Jurisdiction: United States of America Loading Load FHIR v4.0 from hl7.fhir.r4.core#4.0.1.: - 4576 resources (00:03.253) Load hl7.terminology#5.1.0 - 4180 resources (00:01.316) Load R5 Extensions - 151 resources (00:01.706) Terminology server http://tx.fhir.org - Version 2.0.14 (00:00.599) Load logical/ - 10 resources (00:00.181) Load map/ load file: SDOHCC-PRAPARE-Map-Connectathon.fml - ignored due to error: Cannot invoke "org.hl7.fhir.r4.utils.FHIRPathEngine.parse(org.hl7.fhir.r4.utils.FHIRLexer)" because "this.fpe" is null java.lang.NullPointerException: Cannot invoke "org.hl7.fhir.r4.utils.FHIRPathEngine.parse(org.hl7.fhir.r4.utils.FHIRLexer)" because "this.fpe" is null at org.hl7.fhir.r4.utils.StructureMapUtilities.parseSource(StructureMapUtilities.java:1125) at org.hl7.fhir.r4.utils.StructureMapUtilities.parseRule(StructureMapUtilities.java:1000) at org.hl7.fhir.r4.utils.StructureMapUtilities.parseGroup(StructureMapUtilities.java:951) at org.hl7.fhir.r4.utils.StructureMapUtilities.parse(StructureMapUtilities.java:746) at org.hl7.fhir.validation.IgLoader.loadResourceByVersion(IgLoader.java:799) at org.hl7.fhir.validation.IgLoader.loadFileWithErrorChecking(IgLoader.java:764) at org.hl7.fhir.validation.IgLoader.loadIg(IgLoader.java:140) at org.hl7.fhir.validation.cli.services.ValidationService.initializeValidator(ValidationService.java:407) at org.hl7.fhir.validation.cli.services.ValidationService.initializeValidator(ValidationService.java:375) at org.hl7.fhir.validation.ValidatorCli.doValidation(ValidatorCli.java:303) at org.hl7.fhir.validation.ValidatorCli.main(ValidatorCli.java:144) load file: SDOHCC-PRAPARE-Map-Dev.fml - ignored due to error: Cannot invoke "org.hl7.fhir.r4.utils.FHIRPathEngine.parse(org.hl7.fhir.r4.utils.FHIRLexer)" because "this.fpe" is null java.lang.NullPointerException: Cannot invoke "org.hl7.fhir.r4.utils.FHIRPathEngine.parse(org.hl7.fhir.r4.utils.FHIRLexer)" because "this.fpe" is null at org.hl7.fhir.r4.utils.StructureMapUtilities.parseSource(StructureMapUtilities.java:1125) at org.hl7.fhir.r4.utils.StructureMapUtilities.parseRule(StructureMapUtilities.java:1000) at org.hl7.fhir.r4.utils.StructureMapUtilities.parseGroup(StructureMapUtilities.java:951) at org.hl7.fhir.r4.utils.StructureMapUtilities.parse(StructureMapUtilities.java:746) at org.hl7.fhir.validation.IgLoader.loadResourceByVersion(IgLoader.java:799) at org.hl7.fhir.validation.IgLoader.loadFileWithErrorChecking(IgLoader.java:764) at org.hl7.fhir.validation.IgLoader.loadIg(IgLoader.java:140) at org.hl7.fhir.validation.cli.services.ValidationService.initializeValidator(ValidationService.java:407) at org.hl7.fhir.validation.cli.services.ValidationService.initializeValidator(ValidationService.java:375) at org.hl7.fhir.validation.ValidatorCli.doValidation(ValidatorCli.java:303) at org.hl7.fhir.validation.ValidatorCli.main(ValidatorCli.java:144) load file: SDOHCC-Hunger-Vital-Sign-Test.fml - ignored due to error: Cannot invoke "org.hl7.fhir.r4.utils.FHIRPathEngine.parse(org.hl7.fhir.r4.utils.FHIRLexer)" because "this.fpe" is null java.lang.NullPointerException: Cannot invoke "org.hl7.fhir.r4.utils.FHIRPathEngine.parse(org.hl7.fhir.r4.utils.FHIRLexer)" because "this.fpe" is null at org.hl7.fhir.r4.utils.StructureMapUtilities.parseSource(StructureMapUtilities.java:1125) at org.hl7.fhir.r4.utils.StructureMapUtilities.parseRule(StructureMapUtilities.java:1000) at org.hl7.fhir.r4.utils.StructureMapUtilities.parseGroup(StructureMapUtilities.java:951) at org.hl7.fhir.r4.utils.StructureMapUtilities.parse(StructureMapUtilities.java:746) at org.hl7.fhir.validation.IgLoader.loadResourceByVersion(IgLoader.java:799) at org.hl7.fhir.validation.IgLoader.loadFileWithErrorChecking(IgLoader.java:764) at org.hl7.fhir.validation.IgLoader.loadIg(IgLoader.java:140) at org.hl7.fhir.validation.cli.services.ValidationService.initializeValidator(ValidationService.java:407) at org.hl7.fhir.validation.cli.services.ValidationService.initializeValidator(ValidationService.java:375) at org.hl7.fhir.validation.ValidatorCli.doValidation(ValidatorCli.java:303) at org.hl7.fhir.validation.ValidatorCli.main(ValidatorCli.java:144) load file: SDOHCC-PRAPARE-Map-Test.fml - ignored due to error: Cannot invoke "org.hl7.fhir.r4.utils.FHIRPathEngine.parse(org.hl7.fhir.r4.utils.FHIRLexer)" because "this.fpe" is null java.lang.NullPointerException: Cannot invoke "org.hl7.fhir.r4.utils.FHIRPathEngine.parse(org.hl7.fhir.r4.utils.FHIRLexer)" because "this.fpe" is null at org.hl7.fhir.r4.utils.StructureMapUtilities.parseSource(StructureMapUtilities.java:1125) at org.hl7.fhir.r4.utils.StructureMapUtilities.parseRule(StructureMapUtilities.java:1000) at org.hl7.fhir.r4.utils.StructureMapUtilities.parseGroup(StructureMapUtilities.java:951) at org.hl7.fhir.r4.utils.StructureMapUtilities.parse(StructureMapUtilities.java:746) at org.hl7.fhir.validation.IgLoader.loadResourceByVersion(IgLoader.java:799) at org.hl7.fhir.validation.IgLoader.loadFileWithErrorChecking(IgLoader.java:764) at org.hl7.fhir.validation.IgLoader.loadIg(IgLoader.java:140) at org.hl7.fhir.validation.cli.services.ValidationService.initializeValidator(ValidationService.java:407) at org.hl7.fhir.validation.cli.services.ValidationService.initializeValidator(ValidationService.java:375) at org.hl7.fhir.validation.ValidatorCli.doValidation(ValidatorCli.java:303) at org.hl7.fhir.validation.ValidatorCli.main(ValidatorCli.java:144) load file: SDOHCC-Hunger-Vital-Sign-Connectathon.fml - ignored due to error: Cannot invoke "org.hl7.fhir.r4.utils.FHIRPathEngine.parse(org.hl7.fhir.r4.utils.FHIRLexer)" because "this.fpe" is null java.lang.NullPointerException: Cannot invoke "org.hl7.fhir.r4.utils.FHIRPathEngine.parse(org.hl7.fhir.r4.utils.FHIRLexer)" because "this.fpe" is null at org.hl7.fhir.r4.utils.StructureMapUtilities.parseSource(StructureMapUtilities.java:1125) at org.hl7.fhir.r4.utils.StructureMapUtilities.parseRule(StructureMapUtilities.java:1000) at org.hl7.fhir.r4.utils.StructureMapUtilities.parseGroup(StructureMapUtilities.java:951) at org.hl7.fhir.r4.utils.StructureMapUtilities.parse(StructureMapUtilities.java:746) at org.hl7.fhir.validation.IgLoader.loadResourceByVersion(IgLoader.java:799) at org.hl7.fhir.validation.IgLoader.loadFileWithErrorChecking(IgLoader.java:764) at org.hl7.fhir.validation.IgLoader.loadIg(IgLoader.java:140) at org.hl7.fhir.validation.cli.services.ValidationService.initializeValidator(ValidationService.java:407) at org.hl7.fhir.validation.cli.services.ValidationService.initializeValidator(ValidationService.java:375) at org.hl7.fhir.validation.ValidatorCli.doValidation(ValidatorCli.java:303) at org.hl7.fhir.validation.ValidatorCli.main(ValidatorCli.java:144) load file: SDOHCC-Hunger-Vital-Sign-Dev.fml - ignored due to error: Cannot invoke "org.hl7.fhir.r4.utils.FHIRPathEngine.parse(org.hl7.fhir.r4.utils.FHIRLexer)" because "this.fpe" is null java.lang.NullPointerException: Cannot invoke "org.hl7.fhir.r4.utils.FHIRPathEngine.parse(org.hl7.fhir.r4.utils.FHIRLexer)" because "this.fpe" is null at org.hl7.fhir.r4.utils.StructureMapUtilities.parseSource(StructureMapUtilities.java:1125) at org.hl7.fhir.r4.utils.StructureMapUtilities.parseRule(StructureMapUtilities.java:1000) at org.hl7.fhir.r4.utils.StructureMapUtilities.parseGroup(StructureMapUtilities.java:951) at org.hl7.fhir.r4.utils.StructureMapUtilities.parse(StructureMapUtilities.java:746) at org.hl7.fhir.validation.IgLoader.loadResourceByVersion(IgLoader.java:799) at org.hl7.fhir.validation.IgLoader.loadFileWithErrorChecking(IgLoader.java:764) at org.hl7.fhir.validation.IgLoader.loadIg(IgLoader.java:140) at org.hl7.fhir.validation.cli.services.ValidationService.initializeValidator(ValidationService.java:407) at org.hl7.fhir.validation.cli.services.ValidationService.initializeValidator(ValidationService.java:375) at org.hl7.fhir.validation.ValidatorCli.doValidation(ValidatorCli.java:303) at org.hl7.fhir.validation.ValidatorCli.main(ValidatorCli.java:144) - 12 resources (00:00.089)
Package Summary: [hl7.fhir.r4.core#4.0.1, hl7.fhir.xver-extensions#0.0.12, hl7.terminology#5.1.0] Get set... go (00:00.022) ...success Done. Times: Loading: 00:06.715. Max Memory = 16Gb
Release 6.0.2 contains a change that should fix this issue.
https://github.com/hapifhir/org.hl7.fhir.core/releases/tag/6.0.2
Could you please re-test with this release?
Thanks for addressing the issue. It seems to work as expected with the above release, and newer releases.
Are the newer version no longer going to support compiling R4 Structure Maps? I have posted before with no reply but it seems the error keeps changing upon newer versions:
Load map/SDOHCC-Hunger-Vital-Sign-DevTest.map* load file: map/SDOHCC-Hunger-Vital-Sign-DevTest.fml - ignored due to error: Cannot invoke "org.hl7.fhir.r4.utils.FHIRPathEngine.parse(org.hl7.fhir.r4.utils.FHIRLexer)" because "this.fpe" is null java.lang.NullPointerException: Cannot invoke "org.hl7.fhir.r4.utils.FHIRPathEngine.parse(org.hl7.fhir.r4.utils.FHIRLexer)" because "this.fpe" is null
Cannot invoke "org.hl7.fhir.r4.utils.FHIRPathEngine.parse(org.hl7.fhir.r4.utils.FHIRLexer)" because "this.fpe" is null
What does this mean and can it be fixed on my end to compile them?