openHAB 4.0 SNAPSHOT discussion

I agree. It is at least unexpected that the configuration is not “restored” and the backup is used again. I don’t think it has a high priority to fix it, but please open an issue for that.

I’m back again with some new weirdness.

The following code:

var item = items.getItem('TestSwitch');
item.postUpdate( ((item.state == "ON") ? "OFF" : "ON") );
setTimeout( () => {
  console.log('changedSince true: ' + items.getItem('TestSwitch').history.changedSince(time.toZDT('PT-1M'), 'rrd4j'));
  console.log('changedSince false: ' + items.getItem('TestSwitch').history.changedSince(time.toZDT('PT-30S'), 'rrd4j')); 
}, time.toZDT('PT50S').getMillisFromNow());

generates a Java Heap Exception.

rm│2023-02-01 14:47:09.646 [WARN ] [ore.internal.scheduler.SchedulerImpl] - Scheduled job 'org.openhab.automation.script.ui.scratchpad.timeout.1' failed and stopped       │
20│org.graalvm.polyglot.PolyglotException: Java heap space                                                                                                                 │la
rm│        at org.rrd4j.core.Archive.fetchData(Archive.java:303) ~[?:?]                                                                                                    │
20│        at org.rrd4j.core.RrdDb.fetchData(RrdDb.java:986) ~[?:?]                                                                                                        │la
rm│        at org.rrd4j.core.FetchRequest.fetchData(FetchRequest.java:163) ~[?:?]                                                                                          │
20│        at org.openhab.persistence.rrd4j.internal.RRD4jPersistenceService.query(RRD4jPersistenceService.java:330) ~[?:?]                                                │
20│        at org.openhab.core.persistence.extensions.PersistenceExtensions.getAllStatesBetween(PersistenceExtensions.java:1263) ~[?:?]                                    │
20│        at org.openhab.core.persistence.extensions.PersistenceExtensions.internalChanged(PersistenceExtensions.java:307) ~[?:?]                                         │
20│        at org.openhab.core.persistence.extensions.PersistenceExtensions.changedSince(PersistenceExtensions.java:286) ~[?:?]                                            │
00│        at org.openhab.core.persistence.extensions.PersistenceExtensions.changedSince(PersistenceExtensions.java:259) ~[?:?]                                            │36
20│        at java.lang.invoke.DirectMethodHandle$Holder.invokeStatic(DirectMethodHandle$Holder) ~[?:?]                                                                    │
20│        at java.lang.invoke.LambdaForm$MH/0x00000001015c8c00.invoke(LambdaForm$MH) ~[?:?]                                                                               │
20│        at java.lang.invoke.LambdaForm$MH/0x0000000100d59400.invokeExact_MT(LambdaForm$MH) ~[?:?]                                                                       │
20│        at <js>.changedSince(/openhab/conf/automation/js/node_modules/openhab/items/item-history.js:68) ~[?:?]                                                          │
20│        at <js>.:=>(<eval>:7) ~[?:?]                                                                                                                                    │

