OH 2.4.0 Snapshot #1413 ThingManager NPE upon shutdown

This may deserve a github issue… is anyone else seeing the same?

  • Platform information:
    • Hardware: Laptop with Intel CPU i5-6200U, 8GB RAM, 1TB HDD
    • OS: Linux Debian Jessie x64
    • Java Runtime Environment: Oracle JVM x64 build 1.8.0_191-b12
    • openHAB version: 2.4.0 Snapshot Build #1413
  • Issue of the topic: Upon service shutdown (systemctl stop openhab2), I get the following logged:
==> openhab.log <==
2018-11-06 09:34:15.562 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'Runnable.run()' on 'org.eclipse.smarthome.core.thing.internal.ThingManagerImpl$$Lambda$447/533216619@1f2134e9': null
java.lang.NullPointerException: null
	at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl.lambda$5(ThingManagerImpl.java:828) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [101:org.eclipse.smarthome.core:0.10.0.201811051614]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [101:org.eclipse.smarthome.core:0.10.0.201811051614]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
2018-11-06 09:34:15.571 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'Runnable.run()' on 'org.eclipse.smarthome.core.thing.internal.ThingManagerImpl$$Lambda$447/533216619@272ac84d': null
java.lang.NullPointerException: null
	at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl.lambda$5(ThingManagerImpl.java:828) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [101:org.eclipse.smarthome.core:0.10.0.201811051614]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [101:org.eclipse.smarthome.core:0.10.0.201811051614]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

...
alot of ERRORs
...

2018-11-06 09:34:19.016 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'Runnable.run()' on 'org.eclipse.smarthome.core.thing.internal.ThingManagerImpl$$Lambda$447/533216619@7b9393ee': null
java.lang.NullPointerException: null
	at org.eclipse.smarthome.core.thing.internal.ThingManagerImpl.lambda$5(ThingManagerImpl.java:828) ~[?:?]
	at sun.reflect.GeneratedMethodAccessor95.invoke(Unknown Source) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [101:org.eclipse.smarthome.core:0.10.0.201811051614]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [101:org.eclipse.smarthome.core:0.10.0.201811051614]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
2018-11-06 09:34:19.065 [INFO ] [ternal.scheduler.WeatherJobScheduler] - Deleting weatherJob-HomeR
2018-11-06 09:34:19.075 [INFO ] [penhab.io.transport.mqtt.MqttService] - Stopping broker connection 'homer'
2018-11-06 09:34:19.082 [WARN ] [ence.internal.PersistenceManagerImpl] - Failed to delete cron job for persistence service 'influxdb'
2018-11-06 09:34:19.170 [INFO ] [ui.habmin.internal.servlet.HABminApp] - Stopped HABmin servlet
2018-11-06 09:34:19.340 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Stopped Paper UI
2018-11-06 09:34:19.349 [INFO ] [panel.internal.HABPanelDashboardTile] - Stopped HABPanel
2018-11-06 09:34:19.356 [INFO ] [.dashboard.internal.DashboardService] - Stopped Dashboard

by the way: the service starts up fine and everything works ok

this issue appears only when you stop the OH2 service

edit: Even upon startup, there are some ERRORs that shouldn’t be there… like:

2018-11-06 09:44:28.808 [ERROR] [ntime.internal.engine.RuleEngineImpl] - Rule 'Fibaro Button 01 Pushing': The name 'WDim01_Dim' cannot be resolved to an item or type; line 39, column 2, length 10

Sometimes upon startup some other rules are complaining about missing items (while they exist)
Different items are logged in the ERROR during different startups.

oops…already there: NPE in ThingManagerImpl during shutdown · Issue #6466 · eclipse-archived/smarthome · GitHub

This should be fixed in build #1414.

Affirmative

S 1414 is fine :+1: