Where to download openhab-helper-libraries for OH 3.0

For an addon that I’m developing that targets OH 3.0 I need to test rules with channel triggers and actions.
Previously I had some doubts that where answered here and worked correctly.

But after some pause I continued to develop the addon today and updated to last OH 3.0 build and now it doesn’t works.
I download the openhab-helper-libraries from here.

But I found several errors, the first was about the LogAction that I’ve able to solve changing to Log but then there’s another:

 Script execution failed: TypeError: Cannot read property "class" from undefined in /opt/servers/openhab3/conf/automation/lib/javascript/core/actions.js at line number 34

Is there any place where can I download a working version of openhab-helper-libraries for las OH 3.0 build?

@5iver would know.

The Jython helper libraries should work. If you have issues with the JS libraries, please open an issue in the helper library repo with the specific steps needed to reproduce.

2 Likes

Thanks @5iver

I’ve tried to configure Jython following installation instructions but it doesn’t start correctly:

2020-09-27 22:29:03.406 [ERROR] [penhab.core.automation.module.script] - bundle org.openhab.core.automation.module.script:3.0.0.202009250732 (135)[org.openhab.core.automation.module.script.internal.provider.ScriptModuleTypeProvider(80)] : The setScriptEngineFactory method has thrown an exception
java.lang.NoClassDefFoundError: javax/script/ScriptEngineFactory
        at java.lang.ClassLoader.findBootstrapClass(Native Method) ~[?:?]
        at java.lang.ClassLoader.findBootstrapClassOrNull(ClassLoader.java:1258) ~[?:?]
        at java.lang.System$2.findBootstrapClassOrNull(System.java:2134) ~[?:?]
        at jdk.internal.loader.ClassLoaders$BootClassLoader.loadClassOrNull(ClassLoaders.java:118) ~[?:?]
        at jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:616) ~[?:?]
        at jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:579) ~[?:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?]
        at org.eclipse.osgi.internal.framework.ContextFinder.loadClass(ContextFinder.java:127) ~[org.eclipse.osgi-3.12.100.jar:?]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:522) ~[?:?]
        at java.lang.Class.forName0(Native Method) ~[?:?]
        at java.lang.Class.forName(Class.java:398) ~[?:?]
        at java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1209) ~[?:?]
        at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1220) ~[?:?]
        at java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1264) ~[?:?]
        at java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299) ~[?:?]
        at java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384) ~[?:?]
        at javax.script.ScriptEngineManager.initEngines(ScriptEngineManager.java:123) ~[java.scripting:?]
        at javax.script.ScriptEngineManager.init(ScriptEngineManager.java:87) ~[java.scripting:?]
        at javax.script.ScriptEngineManager.<init>(ScriptEngineManager.java:62) ~[java.scripting:?]
        at org.openhab.core.automation.module.script.ScriptEngineFactory.<clinit>(ScriptEngineFactory.java:35) ~[?:?]
        at org.openhab.core.automation.module.script.AbstractScriptEngineFactory.getScriptTypes(AbstractScriptEngineFactory.java:42) ~[?:?]
        at org.openhab.core.automation.module.script.internal.provider.ScriptModuleTypeProvider.setScriptEngineFactory(ScriptModuleTypeProvider.java:146) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) ~[bundleFile:?]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) ~[bundleFile:?]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664) ~[bundleFile:?]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510) [bundleFile:?]
        at org.apache.felix.scr.impl.inject.methods.BindMethod.invoke(BindMethod.java:42) [bundleFile:?]
        at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1813) [bundleFile:?]
        at org.apache.felix.scr.impl.manager.DependencyManager.bindDependency(DependencyManager.java:1637) [bundleFile:?]
        at org.apache.felix.scr.impl.manager.DependencyManager.bind(DependencyManager.java:1624) [bundleFile:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:307) [bundleFile:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:114) [bundleFile:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:982) [bundleFile:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:955) [bundleFile:?]
        at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:900) [bundleFile:?]
        at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212) [org.eclipse.osgi-3.12.100.jar:?]
        at java.security.AccessController.doPrivileged(Native Method) [?:?]
        at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:210) [org.eclipse.osgi-3.12.100.jar:?]
        at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:45) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:508) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:461) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:624) [org.eclipse.osgi-3.12.100.jar:?]
    at org.openhab.core.common.registry.AbstractRegistry$ProviderTracker.addingService(AbstractRegistry.java:133) [bundleFile:?]
    at org.openhab.core.common.registry.AbstractRegistry$ProviderTracker.addingService(AbstractRegistry.java:1) [bundleFile:?]
    at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) [osgi.core-6.0.0.jar:?]
    at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870) [osgi.core-6.0.0.jar:?]
    at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) [osgi.core-6.0.0.jar:?]
    at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) [osgi.core-6.0.0.jar:?]
    at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) [osgi.core-6.0.0.jar:?]
    at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:920) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469) [org.eclipse.osgi-3.12.100.jar:?]
    at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906) [bundleFile:?]
    at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892) [bundleFile:?]
    at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [bundleFile:?]
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959) [bundleFile:?]
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732) [bundleFile:?]
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:666) [bundleFile:?]
    at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:432) [bundleFile:?]
    at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:665) [bundleFile:?]
    at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:338) [bundleFile:?]
    at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:382) [bundleFile:?]
    at org.apache.felix.scr.impl.Activator.access$200(Activator.java:49) [bundleFile:?]
    at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:264) [bundleFile:?]
    at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) [bundleFile:?]
    at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) [bundleFile:?]
    at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) [bundleFile:?]
    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) [osgi.core-6.0.0.jar:?]
    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) [osgi.core-6.0.0.jar:?]
    at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) [osgi.core-6.0.0.jar:?]
    at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) [osgi.core-6.0.0.jar:?]
    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:168) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.container.Module.publishEvent(Module.java:476) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.container.Module.start(Module.java:467) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1634) [org.eclipse.osgi-3.12.100.jar:?]
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1614) [org.eclipse.osgi-3.12.100.jar:?]
at     org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1585) [org.eclipse.osgi-3.12.100.jar:?]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1528) [org.eclipse.osgi-3.12.100.jar:?]
        at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) [org.eclipse.osgi-3.12.100.jar:?]
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [org.eclipse.osgi-3.12.100.jar:?]
        at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340) [org.eclipse.osgi-3.12.100.jar:?]

