FHIR Chat · how to get error information in IG build · IG creation

Stream: IG creation

Topic: how to get error information in IG build


view this post on Zulip Brian Reinhold (Nov 20 2018 at 13:42):

I am building the IG guide using Lloyd's Framework and I see this line at the end
Errors: 560 Warnings: 360 Info: 106 (00:02:04.0809sec)
yet the guide builds.

What are the errors and how can I see them?

Also, I have a bundle example that causes a build failure in the validator when I include it. How can I get more information so I can find out what the validator is complaining about?

view this post on Zulip Lloyd McKenzie (Nov 20 2018 at 15:48):

The errors and warnings are in qa.html. A successful build just means there weren't any fatal errors. Before your IG is ready to publish, it should be down to 0 errors and warnings. In terms of the bad example, there should be some hints as to the reason for failure in the stack trace associated with the build failure.

view this post on Zulip Brian Reinhold (Nov 20 2018 at 16:13):

The errors and warnings are in qa.html. A successful build just means there weren't any fatal errors. Before your IG is ready to publish, it should be down to 0 errors and warnings. In terms of the bad example, there should be some hints as to the reason for failure in the stack trace associated with the build failure.

@Lloyd McKenzie The only message is NullPointerException on the stack trace. Not too helpful.

view this post on Zulip Lloyd McKenzie (Nov 20 2018 at 18:16):

It is if you provide the stack trace - can't debug if I don't know where the issue is :)

view this post on Zulip Brian Reinhold (Nov 20 2018 at 21:16):

It is if you provide the stack trace - can't debug if I don't know where the issue is :)

@Lloyd McKenzie Here's the stack trace. If I remove a transaction Bundle resource example there is no problem.

a] Validating Resources                                                             (48.0141sec)
     [java] Terminology server: Check for supported code systems for http://unstats.un.org/unsd/methods/m49/m49.htm
     [java] java.lang.NullPointerException
     [java]     at org.hl7.fhir.igtools.publisher.ValidationServices.fetch(ValidationServices.java:61)
     [java]     at org.hl7.fhir.r4.validation.InstanceValidator.checkReference(InstanceValidator.java:1724)
     [java]     at org.hl7.fhir.r4.validation.InstanceValidator.validateElement(InstanceValidator.java:3699)
     [java]     at org.hl7.fhir.r4.validation.InstanceValidator.start(InstanceValidator.java:2665)
     [java]     at org.hl7.fhir.r4.validation.InstanceValidator.validateResource(InstanceValidator.java:3978)
     [java]     at org.hl7.fhir.r4.validation.InstanceValidator.validateContains(InstanceValidator.java:3382)
     [java]     at org.hl7.fhir.r4.validation.InstanceValidator.validateElement(InstanceValidator.java:3704)
     [java]     at org.hl7.fhir.r4.validation.InstanceValidator.validateElement(InstanceValidator.java:3709)
     [java]     at org.hl7.fhir.r4.validation.InstanceValidator.start(InstanceValidator.java:2646)
     [java]     at org.hl7.fhir.r4.validation.InstanceValidator.validateResource(InstanceValidator.java:3978)
     [java]     at org.hl7.fhir.r4.validation.InstanceValidator.validate(InstanceValidator.java:709)
     [java]     at org.hl7.fhir.r4.validation.InstanceValidator.validate(InstanceValidator.java:669)
     [java]     at org.hl7.fhir.igtools.publisher.Publisher.validate(Publisher.java:2802)
     [java]     at org.hl7.fhir.igtools.publisher.Publisher.validate(Publisher.java:2779)
     [java]     at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:591)
     [java]     at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:526)
     [java]     at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4925)
     [java] Exception in thread "main" java.lang.NullPointerException
     [java]     at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:4935)
     [java] java.lang.NullPointerException                                                   (49.0461sec)
     [java] Publishing Content Failed: null                                                  (49.0473sec)
     [java]                                                                                  (49.0473sec)

view this post on Zulip Brian Reinhold (Nov 20 2018 at 21:59):

The errors and warnings are in qa.html. A successful build just means there weren't any fatal errors. Before your IG is ready to publish, it should be down to 0 errors and warnings. In terms of the bad example, there should be some hints as to the reason for failure in the stack trace associated with the build failure.

@Lloyd McKenzie The only message is NullPointerException on the stack trace. Not too helpful.

There is no qa.html anywhere in /temp or there project as a whole. Is it somewhere else like in the .fhir directory?

view this post on Zulip Lloyd McKenzie (Nov 20 2018 at 22:11):

qa.html should be in your output folder - but only if the build was at least somewhat successful.

view this post on Zulip Brian Reinhold (Nov 20 2018 at 22:12):

qa.html should be in your output folder - but only if the build was at least somewhat successful.

Okay, so a null pointer exception puts an end to that. I will comment out the bundle resource and repeat so I can examine these errors

view this post on Zulip Lloyd McKenzie (Nov 20 2018 at 22:14):

I think the NPE is because you have a resource in one of your Bundle entries that doesn't have an id element. Can you double check that? If that fixes the problem, you can also submit a change request suggesting that the validator should fail a bit more gracefully if that happens.

view this post on Zulip Brian Reinhold (Nov 20 2018 at 22:17):

I think the NPE is because you have a resource in one of your Bundle entries that doesn't have an id element. Can you double check that? If that fixes the problem, you can also submit a change request suggesting that the validator should fail a bit more gracefully if that happens.

All the Observation resources contain no logical id because they are being created or conditionally created. I give them temporary ids but since this is a transaction bundle the ids are placed in the 'fullURL' element of the entry and there is no id. That is done by HAPI FHIR.

view this post on Zulip Lloyd McKenzie (Nov 20 2018 at 22:27):

Ok. I've pushed up a fix that may address your issue. After it's built, merged, rebuilt and published, you can grab the new validator and try again. I'll ping here when that's happened.

view this post on Zulip Brian Reinhold (Nov 20 2018 at 22:49):

Ok. I've pushed up a fix that may address your issue. After it's built, merged, rebuilt and published, you can grab the new validator and try again. I'll ping here when that's happened.

@Lloyd McKenzie I did not know about the qa.html. Pretty handy. Wish I knew about that a few months ago. I am getting an error on something I am not even sure I wrote. Its a link to the implementation guide in the resources.md. The link looks like this

<ul>{% include list-simple-implementationguides.xhtml %}</ul>

All the other 'list-simple-*' work. What is it looking for?

view this post on Zulip Lloyd McKenzie (Nov 21 2018 at 01:00):

Fix is now up. Not sure why you're including anything . Is the include in your source?

view this post on Zulip Brian Reinhold (Nov 21 2018 at 10:27):

Fix is now up. Not sure why you're including anything . Is the include in your source?

The fixed worked. But I will say that all my transaction bundles have NUMEROUS errors mostly due to unable to find referenced resources (temporary ids)


Last updated: Apr 12 2022 at 19:14 UTC