Astro binding - stopped working

Hi, I’m running OH2 snapshot #988 on Ubuntu 17.04.

I haven’t been able to get astro to work since the recent ESH change. I seem to have references to both openhab-binding-astro and esh-binding-astro.

If I check in the console, I get this:

openhab> feature:list|grep -i astro
esh-binding-astro                           | 0.9.0.SNAPSHOT   |          | Started     | openhab-addons-2.2.0-SNAPSHOT        |
openhab-binding-astro                       | 2.2.0.SNAPSHOT   | x        | Started     | openhab-addons-2.2.0-SNAPSHOT        | Astro Binding
openhab-binding-astro1                      | 1.11.0.SNAPSHOT  |          | Uninstalled | openhab-addons-legacy-2.2.0-SNAPSHOT | Astro Binding (1.x)
esh-binding-astro                           | 0.9.0.SNAPSHOT   |          | Started     | addons-2.2.0-SNAPSHOT                |
openhab-binding-astro                       | 2.2.0.SNAPSHOT   | x        | Started     | addons-2.2.0-SNAPSHOT                | Astro Binding
openhab> feature:repo-list |grep -i open
distro-2.2.0-SNAPSHOT                | mvn:org.openhab.distro/distro/2.2.0-SNAPSHOT/xml/features
openhab-addons-2.2.0-SNAPSHOT        | mvn:org.openhab.distro/openhab-addons/2.2.0-SNAPSHOT/xml/features
openhab-addons-legacy-2.2.0-SNAPSHOT | mvn:org.openhab.distro/openhab-addons-legacy/2.2.0-SNAPSHOT/xml/features
addons-2.2.0-SNAPSHOT                | mvn:org.openhab.distro/addons/2.2.0-SNAPSHOT/xml/features
openhab>

I’ve cleared out the tmp and cache folders, removed and reinstalled openhab, but I can’t seem to fix this. When I install the addon from HABmin (or PaperUI), I get initial values for items but they never update after that.

The AStro sun and moon things show in HABmin with a question mark, and a message “org/eclipse/smarthome/core/scheduler/CronHelper”

openhab.log shows this:

2017-07-24 10:03:44.888 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-daily-sun at midnight for thing astro:sun:local
2017-07-24 10:03:44.917 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:local
2017-07-24 10:03:44.919 [ERROR] [ore.internal.events.OSGiEventManager] - Dispatching/filtering event for subscriber 'org.eclipse.smarthome.core.events.EventSubscriber' failed: java.lang.NoClassDefFoundError: org/eclipse/sma$
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/eclipse/smarthome/core/scheduler/CronHelper
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_131]
        at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_131]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:194)[96:org.eclipse.smarthome.core:0.9.0.201707190720]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:83)[96:org.eclipse.smarthome.core:0.9.0.201707190720]
        at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:67)[96:org.eclipse.smarthome.core:0.9.0.201707190720]
        at org.eclipse.smarthome.core.internal.events.OSGiEventManager.dispatchESHEvent(OSGiEventManager.java:188)[96:org.eclipse.smarthome.core:0.9.0.201707190720]
        at org.eclipse.smarthome.core.internal.events.OSGiEventManager.handleEvent(OSGiEventManager.java:163)[96:org.eclipse.smarthome.core:0.9.0.201707190720]
        at org.eclipse.smarthome.core.internal.events.OSGiEventManager.handleEvent(OSGiEventManager.java:146)[96:org.eclipse.smarthome.core:0.9.0.201707190720]
        at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415)[6:org.apache.karaf.services.eventadmin:4.0.8]
        at org.apache.felix.eventadmin.impl.tasks.HandlerTask.run(HandlerTask.java:90)[6:org.apache.karaf.services.eventadmin:4.0.8]
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_131]
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_131]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_131]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_131]
        at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]
Caused by: java.lang.NoClassDefFoundError: org/eclipse/smarthome/core/scheduler/CronHelper
 

I’ve removed and re-added the binding after restarting OH (as suggested elsewhere).

I’m at a loss now…where else should I be looking?

I managed to work around this issue by using the 1.x binding, but it still doesn’t solve the problem - @Kai is there something wrong with having two esh-binding-astro and two openhab-binding-astro features, or is that normal?

openhab> feature:list|grep -i astro|sort
esh-binding-astro                           | 0.9.0.SNAPSHOT   |          | Uninstalled | addons-2.2.0-SNAPSHOT                |
esh-binding-astro                           | 0.9.0.SNAPSHOT   |          | Uninstalled | openhab-addons-2.2.0-SNAPSHOT        |
openhab-binding-astro                       | 2.2.0.SNAPSHOT   |          | Uninstalled | addons-2.2.0-SNAPSHOT                | Astro Binding
openhab-binding-astro                       | 2.2.0.SNAPSHOT   |          | Uninstalled | openhab-addons-2.2.0-SNAPSHOT        | Astro Binding
openhab-binding-astro1                      | 1.11.0.SNAPSHOT  | x        | Started     | openhab-addons-legacy-2.2.0-SNAPSHOT | Astro Binding (1.x)

I’ve upgraded to snapshot build #989 but the issue is still there.

Not very helpful, I know. But I’m having exactly the same issue, which is annoying as my rules no longer know if it’s night or day anymore and trigger incorrectly. If it help, I’m also running on Ubuntu 17.04 x64 using apt to update using the unstable repo.

See postings here:

https://community.openhab.org/t/astro-binding-problem-events-do-not-trigger-multiple-triggers-solved/30320
https://community.openhab.org/t/astro-binding-event-triggered-start-bt-no-light-switch-on/30401

Not sure if anybody is reading these postings who can actually fix the problem. It has been addressed in several threads.

Same or similar problem here, my Astro binding broke after upgrading from 2.0.0 to 2.1.0, and it is not working in snapshot 2.2.0 either:

2017-08-12 23:42:58.801 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-daily-sun at midnight for thing astro:sun:local
2017-08-12 23:42:58.904 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:local
2017-08-12 23:42:58.938 [ERROR] [ome.core.thing.internal.ThingManager] - Exception occurred while initializing handler of thing 'astro:sun:local': java.lang.NoClassDefFoundError: org/eclipse/smarthome/core/scheduler/CronHelper
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/eclipse/smarthome/core/scheduler/CronHelper
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_144]
	at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_144]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:194)[97:org.eclipse.smarthome.core:0.9.0.201708041325]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:83)[97:org.eclipse.smarthome.core:0.9.0.201708041325]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:67)[97:org.eclipse.smarthome.core:0.9.0.201708041325]
	at org.eclipse.smarthome.core.thing.internal.ThingManager.doInitializeHandler(ThingManager.java:728)[104:org.eclipse.smarthome.core.thing:0.9.0.201708041325]
	at org.eclipse.smarthome.core.thing.internal.ThingManager.initializeHandler(ThingManager.java:664)[104:org.eclipse.smarthome.core.thing:0.9.0.201708041325]
	at org.eclipse.smarthome.core.thing.internal.ThingManager.registerAndInitializeHandler(ThingManager.java:1036)[104:org.eclipse.smarthome.core.thing:0.9.0.201708041325]
	at org.eclipse.smarthome.core.thing.internal.ThingManager.thingAdded(ThingManager.java:464)[104:org.eclipse.smarthome.core.thing:0.9.0.201708041325]
	at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyTrackers(ThingRegistryImpl.java:200)[104:org.eclipse.smarthome.core.thing:0.9.0.201708041325]
	at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutAddedElement(ThingRegistryImpl.java:119)[104:org.eclipse.smarthome.core.thing:0.9.0.201708041325]
	at org.eclipse.smarthome.core.thing.internal.ThingRegistryImpl.notifyListenersAboutAddedElement(ThingRegistryImpl.java:1)[104:org.eclipse.smarthome.core.thing:0.9.0.201708041325]
	at org.eclipse.smarthome.core.common.registry.AbstractRegistry.addProvider(AbstractRegistry.java:284)[97:org.eclipse.smarthome.core:0.9.0.201708041325]
	at org.eclipse.smarthome.core.common.registry.AbstractRegistry$ProviderTracker.addingService(AbstractRegistry.java:107)[97:org.eclipse.smarthome.core:0.9.0.201708041325]
	at org.eclipse.smarthome.core.common.registry.AbstractRegistry$ProviderTracker.addingService(AbstractRegistry.java:1)[97:org.eclipse.smarthome.core:0.9.0.201708041325]
	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941)[org.osgi.core-6.0.0.jar:]
	at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870)[org.osgi.core-6.0.0.jar:]
	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)[org.osgi.core-6.0.0.jar:]
	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)[org.osgi.core-6.0.0.jar:]
	at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901)[org.osgi.core-6.0.0.jar:]
	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:914)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:886)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:873)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:132)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:940)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:740)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:1012)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.DependencyManager$SingleStaticCustomizer.addedService(DependencyManager.java:968)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1215)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerAdded(ServiceTracker.java:1136)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.trackAdding(ServiceTracker.java:945)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.track(ServiceTracker.java:881)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1167)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:127)[34:org.apache.felix.scr:2.0.6]
	at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:914)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:464)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:886)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:873)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:132)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:940)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:740)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:674)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:429)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:657)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:341)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:403)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.Activator.access$200(Activator.java:54)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:278)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.utils.extender.AbstractExtender.createExtension(AbstractExtender.java:259)[34:org.apache.felix.scr:2.0.6]
	at org.apache.felix.utils.extender.AbstractExtender.modifiedBundle(AbstractExtender.java:232)[34:org.apache.felix.scr:2.0.6]
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:482)[org.osgi.core-6.0.0.jar:]
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerModified(BundleTracker.java:415)[org.osgi.core-6.0.0.jar:]
	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:232)[org.osgi.core-6.0.0.jar:]
	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)[org.osgi.core-6.0.0.jar:]
	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.container.Module.start(Module.java:457)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
