- Platform information:
- Hardware: RaspPi2B
- OS: Raspian Jessy
- Java Runtime Environment: 1.8.0_151-b12
- openHAB version: 2.4
Currently I migrate from OH2.1 to OH2.4.
During the “migration phase” I started the OH instance per hand using start.sh script. I get some warnings like missing script files … normally in the boot process, if not all is loaded at that time. BUT OH2.4 runs stable with all of my configured items, things, rules, scripts, …
After that I want to go live and I wanted to start OH using system service file. In this case I get errors from the rule engine, that some items can not resolved or some items can not be casted from null to a number. Each positions which was marked as bad in the log I changed to a null pointer test of the item and the item state. But I get the same error messages too (it seems, that the test was false positive) and OH crash.
Here are some examples:
14:49:39.191 [ERROR] [untime.internal.engine.RuleEngineImpl] - Rule 'HeatingTimes': Could not cast NULL to java.lang.Number; line 31, column 13, length 24
14:50:27.769 [ERROR] [untime.internal.engine.RuleEngineImpl] - Rule 'LightEvents': Could not cast NULL to java.lang.Number; line 75, column 11, length 33
14:50:21.567 [ERROR] [untime.internal.engine.RuleEngineImpl] - Rule 'RegenFenster': The name 'OPEN' cannot be resolved to an item or type; line 52, column 33, length 4
A little bit after that
14:50:58.993 [INFO ] [.basic.internal.servlet.WebAppServlet] - Stopped Basic UI
14:51:06.225 [DEBUG] [.eclipse.smarthome.model.rule.runtime] - BundleEvent STOPPING - org.eclipse.smarthome.model.rule.runtime
And many of this
14:51:14.790 [WARN ] [ommon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception:
java.lang.NullPointerException: null
at org.eclipse.smarthome.model.rule.runtime.internal.engine.RuleEngineImpl.lambda$2(RuleEngineImpl.java:336) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) ~[?:?]
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) [?:?]
For example, the error message above in LightEvents Line 75 comes from here:
Line74: if (LightningOnHourWE !== null && LightningOnHourWE.state !== null) {
Line75: onWE = (LightningOnHourWE.state as Number)
Line76: }
Did anyone have an idea why OH does not start as service but runs fine started by hand?