Changing persistence from rrd4j to mapdb works as expected (or at least doesn’t throw an error, but changedSince returns true in both cases which shouldn’t be the case but that’s a different issue.

@rlkoshak - can you try latest snapshot where this is already included?

I tested on snapshot #3296 and I still get the exception.

Given that that fix was merged a mere 18 hours ago, maybe it won’t be available until #3297? I’m on Docker so the snapshots are potentially delayed a bit since a new image can’t be created until after the distro build completes.

Any idea where to look to see the status of the snapshot builds?

Edit: Indeed it looks like the snapshot is delayed. I just saw mention of #3298 in a new issue Things not in alphabetical order on UI · Issue #1673 · openhab/openhab-webui · GitHub so I may have to wait a couple of days to test this.

Edit2: OK, managed to test on 3299 and can confirm that the exception went away. :partying_face:

thanks!

2 Likes

This one is a minor nit pick but has the potential to become really annoying for upgraders.

After an upgrade from 3.4 to 4.0, the javascript tranformation add-on remains listed in /var/lib/openhab/config/org/openhab/addons.config and I can see no way to remove it though the UI directly.

I tried to explore the REST API but I couldn’t figure out a way to get any information or remove it from there.

I looked in the karaf console but I can’t find a way to list that it’s configured to install there. Obviously it doesn’t show up under bundles because it cannot be installed.

The only way I can figure out to remove it from being attempted to install (and the resultant error) is to manually edit addons.config.

Is there a way we can automatically remove this add-ons during the upgrade?

I wish I had more details to report on this one but I don’t. Please let me know what might prove useful and I’ll gather it.

What I’m finding is an inconsistent restart behavior with OH.

ScriptEngine for language not found

2023-02-09 09:07:38.776 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - ScriptEngine for language 'application/javascript' could not be found for identifier: 241daa5c-789c-4e0d-a430-75c38fef80b2

About one in three restarts will generate a ton of these errors (I suspect one for each rule).

system runlevel triggered rules

Sometimes, these rules just never get triggered. I have them set to runlevel 40 but I’ve tried every run level available and see the same result. Occasionally (I can’t give a good measure for how often yet) they simply won’t trigger. Running them manually later works just fine and non-runlevel triggered rules run fine too.

I don’t have any runlevel rules where that is the only trigger for the rule, if that matters. There’s always at least one other trigger.

rules page fails to load
At least twice after a restart the rules page will fail to load. Scripts and Schedule loaded just fine. This one is really odd and may just be gremlins. I’ll report more when/if it happens again. It’s only happened to me twice so far. I’m mainly posting here in case others have see this.

Edit: I think I may have found the root cause of this one. I was attempting to avoid some “Multi threaded access” errors on a rule that calls another rule and sometimes it gets pounded. I’ve applied a gatekeeper to spread the commands out and as I’ve increased the timing I’m starting to see:

  │2023-02-09 09:22:29.408 [WARN ] [ab.core.internal.events.EventHandler] - Dispatching/filtering event for subscriber 'org.openhab.core.events.EventSubscriber' failed: Ta│
  │sk java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@2f538f6d[Not completed, task = java.util.concurrent.Executors$RunnableAdapter@5f063a90[Wrapped t│
  │ask = org.openhab.core.automation.internal.TriggerHandlerCallbackImpl$TriggerData@6d9588f8]] rejected from java.util.concurrent.ScheduledThreadPoolExecutor@796b02e2[Ter│
  │minated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]                                                                                      │
  │java.util.concurrent.RejectedExecutionException: Task java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@2f538f6d[Not completed, task = java.util.conc│
  │urrent.Executors$RunnableAdapter@5f063a90[Wrapped task = org.openhab.core.automation.internal.TriggerHandlerCallbackImpl$TriggerData@6d9588f8]] rejected from java.util.│
  │concurrent.ScheduledThreadPoolExecutor@796b02e2[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 1]                                   │
  │        at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2065) ~[?:?]                                                   │
  │        at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:833) ~[?:?]                                                                           │
  │        at java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:340) ~[?:?]                                                 │
00│        at java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:562) ~[?:?]                                                       │
20│        at java.util.concurrent.ScheduledThreadPoolExecutor.submit(ScheduledThreadPoolExecutor.java:715) ~[?:?]                                                         │
20│        at java.util.concurrent.Executors$DelegatedExecutorService.submit(Executors.java:748) ~[?:?]                                                                    │
20│        at org.openhab.core.automation.internal.TriggerHandlerCallbackImpl.triggered(TriggerHandlerCallbackImpl.java:57) ~[?:?]                                         │
20│        at org.openhab.core.automation.internal.module.handler.GroupStateTriggerHandler.receive(GroupStateTriggerHandler.java:144) ~[?:?]                               │
20│        at org.openhab.core.internal.events.EventHandler.lambda$0(EventHandler.java:151) ~[?:?]                                                                         │
20│        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]                                                                                │
20│        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]                                                                                               │
20│        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]                                                                        │
20│        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]                                                                        │
20│        at java.lang.Thread.run(Thread.java:833) [?:?]