2020-09-27 22:29:03.413 [ERROR] [penhab.core.automation.module.script] - bundle org.openhab.core.automation.module.script:3.0.0.202009250732 (135)[org.openhab.core.automation.module.script.internal.provider.ScriptModuleTypeProvider(80)] : The setScriptEngineFactory method has thrown an exception
java.lang.NoClassDefFoundError: Could not initialize class org.openhab.core.automation.module.script.ScriptEngineFactory
at org.openhab.core.automation.module.script.internal.NashornScriptEngineFactory.getScriptTypes(NashornScriptEngineFactory.java:47) ~[?:?]
at org.openhab.core.automation.module.script.internal.provider.ScriptModuleTypeProvider.setScriptEngineFactory(ScriptModuleTypeProvider.java:146) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

2020-09-27 22:29:05.425 [ERROR] [penhab.core.automation.module.script] - bundle org.openhab.core.automation.module.script:3.0.0.202009250732 (135)[org.openhab.core.automation.module.script.internal.ScriptEngineManagerImpl(75)] : The addScriptEngineFactory method has thrown an exception
java.lang.NoClassDefFoundError: Could not initialize class org.openhab.core.automation.module.script.ScriptEngineFactory
        at org.openhab.core.automation.module.script.internal.NashornScriptEngineFactory.getScriptTypes(NashornScriptEngineFactory.java:47) ~[?:?]
        at org.openhab.core.automation.module.script.internal.ScriptEngineManagerImpl.addScriptEngineFactory(ScriptEngineManagerImpl.java:59) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
        at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
        at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
        at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) ~[bundleFile:?]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) ~[bundleFile:?]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664) ~[bundleFile:?]
        at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510) [bundleFile:?]

If I remove the EXTRA_JAVA_OPTS with the jython then it starts ok, but logically I don’t have Jython enabled.
Any clue of what can be happening?

PD: I checked paths on EXTRA_JAVA_OPTS and checked that jython.jar is ok:

