Open
Description
In the handlebars.java 4.3.0
the problem with java 15+ supposed to be solved but the code below is still trying to get instance of nashorn
script engine, which is not included in jdk any more.
The code is being referenced via the registerHelpers
method of Handlebars
when a js file is being used as the helper source.
Here is the pull request which addressed the issue
#867
The following is the stacktrace which resulted by calling registerHelpers
method.
java.lang.NullPointerException: Cannot invoke "javax.script.ScriptEngine.put(String, Object)" because "this.engine" is null
at com.github.jknack.handlebars.helper.DefaultHelperRegistry.engine(DefaultHelperRegistry.java:304)
at com.github.jknack.handlebars.helper.DefaultHelperRegistry.registerHelpers(DefaultHelperRegistry.java:193)
at com.github.jknack.handlebars.helper.DefaultHelperRegistry.registerHelpers(DefaultHelperRegistry.java:173)
at com.github.jknack.handlebars.Handlebars.registerHelpers(Handlebars.java:750)