FHIR Chat · IG Publisher ValueSet Error? · implementers

Stream: implementers

Topic: IG Publisher ValueSet Error?


view this post on Zulip Sean McIlvenna (Sep 21 2016 at 23:36):

I'm getting this odd error from the IG publisher when I include a ValueSet in the resources directory (didn't even reference it in the ImplementationGuide or control file):

view this post on Zulip Sean McIlvenna (Sep 21 2016 at 23:36):

Exception in thread "main" java.lang.Error: fetching org.hl7.fhir.dstu3.model.ValueSet not done yet for URI urn:oid:2.16.840.1.113883.1.11.1
at org.hl7.fhir.dstu3.utils.SimpleWorkerContext.fetchResource(SimpleWorkerContext.java:343)
at org.hl7.fhir.igtools.publisher.IGKnowledgeProvider.resolveBinding(IGKnowledgeProvider.java:331)
at org.hl7.fhir.dstu3.utils.ProfileUtilities.generateDescription(ProfileUtilities.java:1869)
at org.hl7.fhir.dstu3.utils.ProfileUtilities.generateDescription(ProfileUtilities.java:1804)
at org.hl7.fhir.dstu3.utils.ProfileUtilities.genElement(ProfileUtilities.java:1676)
at org.hl7.fhir.dstu3.utils.ProfileUtilities.genElement(ProfileUtilities.java:1702)
at org.hl7.fhir.dstu3.utils.ProfileUtilities.generateTable(ProfileUtilities.java:1566)
at org.hl7.fhir.igtools.renderers.StructureDefinitionRenderer.diff(StructureDefinitionRenderer.java:314)
at org.hl7.fhir.igtools.publisher.Publisher.generateOutputsStructureDefinition(Publisher.java:2064)
at org.hl7.fhir.igtools.publisher.Publisher.generateOutputs(Publisher.java:1799)
at org.hl7.fhir.igtools.publisher.Publisher.generate(Publisher.java:1254)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:236)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:2194)

view this post on Zulip Sean McIlvenna (Sep 21 2016 at 23:36):

Has anyone seen this before?

view this post on Zulip Sean McIlvenna (Sep 21 2016 at 23:37):

I just confirmed... the ValueSet is valid against both schema and schematron

view this post on Zulip Sean McIlvenna (Sep 21 2016 at 23:49):

Seems to be something related to the binding of the value set in a structure definition

view this post on Zulip Sean McIlvenna (Sep 21 2016 at 23:49):

Anyone know the inner-workings of the ig publisher when it comes to value sets?

view this post on Zulip Sean McIlvenna (Sep 21 2016 at 23:49):

I see that it connects to grahame's terminology server as one of the starting processes of the publisher

view this post on Zulip Sean McIlvenna (Sep 21 2016 at 23:50):

is it trying to retrieve the value set from grahame's server even though I already have it defined (and expanded) in the ig?

view this post on Zulip Sean McIlvenna (Sep 21 2016 at 23:53):

Nope.. that can't be it, I just posted the value set to the server no prob... ig publisher still complains

view this post on Zulip Sean McIlvenna (Sep 21 2016 at 23:56):

Also, is there a way to change which fhir server the ig publisher uses to resolve value sets?

view this post on Zulip Grahame Grieve (Sep 22 2016 at 09:21):

that error - which I really should fix - means that you're referring to a value set that doesn't exist in your binding statement

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 15:57):

what do you mean by "doesn't exist"?

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 15:58):

I included it in the ImplementationGuide that I'm publishing, and there is a file that is in the resources directory

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 15:58):

is there something more that should be done?

view this post on Zulip Lloyd McKenzie (Sep 22 2016 at 15:59):

Is it used by any of your models?

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 16:08):

yes.. one of my StructureDefinition's elements does use it

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 16:09):

I think Grahame was indicating that the binding in the element of my StructureDefinition is what's causing the problem... says the value set doesn't actually exist. but I'm not sure how to resolve it

view this post on Zulip Lloyd McKenzie (Sep 22 2016 at 16:16):

Make sure your id and your fullUrl align in the ValueSet. Make sure the value set filename is "valueset-" + id + ".xml" and make sure the binding uses the fullUrl. If that's all right, I'm not sure what the issue might be

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 16:16):

ok. I'll give those a shot

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 16:16):

only thing I think I haven't done yet is the valueset-ID.xml format

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 16:17):

I think mine right now is valueset/ID.xml

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 16:17):

so I will try valueset/valueset-ID.xml

view this post on Zulip Grahame Grieve (Sep 22 2016 at 17:16):

I'll try and find time to get to this this afternoon - really hard to get to things while at the HL7 meeting. soryr

view this post on Zulip Grahame Grieve (Sep 22 2016 at 17:17):

but urn:oid:2.16.840.1.113883.1.11.1 is what's in the binding. So you must have a ValueSet with a url of urn:oid:2.16.840.1.113883.1.11.1, and the value set must be registered in the ig.xml

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 18:06):

ok

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 18:07):

I'll double check that I'm doing that right

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 18:07):

if it's not working still after, I will send an example zip and see if either of you can help me figure out what's wrong

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 19:06):

ok... so, this is what I have:

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 19:06):