Now this would make sense if gatekeeper created a separate timer for each event awaiting it’s time to run but it doesn’t. It has one looping timer that works off a queue.

More investigation is required but this is a problem I’m sure I’m causing through abusing OH in ways it can’t handle.

**No config description"
Every reboot I see this warning:

2023-02-09 08:56:09.678 [WARN ] [core.thing.internal.ThingManagerImpl] - No config description for 'channel-type:http:channel-config-switch' found when normalizing configuration for 'http:url:adguard:protection_status'. This is probably a bug.

This is related to the HTTP binding (see Simple AdGuard Home Integration using the HTTP Binding).

I’m not sure what to do about it but the Things still appears to work.

I don’t think this is directly related to the HTTP binding, but could be related to bindings having channel configuration. I’m seeing the same for a new binding I’m developing, but not consistently. I think it may get fixed by:

1 Like

Hi,

I’m finding a few bugs and wondering if anyone knows anything about them before I submit issues on gitub.

1. time.Duration

      const timerDuration = items.getItem('BackHall_Ceiling_Light_MotionTimer').state // A Number Item

      console.info(time.Duration.ofSeconds(1))
      console.info(time.Duration.ofMinutes(1))

      console.info(time.Duration.ofSeconds(timerDuration))

give me PT1S, PT1M, and PT1S respectively.

But

console.info(time.Duration.ofMinutes(timerDuration))

throws an error:

ArithmeticException: Multiplication overflows: 1 * 60: ArithmeticException: Multiplication overflows: 1 * 60

and ofHours says something similar:

ArithmeticException: Multiplication overflows: 1 * 3600: ArithmeticException: Multiplication overflows: 1 * 3600

only ‘ofSeconds’ seems to work.

2. things.getThings() .setLabel
When I change a thing’s label with JS Scripting, it works, but doesn’t stick after a reboot.

things.getThing('test:thing:45636344247:62464367').setLabel('A New Label')

3. items.replaceItem
With JS Scripting, if I set the giBaseType to ‘String’, it doesn’t apply this to the new item. Other base types and aggregation functions work fine.

items.replaceItem({
        type: 'Group',
        name: 'Item_Name',
        label: 'Item Label',
        groups: ['group1', 'group2'],
        tags: ['Setpoint'],
        category: 'lightbulb',
        giBaseType: 'Switch'
        //  groupFunction: aggregationFunction
    });

4. Applying metadata
When I apply metadata (any kind) using JS scripting, it works, but the UI displays ‘Not Set’

