Stream: IG creation
Topic: IndexOutOfBoundsException
Rob Hausam (May 30 2018 at 22:54):
It looks like package.tgz is OK now, but I'm getting this error:
process res: deviceusestatement-uv-ips (38.0168sec) Business version mismatch in /Users/rhausam/git-repo/fhir-ips/resources/DeviceUseStatement-uv-ips.structuredefinition - overriding from 0.1 to 0.1.0 Publishing Content Failed: Exception loading http://hl7.org/fhir/uv/ips/StructureDefinition/deviceusestatement-uv-ips: Index: 0, Size: 0 (38.0180sec) (38.0181sec) Use -? to get command line help (38.0181sec) (38.0181sec) Stack Dump (for debugging): (38.0181sec) java.lang.Exception: Exception loading http://hl7.org/fhir/uv/ips/StructureDefinition/deviceusestatement-uv-ips: Index: 0, Size: 0 at org.hl7.fhir.igtools.publisher.Publisher.load(Publisher.java:2272) at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:1937) at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:499) at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:461) at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4501) Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0 at java.util.ArrayList.rangeCheck(ArrayList.java:653) at java.util.ArrayList.get(ArrayList.java:429) at org.hl7.fhir.r4.conformance.ProfileUtilities.processPaths(ProfileUtilities.java:519) at org.hl7.fhir.r4.conformance.ProfileUtilities.generateSnapshot(ProfileUtilities.java:370) at org.hl7.fhir.r4.context.SimpleWorkerContext.seeMetadataResource(SimpleWorkerContext.java:559) at org.hl7.fhir.r4.context.BaseWorkerContext.cacheResource(BaseWorkerContext.java:188) at org.hl7.fhir.igtools.publisher.Publisher.load(Publisher.java:2270) ... 4 more Exception in thread "main" java.lang.NullPointerException at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4511)
Not sure why the index would be out of bounds. The StructureDefinition looks OK to me, and it validates OK separately. Thoughts?
Jose Costa Teixeira (May 30 2018 at 22:56):
Just to inform that mine builds ok now. I had the package name in the IG.XML but i was not putting it in the ig.json. Once I got it in the ig.json, it builds ok.
Rob Hausam (May 30 2018 at 22:56):
I'm using the latest publisher v3.4.0-13810.
Rob Hausam (May 30 2018 at 22:57):
Glad yours is good now, Jose. :)
Jose Costa Teixeira (May 30 2018 at 22:58):
@Rob Hausam you are using command line or GUI?
Rob Hausam (May 30 2018 at 22:58):
command line
Jose Costa Teixeira (May 30 2018 at 22:58):
mine is working on the command line (using Lloyd's template)
Jose Costa Teixeira (May 30 2018 at 22:59):
since I have it open, do you want to send your structureDefinition and i can see if i can build with it?
Jose Costa Teixeira (May 30 2018 at 23:00):
i am precisely working on a draft publishing mechanism for IHE which is intended to just publish existing conformance resources. So it should be easy to rehearse it with your resource
Rob Hausam (May 30 2018 at 23:01):
Attached DeviceUseStatement-uv-ips.structuredefinition.xml
Jose Costa Teixeira (May 30 2018 at 23:32):
well, i can confirm you are correct, @Rob Hausam . Same error once i use it.
Jose Costa Teixeira (May 30 2018 at 23:33):
could not figure out what is causing it, sorry.
but i do know that if you take out most of the elements, it builds again.
Jose Costa Teixeira (May 30 2018 at 23:33):
sorry i do not know which are the offending ones.
Jose Costa Teixeira (May 30 2018 at 23:33):
did a few experiments but lost track
Rob Hausam (May 30 2018 at 23:35):
thanks for checking and at least confirming, Jose
Jose Costa Teixeira (May 30 2018 at 23:35):
(and am just realizing that I posted my "it works now" message in the wrong thread. Sorry.. Let's see if anyone can help figure out what iswrong here.
Grahame Grieve (May 31 2018 at 22:57):
can I reproduce this?
Rob Hausam (May 31 2018 at 23:03):
It's in https://github.com/HL7/fhir-ips, branch fhir-r4.
Rob Hausam (Jun 01 2018 at 00:31):
Of course, it's the same differential path issue and solution for this, too (even though the error messages are very different). It build now. I actually thought I had taken care of all of those before in the stu3 version before I moved to the r4 branch - presumably the publisher may be picking up more of them now?
Grahame Grieve (Jun 01 2018 at 00:38):
one of the errors is because an element has been renamed but your profile hasn't picked that up
Rob Hausam (Jun 01 2018 at 00:41):
yes - it's picked it up now :)
Rob Hausam (Jun 01 2018 at 00:45):
But, interestingly (actually disturbingly), the validator didn't pick up that the element name had changed and that the instance had it wrong! :( That instance validated fine as fhirVersion 3.4.0 before fixing the element name.
Grahame Grieve (Jun 01 2018 at 00:46):
really? I have to a look at the validator
Rob Hausam (Jun 01 2018 at 00:46):
yes, probably should
Grahame Grieve (Jun 01 2018 at 00:50):
anyway, you should get better error messages and be right after the current build compeltes
Rob Hausam (Jun 01 2018 at 00:51):
of course, it is an instance of StructureDefinition, not DeviceUseStatement (where the actual change occurred), but I would think it should be strictly validating the SD element ids and path values (which are instances of ElementDefinition)
Rob Hausam (Jun 01 2018 at 00:51):
sounds good
Grahame Grieve (Jun 01 2018 at 00:52):
well, the excption is kind of it trying to valdate ...
Rob Hausam (Jun 01 2018 at 00:52):
yes, the IG Publisher is doing that, but not the validator
Last updated: Apr 12 2022 at 19:14 UTC