Caused by: java.lang.NoClassDefFoundError: org/eclipse/smarthome/core/scheduler/CronHelper
	at org.eclipse.smarthome.binding.astro.handler.AstroThingHandler.restartJobs(AstroThingHandler.java:206)
	at org.eclipse.smarthome.binding.astro.handler.AstroThingHandler.initialize(AstroThingHandler.java:113)
	at org.eclipse.smarthome.core.thing.internal.ThingManager$8.call(ThingManager.java:731)
	at org.eclipse.smarthome.core.thing.internal.ThingManager$8.call(ThingManager.java:1)
	at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:181)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_144]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_144]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_144]
	at java.lang.Thread.run(Thread.java:748)[:1.8.0_144]
Caused by: java.lang.ClassNotFoundException: org.eclipse.smarthome.core.scheduler.CronHelper cannot be found by org.eclipse.smarthome.binding.astro_0.9.0.201706211517
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:389)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_144]
	... 9 more

Hi @gerrieg, I believe you are the maintainer of the Astro binding? If so, can you please shed any light into this issue? Thanks in advance!

I’m running build #980 and i don’t have any issues with the Astro binding:

openhab> feature:list|grep -i astro
esh-binding-astro                           | 0.9.0.SNAPSHOT   |          | Started     | addons-2.2.0-SNAPSHOT   |
openhab-binding-astro                       | 2.2.0.SNAPSHOT   | x        | Started     | addons-2.2.0-SNAPSHOT   | Astro Binding

I am going to update to the latest snapshot and try it out.

Your issue looks like an installation problem to me.

Thanks @gerrieg, that “installation problem” got me checking things.

I found that I had two addon repos listed in ESH for some reason:

openhab> feature:list|grep -i astro|sort
esh-binding-astro                           | 0.9.0.SNAPSHOT   |          | Uninstalled | addons-2.2.0-SNAPSHOT                |
esh-binding-astro                           | 0.9.0.SNAPSHOT   |          | Uninstalled | openhab-addons-2.2.0-SNAPSHOT        |
openhab-binding-astro                       | 2.2.0.SNAPSHOT   |          | Uninstalled | addons-2.2.0-SNAPSHOT                | Astro Binding
openhab-binding-astro                       | 2.2.0.SNAPSHOT   |          | Uninstalled | openhab-addons-2.2.0-SNAPSHOT        | Astro Binding
openhab-binding-astro1                      | 1.11.0.SNAPSHOT  | x        | Started     | openhab-addons-legacy-2.2.0-SNAPSHOT | Astro Binding (1.x)
openhab>

openhab> repo-list |grep -i addons/ |sort
addons-2.2.0-SNAPSHOT                | mvn:org.openhab.distro/addons/2.2.0-SNAPSHOT/xml/features
openhab-addons-2.2.0-SNAPSHOT        | mvn:org.openhab.distro/openhab-addons/2.2.0-SNAPSHOT/xml/features
openhab>

