[SNAPSHOT #1519] Jodatime error: Could not invoke method: org.joda.time.DateTime.now() on instance: null

Hi,

I receive a joda.time error where I only find one other topic that is unfortunately not helping me. I created this rule a couple of days ago and I guess it worked without an error - it still works but I receive this error message with release #1519.

2019-02-10 22:13:19.257 [ERROR] [ntime.internal.engine.RuleEngineImpl] 
- Rule 'Wifi timer': An error occurred during the script execution: 
Could not invoke method: org.joda.time.DateTime.now() on instance: null


Rule

var Timer Timer_Wifi_DG

rule "Wifi timer"
when
	Item zwave_device_512_node10_sensor_binary changed
	
then
	if(zwave_device_512_node10_sensor_binary.state==ON) 
	{
		if(Timer_Wifi_DG!==null) {
    		Timer_Wifi_DG.cancel
    		Timer_Wifi_DG = null
				    	}
fboxWifi24.sendCommand(ON)
fboxWifi50.sendCommand(ON)

	} 
	else if (zwave_device_512_node10_sensor_binary.state==OFF) 
	 {
		Timer_Wifi_DG = createTimer(now.plusSeconds(7200)) [| 
fboxWifi24.sendCommand(OFF)
fboxWifi50.sendCommand(OFF)

 ]
	}
	
end

Has something changed with joda time?

Something has, none of my rules now work.

Please open an issue at https://github.com/openhab/openhab-core/issues (I guess this is core related)

Likely already been done.

Also another forum post :

1 Like

Yepp, missed that one… :slight_smile:

1 Like
2019-02-12 16:11:25.062 [ERROR] [ntime.internal.engine.RuleEngineImpl] - 
Rule 'xxx timer': The name 'now' cannot be resolved to an item or type; 
line 19, column 23, length 3

The error message changed with #1521

#1522 seems to have fixed it.