Items Bug - Group function 'AND' requires two arguments. Using Equality instead

I’ve been trying to trace down problems with my Items definitions and decided to start from scratch to find out why I’m getting scores of Group function 'AND' requires two arguments. Using Equality instead. errors when my .items files are getting read.

So, I decided to start simple when I saw that even my older files seemed to have problems.

Anyone see this kind of thing before? Know how to resolve it, other than

smarthome:items clear
smarthome:things clear
smarthome:links clear

and restarting openHAB? (Not that it really should matter, as everything is file-based config).

Create a the file, and it goes boom (the file didn’t exist prior)

tail -F of both log files running in same terminal window

$ touch /etc/openhab2/items/touched.items
$ 2017-03-18 21:16:27.308 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'touched.items'
2017-03-18 21:16:27.327 [ERROR] [arthome.core.items.dto.ItemDTOMapper] - Group function 'AND' requires two arguments. Using Equality instead.
2017-03-18 21:16:27.331 [ERROR] [arthome.core.items.dto.ItemDTOMapper] - Group function 'AND' requires two arguments. Using Equality instead.
2017-03-18 21:16:27.334 [ERROR] [arthome.core.items.dto.ItemDTOMapper] - Group function 'AND' requires two arguments. Using Equality instead.
2017-03-18 21:16:27.347 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'touched.items'
2017-03-18 21:16:27.356 [ERROR] [arthome.core.items.dto.ItemDTOMapper] - Group function 'AND' requires two arguments. Using Equality instead.
2017-03-18 21:16:27.357 [ERROR] [arthome.core.items.dto.ItemDTOMapper] - Group function 'AND' requires two arguments. Using Equality instead.
2017-03-18 21:16:27.359 [ERROR] [arthome.core.items.dto.ItemDTOMapper] - Group function 'AND' requires two arguments. Using Equality instead.

Maybe something “stuck” in the runtime model from an error in one my files today?

Looks like a bug so far

$ echo 'Group:Dimmer test_dimmer_group' > /etc/openhab2/items/group.items 
$ 2017-03-18 23:00:53.840 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'group.items'
2017-03-18 23:00:53.849 [ERROR] [arthome.core.items.dto.ItemDTOMapper] - Group function 'AND' requires two arguments. Using Equality instead.
2017-03-18 23:00:53.859 [ERROR] [arthome.core.items.dto.ItemDTOMapper] - Group function 'AND' requires two arguments. Using Equality instead.
2017-03-18 23:00:53.867 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'group.items'
2017-03-18 23:00:53.870 [ERROR] [arthome.core.items.dto.ItemDTOMapper] - Group function 'AND' requires two arguments. Using Equality instead.
2017-03-18 23:00:53.880 [ERROR] [arthome.core.items.dto.ItemDTOMapper] - Group function 'AND' requires two arguments. Using Equality instead.

Valid syntax as per Items.xtext as well as being consistent with the openHAB documentation at http://docs.openhab.org/configuration/items.html#groups

By default, if no function is provided to the group, the Group uses OR.

Pretty clearly, that’s wrong, between the error message, and it not working.

$ echo 'Group:Dimmer:MAX  test_dimmer_group' > /etc/openhab2/items/group.items 
$ 2017-03-18 23:07:52.231 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'group.items'
2017-03-18 23:07:52.262 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'group.items'

at least doesn’t cause errors!

Similarly, Group:Switch fails, and Group:Switch:AND(OFF, ON) does not.

I’m experiencing the exact same behaviour. It does not result in things not working but my logs are fille d with the same error whenever an items file is parsed that contains a group definition with OR

FTR, issue has been created here: https://github.com/eclipse/smarthome/issues/3161 (thanks!)