lujop@DESKTOP-69QGM5G:/opt/servers/openhab3/conf/automation/jython$ java -jar jython-standalone-2.7.2.jar
Jython 2.7.2 (v2.7.2:925a3cc3b49d, Mar 21 2020, 10:03:58)
[OpenJDK 64-Bit Server VM (AdoptOpenJDK)] on java11.0.8
Type "help", "copyright", "credits" or "license" for more information.
>>>

@5iver I been looking at that for some time but I haven’t been able to solve.
Is this suposed to work with Java 11? I found that thread, but it’s not clear to me if that is expected to work or not.

Debuguing and putting a breakpoint on exceptions I’ve been able to catch that:

That seems strange, because in some way it’s detected if it’s tried to be added, isn’t it?

The current Jython helper libraries work with OH 3. The issue is that manual installations of Jython will not work currently with OH 3, and you will need to use a Jython 2.7.2 add-on, as I had mentioned earlier here…

There is some more background over here…

1 Like

Thank you very much for your help @5iver
I’ve advanced with that but still not able to execute a script as a rule action to test my addon.

What I’ve done:

  • Build the addon from your PR using the 3.0 bot migrated code.
    It compiled correctly after changing ConfigConstants for OpenHAB. I supposed that it’s the way to go because your PR isn’t merged yet, isn’t it the way?
  • I installed manually in the addons folder
  • I changed the start.sh script removing the XBoothClasspath option and leave the other properties about paths
  • (From previously I had installed the files from the script helper report on conf/automation

No it seems that it starts correctly:

2020-10-03 16:30:44.186 [DEBUG] [ory.jython.JythonScriptEngineFactory] - Loading JythonScriptEngineFactory
2020-10-03 16:30:44.187 [TRACE] [ory.jython.JythonScriptEngineFactory] - python.home [/opt/servers/openhab3/userdata/cache/org.eclipse.osgi/214/0/bundleFile], python.path [/opt/servers/openhab3/conf/automation/lib/python], python.cachdir [/opt/servers/openhab3/userdata/cache/org.openhab.automation.scriptenginefactory.jython/cachedir]
2020-10-03 16:30:44.188 [TRACE] [ipt.internal.ScriptEngineManagerImpl] - JythonScriptEngineFactory.getScriptTypes(): [py, text/python, application/python, text/x-python, application/x-python]
2020-10-03 16:30:44.833 [TRACE] [ipt.internal.ScriptEngineManagerImpl] - addScriptEngineFactory: engine was null
2020-10-03 16:30:45.107 [TRACE] [al.provider.ScriptModuleTypeProvider] - setScriptEngineFactory: engine was null

But still, it doesn’t appear the option in the UI:

Any help or direction where to look or a workaround to be able to test my script will be heavily appreciated.

When using the Jython add-on, you should not have anything in your EXTRA_JAVA_OPTS for Jython, unless you are configuring python.path for another directory where custom libraries are being stored. It’s possible this could be messing you up. I have not done any recent testing of OH3, so you are bleeding edge.

Also, be sure to clear the cache when updating the add-on.

Thanks @5iver,

I tested also without putting any parameter. I will try to debug then and see where the problem resides.

Just to confirm, the scripts and instructions from the openhab-scripters (excluding the jython.jar and paths parameters) are also necesari for OH3.0?

If you use the helper library add-on, you won’t need the manual install. Unfortunately, this PR was closed. The steps needed are in…

My preference is to wait until I do some testing with OH 3.0.

Thanks, I will try what I can do, and if not will have to wait for your work.
The problem is that I’m finishing an addon that I started targeting OH 3.0 where I need some action scripts to test all the functionality.
Before add-ons master branch being OH3.0 I was able to test with Javascript but now…

@5iver I’ve been debugging it and althought I haven’t found the original problem I found something.

Initially, before org.openhab.core.automation.module.script.internal.provider.ScriptModuleTypeProvider#setScriptEngineFactory is called for each engine I can get the Jython script engine:

And create it:

But when scripts start to register and it takes the turn of Jython, just after this is called (before the createSCriptEngine is called alls ok and watchpoint is able to create engine:

public void setScriptEngineFactory(ScriptEngineFactory engineFactory) {
    ScriptEngine scriptEngine = engineFactory.createScriptEngine(engineFactory.getScriptTypes().get(0));

But after, It brokes the PythonEngine and then getScriptByExtension("py") always returns null.
Can it be a problem in module classpath, and that when Jython engine is tried to be created inside the module classpath it breaks?

The real error has been difficult to caught because ScriptEngineManager silently ignores exceptions.

But Modifying the JythonScriptEngineFActory with:

@Override
public @Nullable ScriptEngine createScriptEngine(String scriptType) {
    for (javax.script.ScriptEngineFactory factory : ENGINE_MANAGER.getEngineFactories()) {
        List<String> extensions = factory.getExtensions();
        if (extensions.contains(SCRIPT_TYPE)) {
            try {
                return factory.getScriptEngine();
            } catch (Exception e) {
                logger.error("Error getting Jython engine", e);
            }
        }
    }
    return null;
}

I was able to catch the real error:

2020-10-04 00:58:10.016 [ERROR] [ory.jython.JythonScriptEngineFactory] - Error getting Jython engine

org.python.core.PyException: java.lang.ClassCastException: java.lang.ClassCastException: class site$py cannot be cast to class org.python.core.PyRunnable (site$py is in unnamed module of loader org.python.core.BytecodeLoader$Loader @6761d6c6; org.python.core.PyRunnable is in unnamed module of loader 'app')

    at org.python.core.Py.JavaError(Py.java:547) ~[bundleFile:?]

    at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java:256) ~[bundleFile:?]

    at org.python.core.util.importer.getModuleCode(importer.java:240) ~[bundleFile:?]

    at org.python.core.util.importer.importer_load_module(importer.java:106) ~[bundleFile:?]

    at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:175) ~[bundleFile:?]

    at org.python.modules.zipimport.zipimporter$zipimporter_load_module_exposer.__call__(Unknown Source) ~[bundleFile:?]

    at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:48) ~[bundleFile:?]

    at org.python.core.imp.loadFromLoader(imp.java:819) ~[bundleFile:?]

    at org.python.core.imp.find_module(imp.java:763) ~[bundleFile:?]

    at org.python.core.imp.import_next(imp.java:1158) ~[bundleFile:?]

    at org.python.core.imp.import_first(imp.java:1198) ~[bundleFile:?]

    at org.python.core.imp.load(imp.java:1016) ~[bundleFile:?]

    at org.python.core.Py.importSiteIfSelected(Py.java:1842) ~[bundleFile:?]

    at org.python.util.PythonInterpreter.<init>(PythonInterpreter.java:111) ~[bundleFile:?]

    at org.python.util.PythonInterpreter.threadLocalStateInterpreter(PythonInterpreter.java:80) ~[bundleFile:?]

    at org.python.jsr223.PyScriptEngine.<init>(PyScriptEngine.java:27) ~[bundleFile:?]

    at org.python.jsr223.PyScriptEngineFactory.getScriptEngine(PyScriptEngineFactory.java:85) ~[bundleFile:?]

    at org.openhab.automation.scriptenginefactory.jython.JythonScriptEngineFactory.createScriptEngine(JythonScriptEngineFactory.java:94) [bundleFile:?]

    at org.openhab.core.automation.module.script.internal.ScriptEngineManagerImpl.addScriptEngineFactory(ScriptEngineManagerImpl.java:70) [bundleFile:?]

    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]

    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]

    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

    at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

    at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) [bundleFile:?]

    at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) [bundleFile:?]

    at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664) [bundleFile:?]

    at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510) [bundleFile:?]

    at org.apache.felix.scr.impl.inject.methods.BindMethod.invoke(BindMethod.java:42) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1813) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1788) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeBindMethod(SingleComponentManager.java:435) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:325) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:294) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168) [bundleFile:?]

    at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125) [bundleFile:?]

    at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:920) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469) [org.eclipse.osgi-3.12.100.jar:?]

    at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:666) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:432) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:665) [bundleFile:?]

    at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:338) [bundleFile:?]

    at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:382) [bundleFile:?]

    at org.apache.felix.scr.impl.Activator.access$200(Activator.java:49) [bundleFile:?]

    at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:264) [bundleFile:?]

    at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) [bundleFile:?]

    at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) [bundleFile:?]

    at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) [bundleFile:?]

    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) [osgi.core-6.0.0.jar:?]

    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) [osgi.core-6.0.0.jar:?]

    at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) [osgi.core-6.0.0.jar:?]

    at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) [osgi.core-6.0.0.jar:?]

    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:168) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.container.Module.publishEvent(Module.java:476) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.container.Module.start(Module.java:467) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.container.ModuleContainer.start(ModuleContainer.java:750) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:741) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:511) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:457) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:447) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.framework.EquinoxBundle.resolve(EquinoxBundle.java:959) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.framework.EquinoxBundle.findEntries(EquinoxBundle.java:661) [org.eclipse.osgi-3.12.100.jar:?]

    at org.openhab.core.automation.internal.provider.AbstractResourceBundleProvider.processAutomationProvider(AbstractResourceBundleProvider.java:236) [bundleFile:?]

    at org.openhab.core.automation.internal.provider.AutomationResourceBundlesEventQueue.processBundleChanged(AutomationResourceBundlesEventQueue.java:219) [bundleFile:?]

    at org.openhab.core.automation.internal.provider.AutomationResourceBundlesEventQueue.run(AutomationResourceBundlesEventQueue.java:121) [bundleFile:?]

    at java.lang.Thread.run(Thread.java:834) [?:?]