openhab> repo-remove openhab-addons-2.2.0-SNAPSHOT
Removing features repository mvn:org.openhab.distro/openhab-addons/2.2.0-SNAPSHOT/xml/features
openhab> 

openhab> feature:list|grep -i astro|sort
esh-binding-astro                           | 0.9.0.SNAPSHOT   |          | Uninstalled | addons-2.2.0-SNAPSHOT                |
openhab-binding-astro                       | 2.2.0.SNAPSHOT   |          | Uninstalled | addons-2.2.0-SNAPSHOT                | Astro Binding
openhab-binding-astro1                      | 1.11.0.SNAPSHOT  | x        | Started     | openhab-addons-legacy-2.2.0-SNAPSHOT | Astro Binding (1.x)
openhab>

So now I only have one astro 2 binding listed.

I don’t know yet whether this will fix the issue, as I had abandoned the 2.x addon in favour of the 1.x one to get the functionality back, and I won’t be in a position to switch back to the 2.x binding for a week or so, but it looks promising.

EDIT: Okay, so that wasn’t quite as good as I thought. Just upgraded from build 1003 to 1010 and both repos are back…

Hmm, it looks like you are right, I have all the features twice:

openhab> feature:list|grep -i astro
esh-binding-astro                           | 0.9.0.SNAPSHOT   |          | Started     | openhab-addons-2.2.0-SNAPSHOT |
openhab-binding-astro                       | 2.2.0.SNAPSHOT   | x        | Started     | openhab-addons-2.2.0-SNAPSHOT | Astro Binding
esh-binding-astro                           | 0.9.0.SNAPSHOT   |          | Started     | addons-2.2.0-SNAPSHOT         |
openhab-binding-astro                       | 2.2.0.SNAPSHOT   | x        | Started     | addons-2.2.0-SNAPSHOT         | Astro Binding
openhab>

So I de-installed the Astro binding (everything was still there in double, just with status “Deinstalled”) and the restarted OH. After that, the doubles where gone and then reinstalled. Now it works… :confused:

Just for the record, a few details re my setup:

I have an apt installation on Ubuntu. First started with 2.0.0 stable, then moved to snapshot due to various problems with ZWave binding. With 2.0.0 Astro was working fine. When 2.1.0 stable came out, I moved to that, always in the hope of getting to a more stable state. Unfortunately 2.1.0 stable had some new regression problems with ZWave, so I moved back to snapshot. I think that’s when Astro broke.

My repos:

/etc/apt/sources.list.d/openhab2.list:deb https://openhab.jfrog.io/openhab/openhab-linuxpkg unstable main
/etc/apt/sources.list.d/openhab2.list.save:deb https://openhab.jfrog.io/openhab/openhab-linuxpkg unstable main

openhab> repo-list |grep -i addons/ |sort
addons-2.2.0-SNAPSHOT   | mvn:org.openhab.distro/addons/2.2.0-SNAPSHOT/xml/features
openhab>

Anyhow, many “Danke” for pointing me in the right direction and for your help!

Hi,
I’m also having issues with the Astro binding.

I also noticed duplicate entries:

openhab> feature:list|grep -i astro
esh-binding-astro                           | 0.9.0.SNAPSHOT   |          | Started     | openhab-addons-2.2.0-SNAPSHOT |
openhab-binding-astro                       | 2.2.0.SNAPSHOT   | x        | Started     | openhab-addons-2.2.0-SNAPSHOT | Astro Binding
esh-binding-astro                           | 0.9.0.SNAPSHOT   |          | Started     | addons-2.2.0-SNAPSHOT         |
openhab-binding-astro                       | 2.2.0.SNAPSHOT   | x        | Started     | addons-2.2.0-SNAPSHOT         | Astro Binding

After uninstalling Astro via PaperUI, I got:

openhab> feature:list|grep -i astro
esh-binding-astro                           | 0.9.0.SNAPSHOT   |          | Uninstalled | openhab-addons-2.2.0-SNAPSHOT |
openhab-binding-astro                       | 2.2.0.SNAPSHOT   |          | Uninstalled | openhab-addons-2.2.0-SNAPSHOT | Astro Binding
esh-binding-astro                           | 0.9.0.SNAPSHOT   |          | Uninstalled | addons-2.2.0-SNAPSHOT         |
openhab-binding-astro                       | 2.2.0.SNAPSHOT   |          | Uninstalled | addons-2.2.0-SNAPSHOT         | Astro Binding

