[SOLVED] Latest snapshot that runs jython properly?

Hi all,

What is the latest 2.5 snapshot version of openHAB in which jython works properly? I ask because I can’t get any of my rules working with the latest snapshot. Debug log shows that all .py files are in queue and no scriptengine for py files are available. I have a new install and copypasted all config files from the old install. I’m quessing it might have something to do with file permissions. Can’t debug this more ATM and just want to rule out the posibility that something in the core is broken. ERE is installed and “writing” a rule with PaperUI works and the rule runs. Everything else in openHAB seems to function as it should.

Environment details:
Proxmox 5.4 with Debian 9 container.
Zulu java 8
Manually installed yesterdays 2.5 snapshot.

P.S. Why does my phone want to correct snapshot to snapshit? :joy:

If you are seeing a message that no script engine is available for py files, then you will need to look at your Jython setup. Check file permissions on the Jython jar, if you’re using the standalone install. I’ve used the full install while testing, and IIRC it required the installation to be done by the account running OH. Also check your startup.sh or /etc/default/openhab2 file for the EXTRA_JAVA_OPTS config. There’s nothing really more that you can debug. If you set org.openhab.core.automation to DEBUG, you’ll see some entries after a restart for when the ScriptEngines are initialized, but I don’t think that’s not going to help much.

Snapshots after S1566 will work for scripted automation. If you are using the Jython helper libraries, you can use 2.5 M1. After M1, the ESH migration changes started flowing in and the 2.5 snapshots had a big issue with scripted automation starting around S1521, where classes were not reachable. That was resolved, in S1566. However, the ESH migration also renamed packages, which will require an update to the libraries. I have this ready to merge and will do this after the lucid migration has completed. This is in testing and should wrap up very soon. I’m currently running S1585 and everything is working with modified libraries.

4 Likes

Thank you, Scott. Everything’s working again.

Checked all those steps and switched to 2.5 M1 just to be sure. But it looks like I had a typo in EXTRA_JAVA_OPTS. All three opts was missing /automation. No wonder it didn’t work :man_facepalming:

1 Like