Closed GoogleCodeExporter closed 9 years ago
The bsh.BshScriptEngine just delegates to the interpreter.
You are getting the NPE because
new ScriptEngineManager().getEngineByName("beanshell")
evaluates to <null>.
Nevertheless, I can't reproduce this.
Could you verify that your jar is correct and contains a file
"META-INF/services/javax.script.ScriptEngineFactory"? If not you may run into
issue#43
http://code.google.com/p/beanshell2/issues/detail?id=43
Did you build the jar on your own? You must not use ant 1.7 to build..
Original comment by pejob...@gmail.com
on 12 Nov 2011 at 3:51
Thanks for taking a look, but i'm still having the issue.
i'm using the 2.1b4 jarfile which contains the javax.script.ScriptEngineFactory.
i did not build my own jar.
note that the exception is not an NPE, but a complaint about foo being unknown.
the exception occurs only when foo is null.
Original comment by etans...@gmail.com
on 14 Nov 2011 at 5:59
note: in addition to delegating to an interpreter, the ScriptingEngine calls
setNameSpace() which may be causing the issue.
Original comment by etans...@gmail.com
on 14 Nov 2011 at 9:32
Ok, i drilled down the problem again. It's a duplicate to issue#55 which is
already fixed in trunk and branch v2.1. So the fix will be included in the next
version 2.1b5.
Original comment by pejob...@gmail.com
on 16 Nov 2011 at 9:26
Original issue reported on code.google.com by
etans...@gmail.com
on 11 Nov 2011 at 7:12