Restarting OH still kept those 4 entries with “Uninstalled”. I also removed the contents of the /tmp and /cache folder.

When reinstalling Astro via PaperUI, all 4 entries were back with status “started”.

look into the userdata/kar folder. Maybe you have multiple versions of the binding there.

# here should be the astro binding
org/eclipse/smarthome/binding

# here should be NO binding
org/openhab/binding

Hi,
In the /kar folder, I have two subfolders:
openhab-addons-2.1.0-SNAPSHOT
openhab-addons-2.2.0-SNAPSHOT

I guess the first folder is there since I upgraded from 2.1 snapshots to 2.2 snapshots at some point in time.
I’m not sure if that 2.1-folder should still be there and influences the 2.2 snapshot. I guess not.

Anyway, I’ve located the following Astro-binding:
userdata\openhab2\kar\openhab-addons-2.2.0-SNAPSHOT\org\eclipse\smarthome\binding\org.eclipse.smarthome.binding.astro\0.9.0-SNAPSHOT
And it also exists in the 2.1 folder:
userdata\openhab2\kar\openhab-addons-2.1.0-SNAPSHOT\org\eclipse\smarthome\binding\org.eclipse.smarthome.binding.astro\0.9.0-SNAPSHOT

However, in the “kar\openhab-addons-2.2.0-SNAPSHOT\org\openhab\binding” folder, I didn’t find any Astro-subfolder.

Not sure what this information means. :slight_smile:

I was a little too quick in claiming success. Astro is broken again and I found 3 directories underneath my userdata/kar folder:

drwxr-xr-x  6 openhab openhab 4096 Jul 26 09:11 openhab-addons-2.1.0
drwxr-xr-x  6 openhab openhab 4096 May 20 22:02 openhab-addons-2.1.0-SNAPSHOT
drwxr-xr-x  6 openhab openhab 4096 Jul 27 21:44 openhab-addons-2.2.0-SNAPSHOT

These contain the following related to astro:

allen@haserver:~$ find /var/lib/openhab2/kar -name "*astro*"
/var/lib/openhab2/kar/openhab-addons-2.2.0-SNAPSHOT/org/eclipse/smarthome/binding/org.eclipse.smarthome.binding.astro
/var/lib/openhab2/kar/openhab-addons-2.2.0-SNAPSHOT/org/eclipse/smarthome/binding/org.eclipse.smarthome.binding.astro/0.9.0-SNAPSHOT/org.eclipse.smarthome.binding.astro-0.9.0-SNAPSHOT.jar
/var/lib/openhab2/kar/openhab-addons-2.1.0/org/eclipse/smarthome/binding/org.eclipse.smarthome.binding.astro
/var/lib/openhab2/kar/openhab-addons-2.1.0/org/eclipse/smarthome/binding/org.eclipse.smarthome.binding.astro/0.9.0.b5/org.eclipse.smarthome.binding.astro-0.9.0.b5.jar
/var/lib/openhab2/kar/openhab-addons-2.1.0-SNAPSHOT/org/eclipse/smarthome/binding/org.eclipse.smarthome.binding.astro
/var/lib/openhab2/kar/openhab-addons-2.1.0-SNAPSHOT/org/eclipse/smarthome/binding/org.eclipse.smarthome.binding.astro/0.9.0-SNAPSHOT/org.eclipse.smarthome.binding.astro-0.9.0-SNAPSHOT.jar

Looks like this is where the duplicates are coming from.

Edit: I deleted all directories under kar except openhab-addons-2.2.0-SNAPSHOT. Do I need to delete anything else, caches or whatever?

Nothing is under /org/openhab/binding:

allen@haserver:~$ find /var/lib/openhab2/kar/openhab-addons-2.2.0-SNAPSHOT/org/openhab/binding -name "*astro*"
allen@haserver:~$

Astro still not working. I am seeing this in the logs, the problem seems to be with cronhelper:

2017-08-15 21:53:26.830 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled astro job-daily-sun at midnight for thing astro:sun:7f0b61e1
2017-08-15 21:53:26.919 [WARN ] [ome.core.thing.internal.ThingManager] - Cannot delegate update '306.06' for item 'T4House_Systems_Astro_Sun_Position_Azimuth' to handler for channel 'astro:sun:local:position#azimuth', because no thing with the UID 'astro:sun:local' could be found.
2017-08-15 21:53:26.933 [ERROR] [ore.internal.events.OSGiEventManager] - Dispatching/filtering event for subscriber 'org.eclipse.smarthome.core.events.EventSubscriber' failed: java.lang.NoClassDefFoundError: org/eclipse/smarthome/core/scheduler/CronHelper
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: org/eclipse/smarthome/core/scheduler/CronHelper
	at java.util.concurrent.FutureTask.report(FutureTask.java:122)[:1.8.0_144]
	at java.util.concurrent.FutureTask.get(FutureTask.java:206)[:1.8.0_144]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.callAsynchronous(SafeMethodCaller.java:194)[97:org.eclipse.smarthome.core:0.9.0.201708041325]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:83)[97:org.eclipse.smarthome.core:0.9.0.201708041325]
	at org.eclipse.smarthome.core.common.SafeMethodCaller.call(SafeMethodCaller.java:67)[97:org.eclipse.smarthome.core:0.9.0.201708041325]
	at org.eclipse.smarthome.core.internal.events.OSGiEventManager.dispatchESHEvent(OSGiEventManager.java:189)[97:org.eclipse.smarthome.core:0.9.0.201708041325]
	at org.eclipse.smarthome.core.internal.events.OSGiEventManager.handleEvent(OSGiEventManager.java:164)[97:org.eclipse.smarthome.core:0.9.0.201708041325]
	at org.eclipse.smarthome.core.internal.events.OSGiEventManager.handleEvent(OSGiEventManager.java:147)[97:org.eclipse.smarthome.core:0.9.0.201708041325]
	at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415)[6:org.apache.karaf.services.eventadmin:4.0.8]
	at org.apache.felix.eventadmin.impl.tasks.HandlerTask.run(HandlerTask.java:90)[6:org.apache.karaf.services.eventadmin:4.0.8]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)[:1.8.0_144]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_144]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)[:1.8.0_144]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)[:1.8.0_144]
	at java.lang.Thread.run(Thread.java:748)[:1.8.0_144]
Caused by: java.lang.NoClassDefFoundError: org/eclipse/smarthome/core/scheduler/CronHelper
	at org.eclipse.smarthome.binding.astro.handler.AstroThingHandler.restartJobs(AstroThingHandler.java:206)
	at org.eclipse.smarthome.binding.astro.handler.AstroThingHandler.linkedChannelChange(AstroThingHandler.java:297)
	at org.eclipse.smarthome.binding.astro.handler.AstroThingHandler.channelLinked(AstroThingHandler.java:280)
	at org.eclipse.smarthome.core.thing.link.ThingLinkManager.informHandlerAboutLinkedChannel(ThingLinkManager.java:264)
	at org.eclipse.smarthome.core.thing.link.ThingLinkManager.receiveTypedEvent(ThingLinkManager.java:304)
	at org.eclipse.smarthome.core.thing.link.ThingLinkManager.receiveTypedEvent(ThingLinkManager.java:1)
	at org.eclipse.smarthome.core.events.AbstractTypedEventSubscriber.receive(AbstractTypedEventSubscriber.java:50)
	at org.eclipse.smarthome.core.internal.events.OSGiEventManager$1.call(OSGiEventManager.java:193)
	at org.eclipse.smarthome.core.internal.events.OSGiEventManager$1.call(OSGiEventManager.java:1)
	at org.eclipse.smarthome.core.common.SafeMethodCaller$CallableWrapper.call(SafeMethodCaller.java:181)
	... 4 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.smarthome.core.scheduler.CronHelper cannot be found by org.eclipse.smarthome.binding.astro_0.9.0.201706211517
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:389)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)[org.eclipse.osgi-3.10.101.v20150820-1432.jar:]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)[:1.8.0_144]
	... 14 more

Any idea what I should poke at next?

EDIT 2: After a second restart of OH astro now seems to be working again. I also had some update problems in logs, and needed to delete astro items and things, and now updates seem to work as well.