Stream: IG creation
Topic: Error: Only whitespace content allowed...
Alexander Henket (Feb 11 2020 at 11:49):
Anyone know what this may hint to? I fed the sample-project my resources and updated the myig.xml a little, but the error below could do with a location:
mbplocal:sample-ig-master ahenket$ ./_genonce.sh Deleting .DS_Store files Checking internet connection... Online FHIR IG Publisher Version 1.0.62-SNAPSHOT (Git# 89bf2bc71f6d). Built 2020-02-07T12:21:17.644+11:00 (4 days old) Detected Java version: 1.8.0_121 from /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre on x86_64 (64bit). 3641MB available Parameters: -ig ig.ini dir = /Users/ahenket/Development/GitHub/Nictiz/sample-ig-master, path = /Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/opt/X11/bin:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/git/bin:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin:/Users/ahenket/Development/lib/apache-ant-1.9.2/bin Run time = dinsdag 11 februari 2020 11:35:19 uur CET (2020-02-11T11:35:19+01:00) Package Cache: /Users/ahenket/.fhir/packages (00:00.0066) Contacting Build Server... (00:00.0072) ... done (00:02.0315) Publishing Content Failed: only whitespace content allowed before start tag and not x (position: START_DOCUMENT seen <?xml version="1.0" encoding="UTF-8"?>\nx... @2:2) (00:02.0831) (00:02.0831) Use -? to get command line help (00:02.0831) (00:02.0832) Stack Dump (for debugging): (00:02.0832) org.hl7.fhir.exceptions.FHIRFormatError: only whitespace content allowed before start tag and not x (position: START_DOCUMENT seen <?xml version="1.0" encoding="UTF-8"?>\nx... @2:2) at org.hl7.fhir.r4.formats.XmlParserBase.parse(XmlParserBase.java:112) at org.hl7.fhir.r4.formats.ParserBase.parse(ParserBase.java:79) at org.hl7.fhir.r4.formats.FormatUtilities.loadFile(FormatUtilities.java:159) at org.hl7.fhir.igtools.publisher.Publisher.initializeFromIg(Publisher.java:1262) at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:1204) at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:659) at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6937) Caused by: org.xmlpull.v1.XmlPullParserException: only whitespace content allowed before start tag and not x (position: START_DOCUMENT seen <?xml version="1.0" encoding="UTF-8"?>\nx... @2:2) at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519) at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395) at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093) at org.hl7.fhir.r4.formats.XmlParserBase.next(XmlParserBase.java:223) at org.hl7.fhir.r4.formats.XmlParserBase.loadXml(XmlParserBase.java:213) at org.hl7.fhir.r4.formats.XmlParserBase.parse(XmlParserBase.java:109) ... 6 more
Grahame Grieve (Feb 11 2020 at 11:52):
beats me. the file it can't read is your xml ig nominated in your ig.ini. It's weird that it can't read it because it looks like it's actually XML. The error comes out of a standard parser.... does the file have a BOF?
Alexander Henket (Feb 11 2020 at 12:14):
A, so that is the file it is complaining about. No but it did have a literal 'x' where it should not have. Must have hit a key and saved it. This changes the errors:
mbplocal:sample-ig-master ahenket$ ./_genonce.sh Deleting .DS_Store files Checking internet connection... Online FHIR IG Publisher Version 1.0.62-SNAPSHOT (Git# 89bf2bc71f6d). Built 2020-02-07T12:21:17.644+11:00 (4 days old) Detected Java version: 1.8.0_121 from /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre on x86_64 (64bit). 3641MB available Parameters: -ig ig.ini dir = /Users/ahenket/Development/GitHub/Nictiz/sample-ig-master, path = /Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:/opt/X11/bin:~/.dotnet/tools:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/usr/local/git/bin:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin:/Users/ahenket/Development/lib/apache-ant-1.9.2/bin Run time = dinsdag 11 februari 2020 13:07:35 uur CET (2020-02-11T13:07:35+01:00) Package Cache: /Users/ahenket/.fhir/packages (00:00.0060) Contacting Build Server... (00:00.0066) ... done (00:01.0747) Load Template from fhir.base.template (00:02.0570) onLoad.findSpreadsheets: onLoad.updateIg: [xslt] Processing /Users/ahenket/Development/GitHub/Nictiz/sample-ig-master/template/onLoad-ig-working.xml to /Users/ahenket/Development/GitHub/Nictiz/sample-ig-master/template/onLoad-ig-updated.xml [xslt] Loading stylesheet /Users/ahenket/Development/GitHub/Nictiz/sample-ig-master/template/scripts/onLoad.xslt onLoad.extend: onLoad: Root directory: /Users/ahenket/Development/GitHub/Nictiz/sample-ig-master (00:05.0291) Core Package hl7.fhir.r3.core#3.0.2 Terminology Cache is at /Users/ahenket/Development/GitHub/Nictiz/sample-ig-master/input-cache/txcache. 38 files in cache (00:10.0242) Connect to Terminology Server at http://tx.fhir.org (00:10.0293) Load Package hl7.fhir.pubpack#0.0.3 Load Package hl7.fhir.xver-extensions#0.0.1 Initialization complete (00:11.0648) Load Content (00:11.0648) Processing Conformance Resources (00:14.0741) Terminology server: Check for supported code systems for urn:iso:std:iso:3166 (00:19.0235) org.hl7.fhir.exceptions.DefinitionException: unknown extension http://hl7.org/fhir/StructureDefinition/resource-pertainsToGoal at org.hl7.fhir.r5.utils.NarrativeGenerator.splitExtensions(NarrativeGenerator.java:1271) at org.hl7.fhir.r5.utils.NarrativeGenerator.generateByProfile(NarrativeGenerator.java:1168) at org.hl7.fhir.r5.utils.NarrativeGenerator.generate(NarrativeGenerator.java:1115) at org.hl7.fhir.r5.utils.NarrativeGenerator.generate(NarrativeGenerator.java:1101) at org.hl7.fhir.igtools.publisher.Publisher.generateNarratives(Publisher.java:923) at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:3348) at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:804) at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:665) at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6937) Publishing Content Failed: null (00:34.0603) (00:34.0603) Use -? to get command line help (00:34.0603) (00:34.0604) Stack Dump (for debugging): (00:34.0604) java.lang.NullPointerException at org.hl7.fhir.r5.utils.NarrativeGenerator.findByTarget(NarrativeGenerator.java:2922) at org.hl7.fhir.r5.utils.NarrativeGenerator.findReleventMaps(NarrativeGenerator.java:2881) at org.hl7.fhir.r5.utils.NarrativeGenerator.generate(NarrativeGenerator.java:2862) at org.hl7.fhir.r5.utils.NarrativeGenerator.generate(NarrativeGenerator.java:2857) at org.hl7.fhir.r5.utils.NarrativeGenerator.generate(NarrativeGenerator.java:343) at org.hl7.fhir.r5.utils.NarrativeGenerator.generate(NarrativeGenerator.java:327) at org.hl7.fhir.igtools.publisher.Publisher.generateNarratives(Publisher.java:916) at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:3348) at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:804) at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:665) at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6937)
This one is interesting as it is a core extension:
org.hl7.fhir.exceptions.DefinitionException: unknown extension http://hl7.org/fhir/StructureDefinition/resource-pertainsToGoal
The NullPointer might be caused by former but I don't know
Grahame Grieve (Feb 12 2020 at 05:12):
ok I fixed the second one for next release (a concept map with a source but no target it looks like)
Grahame Grieve (Feb 12 2020 at 05:15):
I don't know why it can't find pertainsToGoal - I'll have to debug. Can I?
Alexander Henket (Feb 13 2020 at 02:03):
Hi @Grahame Grieve this is the set as I test with locally and produces the errors.
Alexander Henket (Feb 13 2020 at 02:06):
You will probably also find that there is a severe lag after Terminology server: Check for supported code systems for urn:iso:std:iso:3166
. It takes about 4 minutes of perceived inactivity to get to these errors. Maybe there is something that could be improved there too
Alexander Henket (Feb 13 2020 at 02:13):
The ConceptMap it is complaining about is likely 'AllergieCategorieCodelijst-to-allergy-intolerance-category' and this part:
<group> <source value="http://hl7.org/fhir/v3/NullFlavor"/> <element> <code value="OTH"/> <display value="anders"/> <target> <equivalence value="unmatched"/> <comment value="The HCIM defines that 'other' is a possible value for the AllergyCategory. The required AllergyIntolerance.category binding does not recognize this use case. If transmitting the value under OTH is not required, omit the AllergyIntolerance.category. If the actual value associated with OTH is known and relevant, use AllergyIntolerance.category + extension http://hl7.org/fhir/data-absent-reason 'unsupported' + extension http://nictiz.nl/fhir/StructureDefinition/code-specification with the description under valueCodeableConcept.text"/> </target> </element> </group>
It is trying to say that input code NullFlavor OTH has no obvious relationship to one particular code in the target system. Is there a different way to say this or was the IG Publisher too optimistic in its assumptions?
Grahame Grieve (Feb 13 2020 at 02:34):
unknown extension http://hl7.org/fhir/StructureDefinition/resource-pertainsToGoal
This error is quite correct
Alexander Henket (Feb 13 2020 at 02:40):
Because? The url resolves to the thing we need. The extension did not exist in STU3, that's true. Do we need to backport that extension? I thought extensions invented in later versions could be used in older versions.
When we backport: do we keep the hl7 canonical or do we also need to import into our own namespace?
Grahame Grieve (Feb 13 2020 at 02:44):
4 minutes of perceived inactivity
it's up to you how much logging to produce.
Alexander Henket (Feb 13 2020 at 02:45):
I only run _genonce.sh as-is, apparently I can tweak there?
Grahame Grieve (Feb 13 2020 at 02:46):
in STU3: http://hl7.org/fhir/StructureDefinition/goal-pertainsToGoal not http://hl7.org/fhir/StructureDefinition/resource-pertainsToGoal
Alexander Henket (Feb 13 2020 at 02:46):
Yuck... but thanks. Does not resolve as the STU3 thing btw: 'Internal Error - unknown id goal-pertainsToGoal .'
Grahame Grieve (Feb 13 2020 at 02:47):
controlling logging is using the parameters in the ig - see https://confluence.hl7.org/display/FHIR/Implementation+Guide+Parameters
Grahame Grieve (Feb 13 2020 at 02:49):
this:
<group> <source value="http://hl7.org/fhir/v3/NullFlavor"/> <element> <code value="OTH"/> <display value="anders"/> <target> <equivalence value="unmatched"/> </element> </group>
It's not invalid but it's certainly unexpected to me that there's no target. The code OTH is unmatched.... somewhere?
Alexander Henket (Feb 13 2020 at 02:56):
There is no match in AllergyIntolerance.category which has FHIR required binding
Grahame Grieve (Feb 13 2020 at 02:57):
but you need source?
Alexander Henket (Feb 13 2020 at 02:58):
Well I wanted to explicitly say what to do when your input is OTH
Alexander Henket (Feb 13 2020 at 02:58):
My input is not just this NullFlavor. The ConceptMap has another group with real source/target combinations
Grahame Grieve (Feb 13 2020 at 03:07):
well, I mean, it was a surprise to me but it's valid, and it shouldn't be a problem now...?
Alexander Henket (Feb 13 2020 at 03:10):
Just checking that it wasn't... updated to latest ig publisher just now and indeed that null pointer is gone and I'm now where I was with the validator:
java.lang.ClassCastException: org.hl7.fhir.r5.model.StringType cannot be cast to org.hl7.fhir.r5.model.MarkdownType at org.hl7.fhir.convertors.conv30_50.OperationDefinition30_50.convertOperationDefinition(OperationDefinition30_50.java:52) at org.hl7.fhir.convertors.VersionConvertor_30_50.convertResource(VersionConvertor_30_50.java:4653) at org.hl7.fhir.convertors.R3ToR5Loader.loadBundle(R3ToR5Loader.java:65) at org.hl7.fhir.r5.context.SimpleWorkerContext.loadFromFileJson(SimpleWorkerContext.java:295) at org.hl7.fhir.r5.context.SimpleWorkerContext.loadDefinitionItem(SimpleWorkerContext.java:233) at org.hl7.fhir.r5.context.SimpleWorkerContext.loadFromPackage(SimpleWorkerContext.java:326) at org.hl7.fhir.r5.context.SimpleWorkerContext.fromPackage(SimpleWorkerContext.java:178) at org.hl7.fhir.igtools.publisher.SpecificationPackage.fromPackage(SpecificationPackage.java:70) at org.hl7.fhir.igtools.publisher.Publisher.loadPack(Publisher.java:2245) at org.hl7.fhir.igtools.publisher.Publisher.loadCorePackage(Publisher.java:2208) at org.hl7.fhir.igtools.publisher.Publisher.initializeFromIg(Publisher.java:1454) at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:1204) at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:659) at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:6943)
Alexander Henket (Feb 13 2020 at 03:13):
Unfortunately that does not say what file or path but I'm sure the same files are at play as in the validator
Grahame Grieve (Feb 13 2020 at 03:15):
yes I just fixed that but it missed the release
Grahame Grieve (Feb 13 2020 at 03:16):
the release was 80% done when you sent me the ig
Alexander Henket (Feb 13 2020 at 03:16):
Alright. I'll wait for the next one . Thanks so far!
Last updated: Apr 12 2022 at 19:14 UTC