Openhab rule engine error on startup

  • Platform information:
    • Hardware: _i3-4010U CPU @ 1.70GHz/8GiB/SSD 240GB
    • OS: Fedora Linux 4.20.6-100.fc28.x86_64
    • Java Runtime Environment: openjdk version “1.8.0_191”
    • openHAB version:openHAB 2.4.0 Release Build
  • Issue of the topic:
    In my openhab on restart error appears. One rule is not initialized. When I edit and savae it in Paper UI it starts working.
  • Please post configurations (if applicable):
    /var/lib/openhab2/jsondb/automation_rules.json

{
“bb96754d-561f-4bed-8285-34d35c2e0dc4”: {
“class”: “org.eclipse.smarthome.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “1”,
“label”: “an item state changes”,
“description”: “This triggers the rule if an item state has changed.”,
“configuration”: {
“itemName”: “RFBridge_RFSwitchSecond”,
“previousState”: 0.0
},
“type”: “core.ItemStateChangeTrigger”
}
],
“conditions”: [],
“actions”: [
{
“inputs”: {},
“id”: “2”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “Furtka_FurtkaSwitch”,
“command”: “ON”
},
“type”: “core.ItemCommandAction”
},
{
“inputs”: {},
“id”: “3”,
“label”: “play a sound”,
“description”: “Plays a sound file.”,
“configuration”: {
“sink”: “webaudio”,
“sound”: “doorbell.mp3”
},
“type”: “media.PlayAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “bb96754d-561f-4bed-8285-34d35c2e0dc4”,
“name”: “Furtka_2”,
“tags”: [],
“visibility”: “VISIBLE”,
“description”: “Furtka if second switch”
}
},
“b903d3e1-1440-4e5d-9f5d-0d3ddaf43644”: {
“class”: “org.eclipse.smarthome.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “4”,
“label”: “an item receives a command”,
“description”: “This triggers the rule if an item receives a command.”,
“configuration”: {
“itemName”: “Furtka_FurtkaSwitch”
},
“type”: “core.ItemCommandTrigger”
}
],
“conditions”: [],
“actions”: [
{
“inputs”: {},
“id”: “5”,
“label”: “play a sound”,
“description”: “Plays a sound file.”,
“configuration”: {
“sink”: “webaudio”,
“sound”: “barking.mp3”
},
“type”: “media.PlayAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “b903d3e1-1440-4e5d-9f5d-0d3ddaf43644”,
“name”: “Say “Furtka””,
“tags”: [],
“visibility”: “VISIBLE”
}
},
“f77f03a5-6e97-42d8-be53-249e1961df48”: {
“class”: “org.eclipse.smarthome.automation.dto.RuleDTO”,
“value”: {
“triggers”: [
{
“id”: “1”,
“label”: “an item state changes”,
“description”: “This triggers the rule if an item state has changed.”,
“configuration”: {
“itemName”: “RFBridge_RFSwitchFirst”
},
“type”: “core.ItemStateChangeTrigger”
}
],
“conditions”: [],
“actions”: [
{
“inputs”: {},
“id”: “2”,
“label”: “send a command”,
“description”: “Sends a command to a specified item.”,
“configuration”: {
“itemName”: “Furtka_FurtkaSwitch”,
“command”: “ON”
},
“type”: “core.ItemCommandAction”
},
{
“inputs”: {},
“id”: “3”,
“label”: “play a sound”,
“description”: “Plays a sound file.”,
“configuration”: {
“sink”: “webaudio”,
“sound”: “doorbell.mp3”
},
“type”: “media.PlayAction”
}
],
“configuration”: {},
“configDescriptions”: [],
“uid”: “f77f03a5-6e97-42d8-be53-249e1961df48”,
“name”: “Furtka_1”,
“tags”: [],
“visibility”: “VISIBLE”,
“description”: “Furtka if first switch”
}
}
}

  • If logs where generated please post these here using code fences:

```csv
2019-08-26 22:46:56.325 [INFO ] [.transport.mqtt.MqttBrokerConnection] - Starting MQTT broker connection to '192.168.88.10' with clientid paho609404108368627 and file store '/var/lib/openhab2/mqtt/192.168.88.10'                                                                                 
2019-08-26 22:46:56.616 [ERROR] [utomation.module.script.defaultscope] - bundle org.eclipse.smarthome.automation.module.script.defaultscope:0.10.0.oh240 (214)[org.eclipse.smarthome.automation.module.script.defaultscope.internal.DefaultScriptScopeProvider(234)] : The addThingActions method ha
s thrown an exception                                                                                                                                                                                                                                                                               
java.lang.NullPointerException: null                                                                                                                                                                                                                                                                
        at org.eclipse.smarthome.automation.module.script.defaultscope.internal.DefaultScriptScopeProvider.addThingActions(DefaultScriptScopeProvider.java:125) ~[?:?]                                                                                                                              
        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.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) ~[39:org.apache.felix.scr:2.1.2]                                                                                                                                                                   
        at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) ~[39:org.apache.felix.scr:2.1.2]                                                                                                                                                                      
        at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664) ~[39:org.apache.felix.scr:2.1.2]                                                                                                                                                                
        at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                                          
        at org.apache.felix.scr.impl.inject.methods.BindMethod.invoke(BindMethod.java:42) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                                           
        at org.apache.felix.scr.impl.manager.DependencyManager.doInvokeBindMethod(DependencyManager.java:1809) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                      
        at org.apache.felix.scr.impl.manager.DependencyManager.bindDependency(DependencyManager.java:1637) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                          
        at org.apache.felix.scr.impl.manager.DependencyManager.bind(DependencyManager.java:1625) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                                    
        at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:301) [39:org.apache.felix.scr:2.1.2]                                                                                                                                     
        at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:114) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                
        at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:947) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                     
        at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:919) [39:org.apache.felix.scr:2.1.2]                                                                                                                                             
        at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:863) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                     
        at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212) [?:?]                                                                                                                                                                                      
        at java.security.AccessController.doPrivileged(Native Method) ~[?:?]                                                                                                                                                                                                                        
        at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:210) [?:?]                                                                                                                                                                          
        at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111) [?:?]                                                                                                                                                                                 
        at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:45) [?:?]                                                                                                                                                                                    
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:508) [?:?]                                                                                                                                                                     
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:461) [?:?]                                                                                                                                                                                     
        at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:624) [?:?]                                                                                                                                                                                       
        at com.eclipsesource.jaxrs.publisher.internal.ResourceTracker.addingService(ResourceTracker.java:39) [20:com.eclipsesource.jaxrs.publisher:5.3.1.201602281253]                                                                                                                              
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:941) [?:?]                                                                                                                                                                                             
        at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:870) [?:?]                                                                                                                                                                                             
        at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) [?:?]                                                                                                                                                                                                        
        at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) [?:?]                                                                                                                                                                                                              
        at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:901) [?:?]                                                                                                                                                                                               
        at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) [?:?]                                                                                                                                                                 
        at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:920) [?:?]                                                                                                                                                                                    
        at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [?:?]                                                                                                                                                                                              
        at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [?:?]                                                                                                                                                                                 
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862) [?:?]                                                                                                                                                                  
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801) [?:?]                                                                                                                                                                            
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.register(ServiceRegistrationImpl.java:127) [?:?]                                                                                                                                                                       
        at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.registerService(ServiceRegistry.java:225) [?:?]                                                                                                                                                                                
        at org.eclipse.osgi.internal.framework.BundleContextImpl.registerService(BundleContextImpl.java:469) [?:?]                                                                                                                                                                                  
        at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:891) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                 
        at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.register(AbstractComponentManager.java:877) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                 
        at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:128) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                   
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.registerService(AbstractComponentManager.java:944) [39:org.apache.felix.scr:2.1.2]                                                                                                                                            
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.activateInternal(AbstractComponentManager.java:727) [39:org.apache.felix.scr:2.1.2]                                                                                                                                           
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.enableInternal(AbstractComponentManager.java:661) [39:org.apache.felix.scr:2.1.2]                                                                                                                                             
        at org.apache.felix.scr.impl.manager.AbstractComponentManager.enable(AbstractComponentManager.java:427) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                     
        at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.enableComponents(ConfigurableComponentHolder.java:665) [39:org.apache.felix.scr:2.1.2]                                                                                                                                     
        at org.apache.felix.scr.impl.BundleComponentActivator.initialEnable(BundleComponentActivator.java:339) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                      
        at org.apache.felix.scr.impl.Activator.loadComponents(Activator.java:381) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                                                   
        at org.apache.felix.scr.impl.Activator.access$200(Activator.java:49) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                                                        
        at org.apache.felix.scr.impl.Activator$ScrExtension.start(Activator.java:263) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                                               
        at org.apache.felix.scr.impl.AbstractExtender.createExtension(AbstractExtender.java:196) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                                    
        at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:169) [39:org.apache.felix.scr:2.1.2]                                                                                                                                                                     
        at org.apache.felix.scr.impl.AbstractExtender.modifiedBundle(AbstractExtender.java:49) [39:org.apache.felix.scr:2.1.2]

Welcome to the OpenHAB community!
Sometimes on startup, things can get loaded out of order, it is a know issue but usually somewhat harmless. If everything is working, don’t worry about it. If something isn’t working, try restarting OpenHAB

Thank you for answer, but your answer is quite strange. This one rule isnt working. I dont want to restart openhab until it starts working.I need a solution

then just touch the rule file, how’s that sound? Just resave it, doing so will reload the rule and if it is a valid rule, it should run
ok?