FHIR Chat · build failure - example processing - NullPointerException · committers

Stream: committers

Topic: build failure - example processing - NullPointerException


view this post on Zulip John Moehrke (Mar 16 2016 at 15:17):

 [java]   Build: imagingobjectexcerpt                                              0.006 257sec  857MB
 [java] FHIR build failure @ Wed, Mar 16, 2016 10:11-0500                          2.437 259sec  857MB
 [java] Error: processing imagingobjectexcerpt-example
 [java] java.lang.Exception: processing imagingobjectexcerpt-example
 [java]     at org.hl7.fhir.tools.publisher.Publisher.produceResource2(Publisher.java:3222)
 [java]     at org.hl7.fhir.tools.publisher.Publisher.produceSpec(Publisher.java:2053)
 [java]     at org.hl7.fhir.tools.publisher.Publisher.produceSpecification(Publisher.java:1907)
 [java]     at org.hl7.fhir.tools.publisher.Publisher.execute(Publisher.java:611)
 [java]     at org.hl7.fhir.tools.publisher.Publisher.main(Publisher.java:463)
 [java] Caused by: java.lang.NullPointerException
 [java]     at org.hl7.fhir.tools.publisher.BreadCrumbManager.makelist(BreadCrumbManager.java:280)
 [java]     at org.hl7.fhir.tools.publisher.PageProcessor.processPageIncludes(PageProcessor.java:781)
 [java]     at org.hl7.fhir.tools.publisher.PageProcessor.processPageIncludes(PageProcessor.java:451)
 [java]     at org.hl7.fhir.tools.publisher.PageProcessor.processPageIncludes(PageProcessor.java:447)
 [java]     at org.hl7.fhir.tools.publisher.Publisher.processExample(Publisher.java:3596)
 [java]     at org.hl7.fhir.tools.publisher.Publisher.produceResource2(Publisher.java:3220)

view this post on Zulip John Moehrke (Mar 16 2016 at 15:19):

I have tried to resolve this... days have gone by... What stupid thing did I do? Surely someone has figured out what generally causes the build to throw nothing more informative than NullPointerException????

view this post on Zulip Lloyd McKenzie (Mar 16 2016 at 15:45):

You've tried validating that instance against schema and schematron? (the "built" version of it)?

view this post on Zulip John Moehrke (Mar 16 2016 at 20:02):