Caused by: java.lang.ClassCastException: class site$py cannot be cast to class org.python.core.PyRunnable (site$py is in unnamed module of loader org.python.core.BytecodeLoader$Loader @6761d6c6; org.python.core.PyRunnable is in unnamed module of loader 'app')

    at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java:253) ~[bundleFile:?]

    ... 86 more

2020-10-04 00:58:10.198 [ERROR] [ory.jython.JythonScriptEngineFactory] - Error getting Jython engine

org.python.core.PyException: java.lang.ClassCastException: java.lang.ClassCastException: class site$py cannot be cast to class org.python.core.PyRunnable (site$py is in unnamed module of loader org.python.core.BytecodeLoader$Loader @47dd8db0; org.python.core.PyRunnable is in unnamed module of loader 'app')

    at org.python.core.Py.JavaError(Py.java:547) ~[bundleFile:?]

    at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java:256) ~[bundleFile:?]

    at org.python.core.util.importer.getModuleCode(importer.java:240) ~[bundleFile:?]

    at org.python.core.util.importer.importer_load_module(importer.java:106) ~[bundleFile:?]

    at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:175) ~[bundleFile:?]

    at org.python.modules.zipimport.zipimporter$zipimporter_load_module_exposer.__call__(Unknown Source) ~[bundleFile:?]

    at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:48) ~[bundleFile:?]

    at org.python.core.imp.loadFromLoader(imp.java:819) ~[bundleFile:?]

    at org.python.core.imp.find_module(imp.java:763) ~[bundleFile:?]

    at org.python.core.imp.import_next(imp.java:1158) ~[bundleFile:?]

    at org.python.core.imp.import_first(imp.java:1198) ~[bundleFile:?]

    at org.python.core.imp.load(imp.java:1016) ~[bundleFile:?]

    at org.python.core.Py.importSiteIfSelected(Py.java:1842) ~[bundleFile:?]

    at org.python.util.PythonInterpreter.<init>(PythonInterpreter.java:111) ~[bundleFile:?]

    at org.python.util.PythonInterpreter.threadLocalStateInterpreter(PythonInterpreter.java:80) ~[bundleFile:?]

    at org.python.jsr223.PyScriptEngine.<init>(PyScriptEngine.java:27) ~[bundleFile:?]

    at org.python.jsr223.PyScriptEngineFactory.getScriptEngine(PyScriptEngineFactory.java:85) ~[bundleFile:?]

    at org.openhab.automation.scriptenginefactory.jython.JythonScriptEngineFactory.createScriptEngine(JythonScriptEngineFactory.java:94) [bundleFile:?]

    at org.openhab.core.automation.module.script.internal.provider.ScriptModuleTypeProvider.setScriptEngineFactory(ScriptModuleTypeProvider.java:146) [bundleFile:?]

    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]

    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]

    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]

    at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]

    at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) [bundleFile:?]

    at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) [bundleFile:?]

    at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664) [bundleFile:?]

    at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510) [bundleFile:?]

    at org.apache.felix.scr.impl.inject.methods.BindMethod.invoke(BindMethod.java:42) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1813) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.DependencyManager.invokeBindMethod(DependencyManager.java:1788) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeBindMethod(SingleComponentManager.java:435) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:325) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.addedService(DependencyManager.java:294) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1216) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1137) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:944) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:880) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1168) [bundleFile:?]

    at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125) [bundleFile:?]

    at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:920) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469) [org.eclipse.osgi-3.12.100.jar:?]

    at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:906) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:892) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:959) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:732) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:666) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:432) [bundleFile:?]

    at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:665) [bundleFile:?]

    at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:338) [bundleFile:?]

    at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:382) [bundleFile:?]

    at org.apache.felix.scr.impl.Activator.access$200(Activator.java:49) [bundleFile:?]

    at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:264) [bundleFile:?]

    at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) [bundleFile:?]

    at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) [bundleFile:?]

    at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) [bundleFile:?]

    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482) [osgi.core-6.0.0.jar:?]

    at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415) [osgi.core-6.0.0.jar:?]

    at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232) [osgi.core-6.0.0.jar:?]

    at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444) [osgi.core-6.0.0.jar:?]

    at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:168) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.container.Module.publishEvent(Module.java:476) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.container.Module.start(Module.java:467) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:468) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.container.ModuleContainer.start(ModuleContainer.java:750) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.container.ModuleContainer.applyDelta(ModuleContainer.java:741) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.container.ModuleContainer.resolveAndApply(ModuleContainer.java:511) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:457) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.container.ModuleContainer.resolve(ModuleContainer.java:447) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.framework.EquinoxBundle.resolve(EquinoxBundle.java:959) [org.eclipse.osgi-3.12.100.jar:?]

    at org.eclipse.osgi.internal.framework.EquinoxBundle.findEntries(EquinoxBundle.java:661) [org.eclipse.osgi-3.12.100.jar:?]

    at org.openhab.core.automation.internal.provider.AbstractResourceBundleProvider.processAutomationProvider(AbstractResourceBundleProvider.java:236) [bundleFile:?]

    at org.openhab.core.automation.internal.provider.AutomationResourceBundlesEventQueue.processBundleChanged(AutomationResourceBundlesEventQueue.java:219) [bundleFile:?]

    at org.openhab.core.automation.internal.provider.AutomationResourceBundlesEventQueue.run(AutomationResourceBundlesEventQueue.java:121) [bundleFile:?]

    at java.lang.Thread.run(Thread.java:834) [?:?]