let itemToEdit = items.getItem('Test_Item);
itemToEdit.replaceMetadata('stateDescription', '', { options: 'ON=MOTION,OFF=NO MOTION'} );

5. material icons
I can apply a material icon and it works in most places.
image

but it shows as blank in a default list widget

******** I Posted this in the wrong place and am moving it here. I already got a reply which I’ll post here: *******

Please post to openHAB 4.0 SNAPSHOT discussion where the 4.0 SNAPSHOT problems are discussed.

Note that timerDuration in this case is a String. The .state is always a String. You might need to parse it to a Number first.

But in any case, this is 100% implemented in the joda-js library so any issue would need to be filed and corrected there. It’s not an OH problem.

How is the Thing defined? In a text file or through the UI?

What use case would have you changing the label of a Thing?

Note, this code is not correct (missing a closing ’ on the first line).

Which version of openhab-js are you using? The metadata was completely reworked in the latest release.

Show the full config from the “Code” tab.

You are testing the 4.0 SNAPSHOT. Tons of breaking changes are being introduced with almost every build. Welcome to the bleeding edge.

Yes, this worked for me. Thank you

const timerDuration = items.getItem('BackHall_Ceiling_Light_MotionTimer').state
console.info(time.Duration.ofHours(+timerDuration))

with the JS Scripting command:

things.getThing('test:thing:45636344247:62464367').setLabel('A New Label')

I am using it to rename things to remove some bits deCONZ adds to the thing names, and to rename them be able to make items from them based on the name. I can then recreate all my lights, motion sensors, TRVs, and everything else generic in my system in one go. It’s working great so far. I can rebuild my entire system and make small changes to names, labels, icons etc to hundreds of items at once.

That is a typo, the bug is still there. I am using the latest openhab-js, installed with npm. I specifically needed the metadata updates to make this project happen.

There is no code. This is the default widget that gets displayed in the Locations tab of the main page.

No, that doesn’t create a Thing. And it doesn’t make much sense to create a thing in a rule anyway.

If this the thing “test:thing:45636344247:62464367” doesn’t exist before that call, it’s not surprising if it disappears after a restart. At a minimum it won’t be a complete Thing and it definitely isn’t connected to any binding.

If you want a Thing to test stuff with, see the Magic Binding in the marketplace which lets you define Things that can be used to test with. But again, you wouldn’t be creating the Thing from a Rule this way. That’s putting the cart before the horse.

If it’s for existing Things, that’s a question for someone who maintains core as to whether changes made that way are even expected to be saved or not.

But going forward you have to option to change the name and the UID of Things at the time you accept them from the inbox. You can change the name later through MainUI or the REST API also.

As far as I know, the default widgets use the oh icons set on the Item’s “category”. If you want to use material, f7, or iconify icons it requires a custom widget configuration. How are you telling it to use a material icon?

1 Like

I didn’t say it made a new thing. I said it changes the label of a thing. It works. I can see it happening. It just doesn’t hold after reboot.

I just typed material:iconname into the category field of the item in the UI

And my question was

How is the Thing defined?

and your answer is

with the JS Scripting command:

which very clearly does not create/define a Thing.

Is this thing defined in a .things file? Manually through the UI? Automatically discovered and accepted from the Inbox?

I’m not sure that’s fully supported. It’s worth filing an issue on that one, but I’ve not seen anything posted to indicate that that should work. But the fact that it let you do it at all shows that maybe it could be made to work.

Sorry crossed wires. The Thing was added from the inbox in the UI.

Hi all, any quick solution to get my PH calculation back to work ? Nashorn is installed, but didn’t help.

PH.rules

rule "PHSensor1"
when
    Item ads1115_voltage0 changed
then
	val ads_ph_1 = ads1115_voltage0.state.toString
	val ads_ph_result1 = transform("JS", "PH1.js", ads_ph_1)
	PHSensor1.postUpdate(ads_ph_result1)
end

PH1.js

(function(value) {
    var PH_1= parseInt(value);
	var voltagePH7_1 = 15372
	var voltagePH4_1 = 4845
	var PH7_1 = 7
	var PH4_1 = 4
	PH_step_1 = ((voltagePH7_1) - (voltagePH4_1)) / (PH7_1 - PH4_1)
    var result_1 =  PH7_1 - ((voltagePH7_1 - PH_1) / PH_step_1)
	var result1_1 = parseFloat(result_1).toFixed(2);
    return result1_1;
})(input)

See above, there is no more JS transform. You must use the SCRIPT transform.

1 Like

I just upgraded to the latest snapshot (it’s reporting #3304).

No logs! :scream:

After some investigation I discovered that org.ops4j.pax.logging.cfg was empty. I can’t imagine what could have caused that to occur. Nothing appears to have changed on these files and related files for quite some time. I’m reporting here in case it was not a gremlin in my machine and something that is happening to more people.

Note, the contents of that file should be

org.ops4j.pax.logging.log4j2.config.file=${karaf.etc}/log4j2.xml

Also, as an update, the Zigbee problem should be fixed in the next SNAPSHOT. The fix was merged 15 hours ago but is not a part of snapshot #3304 yet.

Seems to be a problem that occurs from time to time, reason unknown: [SOLVED] OH3 logging not possible, openhab.log last entries some days ago

1 Like

If it’s from a .things file, it is not expected to be persisted at all. If it’s a managed thing (UI/API/JSON), it will be persisted but only if you call update with the thing on the ManagedThingProvider, which I’m guessing is not being done for you (for now?) by the JS Scripting helper library. The upcoming major release of the Ruby scripting helper library has some support for ensuring changes (like to labels) to managed items are persisted, but not yet for things (document GenericItem#label= and GenericItem#category= by ccutrer · Pull Request #174 · ccutrer/openhab-jrubyscripting · GitHub for the relevant PR if anyone is interested).

1 Like

Rich, zigbee bundle build died in Jenkins, kinda weird, it failed with no failures.

Upgraded to #3313 and all rules are broken. There appears to be up to three separate problems.

Problem 1

The first seems to be a problem with the addon.xml file for the Zigbee binding.

20│--------------------------------------------- file got truncated /srv/openhab/userdata/logs/openhab.log 2023/02/14 07:56:04---------------------------------------------│
20│2023-02-14 07:56:11.707 [INFO ] [org.openhab.core.Activator          ] - Starting openHAB 4.0.0 (build Build #3313)                                                     │
20│2023-02-14 07:56:12.501 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'America/Denver'.                                                             │
20│2023-02-14 07:56:12.516 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to 'X,Y'.                                      │
20│2023-02-14 07:56:12.517 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'en_US'.                                                                         │
20│2023-02-14 07:56:12.518 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Measurement system set to 'US'.                                                                │
20│2023-02-14 07:56:19.406 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'test.items'                                                                     │
20│2023-02-14 07:56:20.031 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'rrd4j.persist'                                                                  │
20│2023-02-14 07:56:20.098 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'mapdb.persist'                                                                  │
20│2023-02-14 07:56:28.775 [INFO ] [.core.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007                                    │
20│2023-02-14 07:56:34.019 [WARN ] [ty.util.ssl.SslContextFactory.config] - Trusting all certificates configured for Client@581281f4[provider=null,keyStore=null,trustStore│
20│=null]                                                                                                                                                                  │
20│2023-02-14 07:56:34.020 [WARN ] [ty.util.ssl.SslContextFactory.config] - No Client EndPointIdentificationAlgorithm configured for Client@581281f4[provider=null,keyStore│is.g│=null,trustStore=null]                                                                                                                                                  │
00│2023-02-14 07:56:34.036 [WARN ] [core.thing.internal.ThingManagerImpl] - No config description for 'channel-type:http:channel-config-switch' found when normalizing conf│5920│iguration for 'http:url:adguard:protection_status'. This is probably a bug.                                                                                             │
20│2023-02-14 07:56:34.100 [INFO ] [nding.http.internal.HttpThingHandler] - Using the insecure client for thing 'http:url:adguard'.                                        │
20│2023-02-14 07:56:34.456 [INFO ] [.network.internal.utils.NetworkUtils] - CIDR prefix is smaller than /24 on interface with address 172.17.0.1/16, truncating to /24, som│
20│e addresses might be lost                                                                                                                                               │
20│2023-02-14 07:56:36.764 [INFO ] [nternal.manager.ShellyManagerServlet] - Shelly Manager started at http(s)://10.10.1.112:8080/shelly/manager                            │
20│2023-02-14 07:56:37.017 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to 'argus.koshak.lan' with clientid openhab                    │
20│2023-02-14 07:56:37.240 [WARN ] [ig.xml.osgi.XmlDocumentBundleTracker] - The XML document '/OH-INF/addon/addon.xml' in module 'org.openhab.binding.zigbee' could not be │
20│parsed:                                                                                                                                                                 │
20│---- Debugging information ----                                                                                                                                         │
20│cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException                                                                                       │
20│cause-message       : author                                                                                                                                            │
20│class               : java.util.ArrayList                                                                                                                               │
20│required-type       : java.util.ArrayList                                                                                                                               │
20│converter-type      : com.thoughtworks.xstream.converters.collections.CollectionConverter                                                                               │
20│path                : /addon/author                                                                                                                                     │
20│line number         : 10                                                                                                                                                │
20│class[1]            : org.openhab.core.addon.xml.internal.AddonInfoXmlResult                                                                                            │
20│required-type[1]    : org.openhab.core.addon.xml.internal.AddonInfoXmlResult                                                                                            │
20│converter-type[1]   : org.openhab.core.addon.xml.internal.AddonInfoConverter                                                                                            │
20│version             : 1.4.19                                                                                                                                            │
20│-------------------------------                                                                                                                                         │
20│com.thoughtworks.xstream.converters.ConversionException:                                                                                                                │
20│---- Debugging information ----                                                                                                                                         │is.g│cause-exception     : com.thoughtworks.xstream.mapper.CannotResolveClassException                                                                                       │
20│cause-message       : author                                                                                                                                            │
20│class               : java.util.ArrayList                                                                                                                               │
20│required-type       : java.util.ArrayList                                                                                                                               │
20│converter-type      : com.thoughtworks.xstream.converters.collections.CollectionConverter                                                                               │is.g│path                : /addon/author                                                                                                                                     │
20│line number         : 10                                                                                                                                                │
20│class[1]            : org.openhab.core.addon.xml.internal.AddonInfoXmlResult                                                                                            │
20│required-type[1]    : org.openhab.core.addon.xml.internal.AddonInfoXmlResult                                                                                            │
20│converter-type[1]   : org.openhab.core.addon.xml.internal.AddonInfoConverter                                                                                            │
20│version             : 1.4.19                                                                                                                                            │
20│-------------------------------                                                                                                                                         │
00│        at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:81) ~[bundleFile:1.4.19]                                                        │1020│        at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72) ~[bundleFile:1.4.19]                              │
20│        at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:68) ~[bundleFile:1.4.19]                                                 │
20│        at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:52) ~[bundleFile:1.4.19]                                                 │
20│        at org.openhab.core.addon.xml.internal.AddonInfoConverter.unmarshal(AddonInfoConverter.java:77) ~[?:?]                                                          │
20│        at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:74) ~[bundleFile:1.4.19]                                                        │
20│        at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72) ~[bundleFile:1.4.19]                              │
20│        at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:68) ~[bundleFile:1.4.19]                                                 │
20│        at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:52) ~[bundleFile:1.4.19]                                                 │
20│        at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:136) ~[bundleFile:1.4.19]                                                         │
20│        at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32) ~[bundleFile:1.4.19]                        │
20│        at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1421) ~[bundleFile:1.4.19]                                                                           │
20│        at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1399) ~[bundleFile:1.4.19]                                                                           │
20│        at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1350) ~[bundleFile:1.4.19]                                                                             │
20│        at com.thoughtworks.xstream.XStream.fromXML(XStream.java:1304) ~[bundleFile:1.4.19]                                                                             │
20│        at org.openhab.core.config.xml.util.XmlDocumentReader.readFromXML(XmlDocumentReader.java:105) ~[bundleFile:?]                                                   │
20│        at org.openhab.core.config.xml.osgi.XmlDocumentBundleTracker.parseDocuments(XmlDocumentBundleTracker.java:396) [bundleFile:?]                                   │
20│        at org.openhab.core.config.xml.osgi.XmlDocumentBundleTracker.processBundle(XmlDocumentBundleTracker.java:382) [bundleFile:?]                                    │
20│        at org.openhab.core.config.xml.osgi.XmlDocumentBundleTracker$2.run(XmlDocumentBundleTracker.java:347) [bundleFile:?]                                            │  
.g│        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]                                                                                │
20│        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]                                                                                               │
20│        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]                                         │
20│        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]                                                                        │
20│        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]                                                                        │is.g│        at java.lang.Thread.run(Thread.java:833) [?:?]                                                                                                                  │
20│Caused by: com.thoughtworks.xstream.mapper.CannotResolveClassException: author                                                                                          │
20│        at com.thoughtworks.xstream.mapper.DefaultMapper.realClass(DefaultMapper.java:81) ~[bundleFile:1.4.19]                                                          │
20│        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125) ~[bundleFile:1.4.19]                                                         │
20│        at com.thoughtworks.xstream.mapper.DynamicProxyMapper.realClass(DynamicProxyMapper.java:55) ~[bundleFile:1.4.19]                                                │
20│        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125) ~[bundleFile:1.4.19]                                                         │
20│        at com.thoughtworks.xstream.mapper.PackageAliasingMapper.realClass(PackageAliasingMapper.java:88) ~[bundleFile:1.4.19]                                          │
20│        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125) ~[bundleFile:1.4.19]                                                         │
20│        at com.thoughtworks.xstream.mapper.ClassAliasingMapper.realClass(ClassAliasingMapper.java:79) ~[bundleFile:1.4.19]                                              │
20│        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125) ~[bundleFile:1.4.19]                                                         │is.g│        at com.thoughtworks.xstream.mapper.ArrayMapper.realClass(ArrayMapper.java:74) ~[bundleFile:1.4.19]                                                              │
20│        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125) ~[bundleFile:1.4.19]                                                         │
00│        at com.thoughtworks.xstream.mapper.SecurityMapper.realClass(SecurityMapper.java:71) ~[bundleFile:1.4.19]                                                        │3320│        at com.thoughtworks.xstream.mapper.MapperWrapper.realClass(MapperWrapper.java:125) ~[bundleFile:1.4.19]                                                         │
20│        at com.thoughtworks.xstream.mapper.CachingMapper.realClass(CachingMapper.java:47) ~[bundleFile:1.4.19]                                                          │
20│        at com.thoughtworks.xstream.core.util.HierarchicalStreams.readClassType(HierarchicalStreams.java:29) ~[bundleFile:1.4.19]                                       │
20│        at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readBareItem(AbstractCollectionConverter.java:131) ~[bundleFile:1.4.19]          │
20│        at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:117) ~[bundleFile:1.4.19]              │
20│        at com.thoughtworks.xstream.converters.collections.CollectionConverter.addCurrentElementToCollection(CollectionConverter.java:99) ~[bundleFile:1.4.19]          │
20│        at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:92) ~[bundleFile:1.4.19]                     │
20│        at com.thoughtworks.xstream.converters.collections.CollectionConverter.populateCollection(CollectionConverter.java:86) ~[bundleFile:1.4.19]                     │
20│        at com.thoughtworks.xstream.converters.collections.CollectionConverter.unmarshal(CollectionConverter.java:81) ~[bundleFile:1.4.19]                              │
20│        at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:74) ~[bundleFile:1.4.19]                                                        │
20│        ... 24 more                                                                                                                                                     │

