Open wborn opened 6 years ago
Any change to reproduce this in a plain ESH Eclipse IDE launch configuration setup without openHAB and Karaf?
I haven't been able to reproduce it using a plain ESH Eclipse IDE. The root cause could be that some of the xtext bundles are uninstalled and again reinstalled during the initial startup. Could it be that it's trying to cast a class from one bundle instance to another bundle instance which results in this ClassCastException?
Perhaps. Can you try to remove Karaf's data directory on an update and check if the error still occurs or does not.
It's not an update but a new installation. Besides the default configuration there isn't much in the data directory:
userdata/
userdata/tmp/
userdata/tmp/README
userdata/etc/
userdata/etc/org.apache.karaf.command.acl.scope_bundle.cfg
userdata/etc/org.apache.karaf.command.acl.config.cfg
userdata/etc/distribution.info
userdata/etc/jre.properties
userdata/etc/org.apache.karaf.command.acl.bundle.cfg
userdata/etc/org.eclipse.smarthome.voice.cfg
userdata/etc/equinox-debug.properties
userdata/etc/org.apache.karaf.command.acl.system.cfg
userdata/etc/org.apache.karaf.command.acl.kar.cfg
userdata/etc/config.properties
userdata/etc/org.eclipse.smarthome.audio.cfg
userdata/etc/org.apache.karaf.features.repos.cfg
userdata/etc/profile.cfg
userdata/etc/org.apache.karaf.command.acl.shell.cfg
userdata/etc/all.policy
userdata/etc/org.apache.karaf.command.acl.feature.cfg
userdata/etc/org.apache.karaf.command.acl.jaas.cfg
userdata/etc/jmx.acl.org.apache.karaf.bundle.cfg
userdata/etc/system.properties
userdata/etc/keys.properties
userdata/etc/startup.properties
userdata/etc/jmx.acl.org.apache.karaf.config.cfg
I untar openhab-2.4.0-SNAPSHOT.tar.gz. Then modify addons.cfg
, start the runtime and then when bundles are uninstalled/installed these stack traces show.
Sure, it could be related to the installation of some addons that trigger a refresh of the model bundles... It sounds similar to https://github.com/eclipse/smarthome/issues/3157
FTR, I am seeing this pretty regularly now on the latest openHAB distro (and others do the same, see https://github.com/openhab/openhab-distro/issues/790). It is caused by restarting many bundles during initial startup, so my guess is that we are not yet clean wrt bundle vs. Guice lifecycle.
Whenever I start a new openHAB (2.4.0-SNAPSHOT) runtime for the first time with a customized
addons.cfg
several xtext related ClassCastExceptions are thrown. After restarting the runtime a second time the exceptions do not occur. I've been seeing these exceptions for several weeks now.I'm using the following customizations in
addons.cfg
:The stack traces suggest this may be an ESH related issue: