[OH3] java/beans/ThreadGroupContext$1 version issue

  • Platform information:
    • Java Runtime Environment: openjdk version “11.0.16.1” 2022-07-19 LT
    • openHAB version: openHAB 3.3.0
  • Issue of the topic: Rule not executed because of a java version problem

I checked my system this morning, since one of the rules did not kick in. What I found is the following:

2022-10-18 07:00:00.438 [ERROR] [e.automation.internal.RuleEngineImpl] - Failed to execute rule 'OfficeON': java/beans/ThreadGroupContext$1 (class file version 55.37632) was compiled with an invalid non-zero minor version

Anyone aware of this and knows what the issue might be?

I’ve seen nothing like this reported for OH for any reason.

If a restart doesn’t clear it I would clear the cache. If that doesn’t fix it, file an issue. There is nothing you have control over in your rule that can cause or fix this.

So, I tried to clear the cache using
openhab-cli clean-cache

but received an error, that the directory is not empty. Thus, deleted the remaining stuff manually.
Don’t think that this was a good idea. Since openhab did not start up properly.
So, reinstalling and going straight to the latest 3.4 milestone.

Now, no logs are written, and web is not working. I have the following log information:

Oct 18 21:16:37 zotac.fritz.box karaf[8839]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : RollingFileManager (/var/log/openhab/openhab.log) java.io.FileNotFoundException: /var/log/openhab/openhab.log (Pe>
Oct 18 21:16:37 zotac.fritz.box karaf[8839]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingFileAppender for element Roll>
Oct 18 21:16:37 zotac.fritz.box karaf[8839]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingFileAppender for element R>
Oct 18 21:16:37 zotac.fritz.box karaf[8839]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Cannot access RandomAccessFile java.io.FileNotFoundException: /var/log/openhab/events.log (Permission denied)
Oct 18 21:16:37 zotac.fritz.box karaf[8839]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Could not create plugin of type class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender for >
Oct 18 21:16:37 zotac.fritz.box karaf[8839]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to invoke factory method in class org.apache.logging.log4j.core.appender.RollingRandomAccessFileAppender f>
Oct 18 21:16:37 zotac.fritz.box karaf[8839]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Null object returned for RollingFile in Appenders.
Oct 18 21:16:37 zotac.fritz.box karaf[8839]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Null object returned for RollingRandomAccessFile in Appenders.
Oct 18 21:16:37 zotac.fritz.box karaf[8839]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to locate appender "LOGFILE" for logger config "root"
Oct 18 21:16:37 zotac.fritz.box karaf[8839]: org.ops4j.pax.logging.pax-logging-api [log4j2] ERROR : Unable to locate appender "EVENT" for logger config "openhab.event"

Karaf is able to tail the messages:

21:43:16.218 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Pumpe_Dach_Voltage' changed from 228.642 V to 228.228 V
21:43:31.244 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'TVAV_Wohnzimmer_Verbrauch' changed from 275.473 kWh to 275.475 kWh
21:43:31.248 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'TVAV_Wohnzimmer_Leistung' changed from 67.73 W to 67.94 W
21:43:31.251 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'TVAV_Wohnzimmer_Voltage' changed from 229.956 V to 230.01 V
21:43:31.267 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Desk_Office_Voltage' changed from 228.103 V to 228.081 V
21:43:45.169 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'currentDate' changed from 2022-10-18T21:42:45.172+0200 to 2022-10-18T21:43:45.174+0200
21:43:45.174 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'currentTime' changed from 2022-10-18T21:42:45.172+0200 to 2022-10-18T21:43:45.174+0200
21:43:45.436 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Pumpe_Dach_ResponseTime' changed from 11 to 17
21:43:45.474 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Pumpe_Dach_LastActive' changed from 2022-10-18T21:42:45.371+0200 to 2022-10-18T21:43:45.433+0200
21:44:01.244 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'TVAV_Schlafzimmer_Voltage' changed from 227.902 V to 227.349 V
21:44:31.231 [INFO ] [openhab.event.ItemStateChangedEvent  ] - Item 'Pumpe_Garten_Voltage' changed from 228.787 V to 229.047 V

Also, a remove, install and restoring a backup did not fix this issue.

Any idea how to fix that?

Did you stop OH before clearing the cache? I don’t know that openhab-cli does that autoamtically for you. The fact that the folder wasn’t empty hints that OH was still running.

The error is caused by an inability to open/create the log file. Doe /var/log/openhab exist? Does the openhab user have permissions on that folder?

I actually used the following sequence:

openhab-cli stop
openhab-cli clean-cache
openhab-cli start

all command ran as sudo.

Now, given your feedback, I did the following this morning:

service openhab stop
openhab-cli clean-cache
openhab-cli reset-ownership
service openhab start

Now, the logs are written ok, but the system does not start because of the following issue:

...
bundle org.openhab.core.audio:3.4.0.M3 (152)[org.openhab.core.audio.internal.AudioServlet(51)] : The activate method has thrown an exception
java.lang.ClassFormatError: Unknown constant tag 240 in class file sun/security/ssl/ServerHello$T13HelloRetryRequestProducer
...
 Failed installing 'openhab-binding-tr064, openhab-binding-hue, openhab-binding-bluetooth, openhab-binding-mail, openhab-binding-avmfritz, openhab-transformation-javascript, openhab-binding-network, openhab-persistence-influxdb, openhab-ui-habpanel, openhab-transformation-jsonpath, openhab-transformation-map, openhab-ui-basic, openhab-binding-ntp, openhab-binding-openweathermap, openhab-binding-http, openhab-binding-astro, openhab-misc-metrics, openhab-binding-systeminfo, openhab-transformation-scale': Error:
	Error downloading mvn:org.openhab.addons.bundles/org.openhab.transform.jsonpath/3.4.0.M3
150 │ Waiting │  80 │ 3.4.0.M3               │ openHAB Core :: Bundles :: Marketplace Add-on Services

Guess, I have to investigate this one now … :frowning:

Anyone aware that the server or source is down?

That is indeed usually caused by the jfrog repo being down.

In the mean time, you can download the .kar file from the Downloads page and place that into the addons folder. That will install the bindings from there rather than downloading them from the Internet. When the repo returns you can stop OH, remove that file, and clear the cache again and it will download them from the repo again.

Thanks for the reply. Silly question, where do I find the addons folder?
For curiosity, since I used the apt package manager to install.

But there must still be something awfully wrong, since my logs are flodded with error messages. First one is the following:

2022-10-19 16:09:01.246 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Time zone set to 'Europe/Berlin'.
2022-10-19 16:09:01.315 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Location set to '.....'
2022-10-19 16:09:01.318 [INFO ] [.core.internal.i18n.I18nProviderImpl] - Locale set to 'de_DE'.
2022-10-19 16:09:05.048 [ERROR] [hab.core.audio.internal.AudioServlet] - bundle org.openhab.core.audio:3.4.0.M3 (152)[org.openhab.core.audio.internal.AudioServlet(61)] : The activate method has thrown an exception
java.lang.ClassFormatError: Unknown constant tag 240 in class file sun/security/ssl/ServerHello$T13HelloRetryRequestProducer
...
2022-10-19 16:09:05.105 [WARN ] [.internal.webaudio.WebAudioAudioSink] - bundle org.openhab.core.audio:3.4.0.M3 (152)[org.openhab.core.audio.internal.webaudio.WebAudioAudioSink(64)] : Could not get service from ref {org.openhab.core.audio.AudioHTTPServer}={service.id=265, service.bundleid=152, service.scope=bundle, component.name=org.openhab.core.audio.internal.AudioServlet, component.id=61}
2022-10-19 16:09:05.107 [ERROR] [.internal.webaudio.WebAudioAudioSink] - bundle org.openhab.core.audio:3.4.0.M3 (152)[org.openhab.core.audio.internal.webaudio.WebAudioAudioSink(64)] : Error during instantiation of the implementation object: Unable to get service for reference $000
2022-10-19 16:09:05.110 [WARN ] [core.audio.internal.AudioManagerImpl] - bundle org.openhab.core.audio:3.4.0.M3 (152)[org.openhab.core.audio.internal.AudioManagerImpl(60)] : Could not get service from ref {org.openhab.core.audio.AudioSink}={service.id=266, service.bundleid=152, service.scope=bundle, component.name=org.openhab.core.audio.internal.webaudio.WebAudioAudioSink, component.id=64}
2022-10-19 16:09:05.112 [WARN ] [core.audio.internal.AudioManagerImpl] - bundle org.openhab.core.audio:3.4.0.M3 (152)[org.openhab.core.audio.internal.AudioManagerImpl(60)] : DependencyManager : invokeBindMethod : Service not available from service registry for ServiceReference {org.openhab.core.audio.AudioSink}={service.id=266, service.bundleid=152, service.scope=bundle, component.name=org.openhab.core.audio.internal.webaudio.WebAudioAudioSink, component.id=64} for reference AudioSink
2022-10-19 16:09:05.328 [ERROR] [p.auth.internal.AuthorizePageServlet] - bundle org.openhab.core.io.http.auth:3.4.0.M3 (171)[org.openhab.core.io.http.auth.internal.AuthorizePageServlet(143)] : Error during instantiation of the implementation object
...

You don’t mention what OS and how you installed openHAB. The answer depends on that. See the installation instructions for how you installed openHAB and there will be a section titled something like “File Locations” which tells you.

Since you’ve installed on Linux using apt, it’s /usr/share/openhab/addons.

Get the add-ons .kar file installed and restart OH. If problems like these persist I’m going to suggest that there is something wrong with your SD card. Either the card is wearing out or you had a power loss and the file system became corrupted. You should have never seen that original error. You should not be seeing these errors. Nothing you’ve done would be causing these errors and these errors really look like they are caused by corrupted files.

Apologizes, of course missed the point with the OS.
Operating system: Debian Linux 11
System: X86
Storage is a SSD, not SD card.
.
So, since I assume something in the installation is seriously wrong, I de-installed openhab, and re-installed openhab and the openhab-addons package.
Looks more like normal now … :slight_smile:

Two errors are still having my attention:

2022-10-19 16:40:52.493 [ERROR] [rg.ops4j.pax.web.utils.ClassPathUtil] - BundleWiring is null for: com.sun.jna_5.11.0 [39]
2022-10-19 16:41:24.304 [ERROR] [com.github.hypfvieh.DbusHelper      ] - Critical error while reading DBUS response (maybe no bluetoothd daemon running?)

The first still looks like it might be a corruption error, or you need to install some extra library or service or the like. The second error is your bluetooth daemon isn’t running or OH can’t connect to it.

Either one points to the potential that problems on this machine extend beyond just openHAB. Were it me, I’d rebuild on a new SD card and restore backups.

I rebooted the system again and checked. The ‘BundleWire’ is has disappeared, the bluetooth stiff needs some more investigation, but I don’t use it anyhow. I think the main issues are solved.
Thanks for the hints&tips!