binding.valueSetReference = urn:oid.2.16.840.1.113883.1.11.1

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 19:06):

ImplementationGuide has a resource with sourceReference.reference = ValueSet/2.16.840.1.113883.1.11.1

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 19:07):

And I have a ValueSet XML file in resources/valueset/2.16.840.1.113883.1.11.1.xml that has a url of "urn:oid:2.16.840.1.113883.1.11.1"

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 19:07):

still getting the same error

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 19:08):

Exception in thread "main" java.lang.Error: fetching org.hl7.fhir.dstu3.model.ValueSet not done yet for URI urn:oid:2.16.840.1.113883.1.11.1

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 19:11):

Found the .java file that this error is produced from.

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 19:11):

as far as I can tell, fetchResource() does not seem to support uri's

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 19:11):

it only seems to support http://

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 19:11):

also, doesn't appear to support https://

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 19:13):

...not much of a java guy, though. so maybe I'm missing something

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 19:19):

ok. figured stuff out a bit

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 19:19):

I should have figured this out sooner... @Rick Geimer mentioned this to me last week

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 19:19):

but, basically, the ig publisher doesn't currently support non-http value set urls

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 19:20):

once I changed the binding's "valueSetReference" to "http://test.com/2.16...." and changed the ValueSet resource's url to "http://test.com/2.16..." the publish worked

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 19:21):

does anyone know if there is a gforge tracker issue already submitted for this?

view this post on Zulip Grahame Grieve (Sep 22 2016 at 19:53):

I don't think there is. but it sounds trivial to fix, actually. In fact, I feel bad that I didn't think of that

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 20:29):

np

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 20:29):

I wouldn't complain about a quick fix :)

view this post on Zulip Grahame Grieve (Sep 22 2016 at 20:30):

version 9871 should fix it

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 21:16):

holy cow

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 21:16):

that was less than a minute!

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 21:16):

lol

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 21:39):

Is am I correct in thinking that http://hl7-fhir.github.io/org.hl7.fhir.igpublisher.jar is up-to-date with the latest build (including the fix you made)?

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 21:39):

looked at travis ci's build logs, and it seems to publish to hl7-fhir.github.io...

view this post on Zulip Grahame Grieve (Sep 22 2016 at 21:40):

yes that's the one. You need to hang out until that one hits #9871

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 21:46):

I think it did... https://travis-ci.org/hl7-fhir/fhir-svn shows git-svn-id: http://gforge.hl7.org/svn/fhir/trunk/build@9871

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 21:46):

and it shows completed

view this post on Zulip Grahame Grieve (Sep 22 2016 at 21:50):

yeah but it takes a little time to post to the current build

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 21:50):

oh ok

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 21:50):

any way to know when it's done?

view this post on Zulip Grahame Grieve (Sep 22 2016 at 21:51):

wait till the build number at the foot of the downloads page updates

view this post on Zulip Sean McIlvenna (Sep 22 2016 at 21:51):

oh heh yah! duh! thanks

view this post on Zulip Sean McIlvenna (Sep 24 2016 at 00:12):

hey grahame... so, not sure that the fix solved the problem. now I get this:

view this post on Zulip Sean McIlvenna (Sep 24 2016 at 00:12):

java.lang.NullPointerException
at org.hl7.fhir.dstu3.context.SimpleWorkerContext.fetchResource(SimpleWorkerContext.java:361)
at org.hl7.fhir.igtools.publisher.ValidationServices.fetch(ValidationServices.java:38)
at org.hl7.fhir.dstu3.validation.InstanceValidator.resolve(InstanceValidator.java:1739)
at org.hl7.fhir.dstu3.validation.InstanceValidator.checkReference(InstanceValidator.java:1148)
at org.hl7.fhir.dstu3.validation.InstanceValidator.validateElement(InstanceValidator.java:2752)

view this post on Zulip Sean McIlvenna (Sep 24 2016 at 00:12):

prior to updating the ig publisher to the latest version you were mentioning, I was getting the error about not having retrieved the value set yet

view this post on Zulip Sean McIlvenna (Sep 24 2016 at 00:15):

I'll send an example of the package I'm building with the ig publisher in a PM

view this post on Zulip Sean McIlvenna (Sep 26 2016 at 17:32):

any ideas?

view this post on Zulip Sean McIlvenna (Sep 28 2016 at 15:44):

any update?

view this post on Zulip Lloyd McKenzie (Sep 28 2016 at 20:33):

Yes, I got that. It relates to external resolution that wasn't previously happening and it's not handling resource references that are by URI - where the type can't be extracted. I've got a candidate fix for that, but I'm running into other issues that I want to figure out before I can commit.

view this post on Zulip Sean McIlvenna (Sep 28 2016 at 20:58):

ok. great, thanks @Lloyd McKenzie If you don't mind, please let me know when that fix is committed. I am anxious to get the fix and see it work. Thanks

view this post on Zulip Grahame Grieve (Sep 29 2016 at 03:26):

how do I reproduce this?

view this post on Zulip Sean McIlvenna (Sep 29 2016 at 21:11):

I sent a zip package to you that demonstrates this issue.

view this post on Zulip Sean McIlvenna (Sep 29 2016 at 21:12):

It is in a private message


Last updated: Apr 12 2022 at 19:14 UTC