Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSR223/Groovy “unable to resolve class org.openhab.binding.mqtt.internal.action.MQTTActions” with 4.3.0.M2 #4411

Open
dilyanpalauzov opened this issue Oct 8, 2024 · 0 comments
Labels
bug An unexpected problem or unintended behavior of the Core

Comments

@dilyanpalauzov
Copy link
Contributor

With OH 4.2.2 this automation/jsr223/z.groovy file

var org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger("org.openhab.core.model.script.rele1")
var mqtt_broker = actions.get("mqtt", "mqtt:broker:b1")

logger.info('A')
logger.info(mqtt_broker.toString())

does work and prints:

2024-10-08 15:06:41.346 [INFO ] [ort.loader.AbstractScriptFileWatcher] - (Re-)Loading script '/etc/openhab/automation/jsr223/z.groovy'
2024-10-08 15:06:41.411 [INFO ] [org.openhab.core.model.script.rele1 ] - A
2024-10-08 15:06:41.421 [INFO ] [org.openhab.core.model.script.rele1 ] - org.openhab.binding.mqtt.internal.action.MQTTActions@12788b8

With OH 4.3.0.M2 it logs

2024-10-08 15:11:43.819 [INFO ] [ort.loader.AbstractScriptFileWatcher] - (Re-)Loading script '/etc/openhab/automation/jsr223/z.groovy'
2024-10-08 15:11:43.901 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error during evaluation of script '/etc/openhab/automation/jsr223/z.groovy': org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
/etc/openhab/automation/jsr223/z.groovy: -1: unable to resolve class org.openhab.binding.mqtt.internal.action.MQTTActions
@ line -1, column -1.
/etc/openhab/automation/jsr223/z.groovy: -1: unable to resolve class org.openhab.binding.network.internal.action.NetworkActions
@ line -1, column -1.
2 errors

2024-10-08 15:11:43.903 [WARN ] [ort.loader.AbstractScriptFileWatcher] - Script loading error, ignoring file '/etc/openhab/automation/jsr223/z.groovy'

I do not know, if this is problem in JSR223/Automation or with Groovy.

@dilyanpalauzov dilyanpalauzov added the bug An unexpected problem or unintended behavior of the Core label Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of the Core
Projects
None yet
Development

No branches or pull requests

1 participant