[SOLVED] No opencloud when upgrading from 2.4 to 2.5M4

Both are there and accessible by OH.

Sorry. No idea anymore.

I have the same problem. After update to 2.5 M the Cloud Connector does not work and the I/O tab with the settings does not exist.
A new installation works. If I restore my openhab-cli backup, the error is back.

Below my error message. I think it is identical.

2019-11-29 20:55:27.267 [ERROR] [org.apache.felix.scr                ] - bundle org.apache.felix.scr:2.1.16 (44)Error while loading components of bundle org.openhab.io.openhabcloud:2.5.0.M5 (254)

java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Long

	at org.apache.felix.cm.impl.ConfigurationImpl.configure(ConfigurationImpl.java:659) ~[?:?]

	at org.apache.felix.cm.impl.ConfigurationImpl.configureFromPersistence(ConfigurationImpl.java:619) ~[?:?]

	at org.apache.felix.cm.impl.ConfigurationImpl.<init>(ConfigurationImpl.java:194) ~[?:?]

	at org.apache.felix.cm.impl.ConfigurationManager.listConfigurations(ConfigurationManager.java:552) ~[?:?]

	at org.apache.felix.cm.impl.ConfigurationAdminImpl.listConfigurations(ConfigurationAdminImpl.java:190) ~[?:?]

	at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.findConfigurations(RegionConfigurationSupport.java:655) ~[bundleFile:?]

	at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.findSingletonConfiguration(RegionConfigurationSupport.java:554) ~[bundleFile:?]

	at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configureComponentHolder(RegionConfigurationSupport.java:199) ~[bundleFile:?]

	at org.apache.felix.scr.impl.BundleComponentActivator.setRegionConfigurationSupport(BundleComponentActivator.java:763) ~[bundleFile:?]

	at org.apache.felix.scr.impl.helper.ConfigAdminTracker$1.addingService(ConfigAdminTracker.java:69) ~[?:?]

	at org.apache.felix.scr.impl.helper.ConfigAdminTracker$1.addingService(ConfigAdminTracker.java:41) ~[?:?]

	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.trackInitial(AbstractTracked.java:183) ~[osgi.core-6.0.0.jar:?]

	at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:318) ~[osgi.core-6.0.0.jar:?]

	at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261) ~[osgi.core-6.0.0.jar:?]

	at org.apache.felix.scr.impl.helper.ConfigAdminTracker.<init>(ConfigAdminTracker.java:86) ~[bundleFile:?]

	at org.apache.felix.scr.impl.BundleComponentActivator.<init>(BundleComponentActivator.java:275) ~[bundleFile:?]

	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:380) [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:?] 

Thanks for sharing. I have not attempted a new install b/c my current 2.4 version is working without error. Have you downgraded with working results? If so I may need to file an issue on github regarding openhab-cli backup restore when upgrading.

Thanks for sharing. I have not attempted a new install b/c my current 2.4 version is working without error. Have you downgraded with working results? If so I may need to file an issue on github regarding openhab-cli backup restore when upgrading.

I made
a) a new installation followed by openhab-cli backup
b) and also upgraded my system from 2.4 to 2.5.
In both cases, the error occurs.
After a downgrade everything runs again.
So it does not seem to be due to openhab-cli backup.

@H102
@Thimboo

One question: what is inside

/var/lib/openhab2  or /opt/openhab2/userdata

/config/org/openhab/openhabcloud.config? 

Are the entries like this?

:org.apache.felix.configadmin.revision:=L"1"
baseURL="https://myopenhab.org/"
mode="remote"
service.pid="org.openhab.openhabcloud"

I have not made a recent attempt to upgrade, on 2.4 the entries are the same except the first line about revision. I have revision:=“2.0” not L"1".

Should I stop OH, change to L"1", restart and attempt to upgrade?

No, this number is only the version of the configuration file. Yours is the second version of config file.
After an update your config files should have the same entries as before, maybe the version number is one higher then…

EDIT: I’ve changed the config now and got L"2" NOT L"2.0" or NOT just “2.0”. I’ll try with 2.0 and see if I get the error…

1 Like

Don’t forget the " " around 2.0 just encase it makes a difference.
Screenshot at 2019-11-30 10-03-53

With L"2.0" I get a similar error!

Please try L"2".

Are you on a test machine with OH 2.4 and trying to upgrade or just changing the file on 2.5M4?

I’m on a test machine, and I made an update from 2.4.0 to 2.5.0.M4, but had no problems with openhabcloud (but I’m on Windows, not Linux). But on 2.5.0.M4 it is definitely L"2" in config file.

Make the change before updating or after and did you uninstall opencloud before updating?

One moment. I’m trying it again, at the moment… (hold the line…)

Sorry to ask all the picky questions but OH 2.4 is running and no errors or warning. My spare Pi is currently on loan or I would use it for testing.

@Celaeno1

I have the 4 entries in my openhabcloud.config.

:org.apache.felix.configadmin.revision:=“14.0”
baseURL=“https://myopenhab.org/
mode=“remote”
service.pid=“org.openhab.openhabcloud”

@Thimboo are you on Windows, Linux, Mac ???

@Celaeno1
Linux, openhabian, Raspberry Pi 3 Model B Plus Rev 1.3

@Thimboo Same here.:+1:

Have you ever edited any additional files such as /srv/openhab2-userdata/etc/org.ops4j.pax.logging.cfg if so please the files changed.

Just seems odd that only 2 people have run into this issue.:thinking:

Back on 2.4.0 (on Windows) I have the following openhabcloud.config:

baseURL="https://myopenhab.org/"
mode="notification"
service.pid="org.openhab.openhabcloud"

The line with :org.apache.felix.configadmin.revision:= is NOT there.
.

And after update to 2.5.0.M4:

:org.apache.felix.configadmin.revision:=L"1"
baseURL="https://myopenhab.org/"
mode="notification"
service.pid="org.openhab.openhabcloud"

When I change configuration (e.g. with PaperUI or openhabcloud.cfg) and save it, then:

:org.apache.felix.configadmin.revision:=L"2"
baseURL="https://myopenhab.org/"
mode="remote"
service.pid="org.openhab.openhabcloud"
1 Like