The Zwave binding has a similar error.

Problem 2

The second problem is related to creating the script engine.

20│2023-02-14 07:56:38.495 [INFO ] [ort.loader.AbstractScriptFileWatcher] - (Re-)Loading script '/openhab/conf/automation/js/node_modules/openhab/@globals-webpack.config.j│
20│s'                                                                                                                                                                      │
20│2023-02-14 07:56:39.006 [INFO ] [io.openhabcloud.internal.CloudClient] - Connected to the openHAB Cloud service (UUID = d0...e1, base URL = http://localhost:8080)      │is.g│2023-02-14 07:56:43.934 [ERROR] [ipt.internal.ScriptEngineManagerImpl] - Error while creating ScriptEngine                                                              │
20│org.graalvm.polyglot.PolyglotException: Cannot invoke "java.nio.file.Path.resolve(java.nio.file.Path)" because the return value of "java.nio.file.Path.getRoot()" is nul│
20│l                                                                                                                                                                       │
20│        at org.openhab.automation.jsscripting.internal.OpenhabGraalJSScriptEngine.isRootNodePath(OpenhabGraalJSScriptEngine.java:312) ~[?:?]                            │
20│        at org.openhab.automation.jsscripting.internal.OpenhabGraalJSScriptEngine$1.checkAccess(OpenhabGraalJSScriptEngine.java:190) ~[?:?]                             │is.g│        at com.oracle.truffle.api.TruffleFile.checkAccess(TruffleFile.java:2125) ~[?:?]                                                                                 │
20│        at com.oracle.truffle.api.TruffleFile.exists(TruffleFile.java:288) ~[?:?]                                                                                       │
20│        at com.oracle.truffle.js.runtime.JSRealm.addCommonJSGlobals(JSRealm.java:1617) ~[?:?]                                                                           │
20│        at com.oracle.truffle.js.runtime.JSRealm.addOptionalGlobals(JSRealm.java:1692) ~[?:?]                                                                           │
20│        at com.oracle.truffle.js.runtime.JSRealm.initialize(JSRealm.java:2193) ~[?:?]                                                                                   │
20│        at com.oracle.truffle.js.lang.JavaScriptLanguage.initializeContext(JavaScriptLanguage.java:362) ~[?:?]                                                          │is.g│        at com.oracle.truffle.js.lang.JavaScriptLanguage.initializeContext(JavaScriptLanguage.java:114) ~[?:?]                                                          │
20│        at com.oracle.truffle.api.TruffleLanguage$Env.postInit(TruffleLanguage.java:3317) ~[?:?]                                                                        │
00│        at com.oracle.truffle.api.LanguageAccessor$LanguageImpl.postInitEnv(LanguageAccessor.java:289) ~[?:?]                                                           │0920│        at com.oracle.truffle.polyglot.PolyglotLanguageContext.ensureInitialized(PolyglotLanguageContext.java:689) ~[?:?]                                               │
20│        at com.oracle.truffle.polyglot.PolyglotContextImpl.eval(PolyglotContextImpl.java:1294) ~[?:?]                                                                   │
20│        at com.oracle.truffle.polyglot.PolyglotContextDispatch.eval(PolyglotContextDispatch.java:63) ~[?:?]                                                             │
20│        at org.graalvm.polyglot.Context.eval(Context.java:399) ~[?:?]                                                                                                   │
20│        at com.oracle.truffle.js.scriptengine.GraalJSScriptEngine.evalInternal(GraalJSScriptEngine.java:376) ~[?:?]                                                     │
20│        at com.oracle.truffle.js.scriptengine.GraalJSBindings.initGlobal(GraalJSBindings.java:96) ~[?:?]                                                                │
20│        at com.oracle.truffle.js.scriptengine.GraalJSBindings.initContext(GraalJSBindings.java:92) ~[?:?]                                                               │
20│        at com.oracle.truffle.js.scriptengine.GraalJSBindings.requireContext(GraalJSBindings.java:86) ~[?:?]                                                            │
20│        at com.oracle.truffle.js.scriptengine.GraalJSBindings.put(GraalJSBindings.java:129) ~[?:?]                                                                      │
20│        at javax.script.SimpleScriptContext.setAttribute(SimpleScriptContext.java:246) ~[java.scripting:?]                                                              │
20│        at org.openhab.core.automation.module.script.internal.ScriptEngineManagerImpl.addAttributeToScriptContext(ScriptEngineManagerImpl.java:286) ~[?:?]              │
20│        at org.openhab.core.automation.module.script.internal.ScriptEngineManagerImpl.createScriptEngine(ScriptEngineManagerImpl.java:156) ~[?:?]                       │
20│        at org.openhab.core.automation.module.script.rulesupport.loader.AbstractScriptFileWatcher.createAndLoad(AbstractScriptFileWatcher.java:328) ~[?:?]              │9.78│        at org.openhab.core.automation.module.script.rulesupport.loader.AbstractScriptFileWatcher.lambda$15(AbstractScriptFileWatcher.java:306) ~[?:?]                  │
20│        at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) [?:?]                                                                       │
20│        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) [?:?]                                                                                │
20│        at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]                                                                                               │
20│        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) [?:?]                                         │
20│        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) [?:?]                                                                        │
20│        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) [?:?]                                                                        │
20│        at java.lang.Thread.run(Thread.java:833) [?:?]                                                                                                                  │is

This error repeats for every file in $OH_CONF/automation/js

Problem 3 (may be another symptom of Problem 2)

Several of my rules are throwing this error:

20│2023-02-14 07:56:43.958 [ERROR] [e.automation.internal.RuleEngineImpl] - Failed to execute rule 'debounce4': Cannot invoke "java.util.Map.put(Object, Object)" because "│
.g│this.global" is null                                                                                                                                                    │

It seems reasonable that this error is caused by problem 2 failing to load and/or initialize something (cache perhaps?).