This is an openHAB issue, not specific to Jython. The openHAB OSGi bundle load order seems to be incorrect at times. I haven’t had a problem with this myself, but others have reported similar issues. It might be related to the specific set of bundles you have configured for openHAB.
I don’t know of any great workarounds. Some people have put extra delays in various parts of the startup sequence, but that doesn’t seem like a very reliable solution to me.
In your environment… I’ve been running openHAB2 JSR223 Jython since before it was released and have not had the problem.
As I said before, this is not an issue specific to JSR223. That said, the JSR223 layer is using the “experimental” rules engine of openHAB2 but it’s not clear that this is directly relevant to your issue.