FHIR Chat · UTG build local failure · terminology

Stream: terminology

Topic: UTG build local failure


view this post on Zulip John Moehrke (Apr 16 2021 at 21:05):

I seem to be needing a build tool that I don't have.. When I build FHIR core or an IG it is fine... but when I try to build UTG I get a NPE

Publishing Content Failed: Unable to create javax script engine for javascript

I have been told that this is related to my machine using OpenJDK.. but I have also heard @David Pyke uses OpenJDK and it worked for him.

view this post on Zulip Rob Hausam (Apr 16 2021 at 23:07):

I use OpenJDK (for Mac, both Intel and native ARM) and it works for UTG and everything else.

view this post on Zulip John Moehrke (Apr 20 2021 at 12:31):

so what is your javascript provider?

view this post on Zulip Rob Hausam (Apr 20 2021 at 14:16):

@John Moehrke Maybe you can clarify what you mean? I don't recall ever needing to do anything specific for Javascript. There are other things that you have to deal with, like Jekyll.

view this post on Zulip John Moehrke (Apr 20 2021 at 18:40):

I did install the things listed as needed for the core build and IG build... but when I try to build terminology, it fails with the above javascript failure. so there seems to be a need for a javascript tool that is not brought with the defined install list... I understood that with formal JDK, it comes with a javascript tool, where as OpenJDK didn't.. but I don't know that for a fact

view this post on Zulip John Moehrke (Apr 20 2021 at 18:47):

https://medium.com/graalvm/nashorn-removal-graalvm-to-the-rescue-d4da3605b6cb

view this post on Zulip John Moehrke (Apr 20 2021 at 18:47):

so, would GraalVM javascript engine be a recommendation?

view this post on Zulip Grahame Grieve (Apr 20 2021 at 20:46):

it's related to java version. The javax script engine has been removed in the most recent versions of the JDK, and there is no workable replacement

view this post on Zulip Grahame Grieve (Apr 20 2021 at 20:47):

@Mark Iantorno we should get this back on our agenda

view this post on Zulip Mark Iantorno (Apr 20 2021 at 21:03):

I can take a look

view this post on Zulip Mark Iantorno (Apr 20 2021 at 21:03):

@John Moehrke do you have time tomorrow to walk me through exactly what is happening?

view this post on Zulip Rob Hausam (Apr 20 2021 at 21:43):

@John Moehrke What JDK version are you using? I'm using openJDK 11 mostly now (a native Mac M1 version), but I have used 14 and 15 successfully to build my IG's. I may not have tried 16 yet (I'm not sure when the Javascript change was made, but it sounds like that may not work).

view this post on Zulip John Moehrke (Apr 20 2021 at 21:45):

I have built this machine just a few weeks ago, so grabbed OpenJDK 16

view this post on Zulip John Moehrke (Apr 20 2021 at 21:45):

Mark Iantorno said:

John Moehrke do you have time tomorrow to walk me through exactly what is happening?

yes, 9am, 2pm, or 4:30pm central time

view this post on Zulip Rob Hausam (Apr 20 2021 at 21:46):

OK. Sounds like that's likely the explanation. It's pretty straightforward to also install and specify an earlier version - particularly JDK 11, which can have long term support.

view this post on Zulip Rob Hausam (Apr 20 2021 at 22:26):

This Javascript issue doesn't seem to apply for all IGs, but it does for UTG. I just built the IPS IG using JDK 16 (liberica-16+36 on the Mac M1) without any issues. But it failed when building UTG with Publishing Content Failed: Unable to create javax script engine for javascript. I then rebuilt UTG with JDK 11 and that worked (but I get the Warning: Nashorn engine is planned to be removed from a future JDK release). I think that the GraalVM engine might be able to provide a solution, but apparently we would at least have to do some reconfiguring of our build to be able to use it.

view this post on Zulip Grahame Grieve (Apr 20 2021 at 23:13):

not many IGs use the feature that UTG does here. That's what Mark is going to look at - how to package up the nashorn replacement

view this post on Zulip John Moehrke (Apr 21 2021 at 11:45):

or, could we move UTG away from using javascript? we install many tools, surely one of the others can do what it is trying to do with javascript.

view this post on Zulip Grahame Grieve (Apr 21 2021 at 11:49):

I'd rather continue supporting javascript; it's very effective for the purpose over trying to muck around with xslt to do the same job.

view this post on Zulip John Moehrke (Apr 21 2021 at 11:52):

well, I had to ask. so many other builds work just fine. UTG is such an odd duck, and it seems it is odd just purely to be different.


Last updated: Apr 12 2022 at 19:14 UTC