I am using the “Release Build” of openHAB 3.1.0 with Zulu Java 11.0.12. (I found out the hard was that Java 16 doesn’t work. I have a fresh install of Ubuntu 20. So, it is clean as a whistle.
I am getting this exact same error. And, only the most rudimentary scripts work. However, they won’t work at all unless I resolve the issue below:
2021-07-29 12:52:57.146 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error while creating ScriptEngine
(There is more to that error, but I don’t believe it is relevant)
However, if I want to run a script like
I get the error:
2021-07-29 13:33:00.428 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID '69f7181e4c' failed: org.graalvm.polyglot.PolyglotException: ReferenceError: "itemRegistry" is not defined
It doesn’t matter the item, it doesn’t matter if it is with Blockly or JS. I haven’t been able to get past this. That is why I have a fresh Ubuntu install with nothing but Java and OpenHAB installed. No matter what I do, I cannot script with items. I have seen various posts with errors like mine, but theirs go away, and mine simply do not.