guide me... what should I do? I have eyeballed it, yes. It is not complex. (I am making an alternative ImagingObjectSelection for the imaging wg to evaluate an alternative...

view this post on Zulip Grahame Grieve (Mar 16 2016 at 20:48):

there's something wrong with the registration of the example, not the example itself

view this post on Zulip Grahame Grieve (Mar 16 2016 at 20:49):

but it's not obvious to me what that would be

view this post on Zulip John Moehrke (Mar 17 2016 at 02:13):

what I have done is made a copy of ImagingObjectSelection, and made some minor optional additions of elements.... so is there something I should have done to the example beyond fixing the xsd it pulls in, and the start/end element name???

view this post on Zulip Grahame Grieve (Mar 17 2016 at 02:20):

why did you change the start/end element name?

view this post on Zulip John Moehrke (Mar 17 2016 at 11:54):

I made a new resource starting from ImagingObjectSelection... called it ImagingExcerpt

view this post on Zulip John Moehrke (Mar 18 2016 at 13:45):

I just abandoned everything i had done... and started fresh following to the letter the instructions http://wiki.hl7.org/index.php?title=FHIR_Guide_to_Authoring_Resources I end up with the same null pointer exception error

view this post on Zulip Keith Boone (Mar 18 2016 at 16:03):

He changed the resource name ... he's showing an alternative way to implement it.

view this post on Zulip Grahame Grieve (Mar 18 2016 at 18:17):

it seems my earlier comment didn't make it into this topic. It looks to me as though you have not added the resource to heirarchy.xml

view this post on Zulip John Moehrke (Mar 18 2016 at 19:17):

that is not it.. I did add it to heirarchy.xml

view this post on Zulip Grahame Grieve (Mar 18 2016 at 19:21):

ok. update and try again then please

view this post on Zulip Grahame Grieve (Mar 18 2016 at 19:22):

I've tried to improve the error mesage

view this post on Zulip John Moehrke (Mar 18 2016 at 19:37):

building.....

view this post on Zulip John Moehrke (Mar 18 2016 at 19:45):

unable to find map for resource-instance:ImagingExerpt

view this post on Zulip John Moehrke (Mar 18 2016 at 19:52):

 [java] Questionnaire Generation Failed: Unable to find map for resource-questionnaire:ImagingExcerpt
 [java]   ERROR: Unable to process warnings: processing imagingexcerpt-example
 [java] This was a Full Build                                                      0.925 561sec 1225MB
 [java] java.lang.Exception: processing imagingexcerpt-example
 [java]     at org.hl7.fhir.tools.publisher.Publisher.produceResource2(Publisher.java:3222)
 [java]     at org.hl7.fhir.tools.publisher.Publisher.produceSpec(Publisher.java:2053)
 [java]     at org.hl7.fhir.tools.publisher.Publisher.produceSpecification(Publisher.java:1907)
 [java]     at org.hl7.fhir.tools.publisher.Publisher.execute(Publisher.java:611)
 [java]     at org.hl7.fhir.tools.publisher.Publisher.main(Publisher.java:463)
 [java] Caused by: java.lang.Exception: Unable to find map for resource-instance:ImagingExcerpt
 [java]     at org.hl7.fhir.tools.publisher.BreadCrumbManager.makelist(BreadCrumbManager.java:283)
 [java]     at org.hl7.fhir.tools.publisher.PageProcessor.processPageIncludes(PageProcessor.java:782)
 [java]     at org.hl7.fhir.tools.publisher.PageProcessor.processPageIncludes(PageProcessor.java:450)
 [java]     at org.hl7.fhir.tools.publisher.PageProcessor.processPageIncludes(PageProcessor.java:446)
 [java]     at org.hl7.fhir.tools.publisher.Publisher.processExample(Publisher.java:3598)
 [java]     at org.hl7.fhir.tools.publisher.Publisher.produceResource2(Publisher.java:3220)
 [java]     ... 4 more

view this post on Zulip John Moehrke (Mar 18 2016 at 19:53):

why does Questionnaire get to FAIL ME!!! okay, more specifically, what do I need to do to get questionnaire to be happy?

view this post on Zulip Paul Knapp (Mar 18 2016 at 19:54):

Try doing an update then run again.

view this post on Zulip Paul Knapp (Mar 18 2016 at 19:55):

oh and to a clean after the update, before the publish.

view this post on Zulip John Moehrke (Mar 18 2016 at 19:56):

paul, I hae done that many many times.

view this post on Zulip Grahame Grieve (Mar 18 2016 at 19:57):

ImagingExcerpt is a different name to your type?

view this post on Zulip John Moehrke (Mar 18 2016 at 19:57):

that is the Resource i am creating

view this post on Zulip Paul Knapp (Mar 18 2016 at 19:58):

It is your resource that has the error.

view this post on Zulip John Moehrke (Mar 18 2016 at 19:58):

I figure... but where?

view this post on Zulip Grahame Grieve (Mar 18 2016 at 20:01):

beats me. send me your heitarchy.xml. All the evidence from looking at the code says that the problem is there

view this post on Zulip Paul Knapp (Mar 18 2016 at 20:01):

Are you missing any closing tags or /> in the example?

view this post on Zulip John Moehrke (Mar 18 2016 at 20:02):

looked again at hierarchy.... spelling mistake... building again

view this post on Zulip Grahame Grieve (Mar 18 2016 at 20:03):

I thought there was an explicit error if it wasn't in heirarchy.xml. I'll check

view this post on Zulip John Moehrke (Mar 18 2016 at 20:51):

build successful -- 34 minutes

view this post on Zulip Grahame Grieve (Mar 18 2016 at 20:56):

great

view this post on Zulip Keith Boone (Mar 19 2016 at 07:00):

Misspelling in hierarchy.xml.

view this post on Zulip Keith Boone (Mar 19 2016 at 07:03):

Grahame, it would be extraordinarily helpful to me for diagnosing these sorts of issues if you would provide a short explanation of the reason for each line that has to be added to some file to add a new resource. e.g., You add the resource name to hierarchy.xml so that we can assign numbers to each "page" in the build.

view this post on Zulip Keith Boone (Mar 19 2016 at 07:03):

That way, when we get errors related to a particular module (i.e., breadcrumbmanager), we can figure out what file might be the source of the problem. This will also help us lower our bus number.

view this post on Zulip Grahame Grieve (Mar 19 2016 at 07:21):

it's probably a good idea, but where would we do that? on the wiki where it already is, or somewhere else where no one looks?

view this post on Zulip John Moehrke (Mar 19 2016 at 18:24):

so the wiki was correct... And you have made the build more clear on this error, right? Therefore I think enough is done for now. Clearly better tooling is always better; but we need to be realistic about where effort is spent. The root cause of this issue was my fat-fingers.

view this post on Zulip Grahame Grieve (Mar 19 2016 at 20:03):

yes I made the actual error explicit now

view this post on Zulip John Moehrke (Mar 19 2016 at 21:22):

Meaning, the error says: "Did you do a John, and misspell your Resource name?"

view this post on Zulip Grahame Grieve (Mar 19 2016 at 21:33):

No, it says, "John, check your spelling in your file". It's always helpful to be specific about the wrong thing in error messages

view this post on Zulip Keith Boone (Mar 19 2016 at 22:54):

I think in the Wiki, which both John and I read before creating a new resource.


Last updated: Apr 12 2022 at 19:14 UTC