Caused by: java.lang.ClassCastException: class site$py cannot be cast to class org.python.core.PyRunnable (site$py is in unnamed module of loader org.python.core.BytecodeLoader$Loader @47dd8db0; org.python.core.PyRunnable is in unnamed module of loader 'app')

    at org.python.core.BytecodeLoader.makeCode(BytecodeLoader.java:253) ~[bundleFile:?]

    ... 86 more

Finally, I’ve found that the last problems were due to a copy of jython library that I had in lib/endorsed and lib/boot that I put before your message saying to install as an addon and I forgot to remove.

Now it’s working and I will be able to test my addon, thank you very much for your support @5iver

Hey guys,

if i understand this thread right, it is currently not possible to use jython to process rules in OH3. This is based on the fact that the required addon from @5iver is still in PR state.

i would love to try the addon and report any issues i find, but i am not able to compile the addon on my own.

so my question is: Could someone compile the addon and offer it here for download?

Ok, i quit bringing jython to live in my OH3 installation. The jython scripting engine is initialized but then nothing.

So i will wait …

1 Like

Hi @lujop ,

do I understand your posting correct, that you got jython running with OH3.0? If so, would you share your homebrewed build of the addon jar with the rest of us?

There are issues to be worked out… please see my post above. I will post updated 2.5.x and 3.0.x versions of my add-ons, as well as some helper library updates, this weekend.

10 Likes

Beside all diskussions these are very good news for many of us.

Thanks a lot.

1 Like

I was not able to get done all that I wanted to this weekend… especially with the last of the nice weather! I will reserve some time for it this week.

5 Likes