Rules - is either empty or cannot be parsed correctly!

I have a fresh install of OH2 (latest snapshot) running on Ubuntu 16.04 server. Everything is working except rules.

I have created my items using .items-files. But when I copy (ANY) .rules-file to my samba share (authenticated with the openhab user) I get this error in the log:

2016-12-30 20:39:24.215 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'lys.rules'
2016-12-30 20:39:24.217 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model 'lys.rules' is either empty or cannot be parsed correctly!
2016-12-30 20:39:24.227 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model '._lys.rules'
2016-12-30 20:39:24.228 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model '._lys.rules' is either empty or cannot be parsed correctly!
2016-12-30 20:39:24.234 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model '._lys.rules'
2016-12-30 20:39:24.240 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model '._lys.rules' is either empty or cannot be parsed correctly!
2016-12-30 20:39:24.241 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model '._lys.rules'
2016-12-30 20:39:24.244 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model '._lys.rules' is either empty or cannot be parsed correctly!
2016-12-30 20:39:24.386 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'lys.rules'
2016-12-30 20:39:24.396 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model '._lys.rules'
2016-12-30 20:39:24.399 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model '._lys.rules' is either empty or cannot be parsed correctly!
2016-12-30 20:39:24.400 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model '._lys.rules'
2016-12-30 20:39:24.404 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model '._lys.rules' is either empty or cannot be parsed correctly!
2016-12-30 20:39:24.408 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model '._lys.rules'
2016-12-30 20:39:24.412 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model '._lys.rules' is either empty or cannot be parsed correctly!
2016-12-30 20:39:24.413 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model '._lys.rules'
2016-12-30 20:39:24.416 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model '._lys.rules' is either empty or cannot be parsed correctly!
2016-12-30 20:39:24.419 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'lys.rules'
2016-12-30 20:39:24.426 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'lys.rules'
2016-12-30 20:39:24.433 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model '._lys.rules'
2016-12-30 20:39:24.436 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model '._lys.rules' is either empty or cannot be parsed correctly!

Whats up? Permission problem?

It would help if you’d post the code of that rule file.

This is the .rules-file, but I get the same parse error on anything I try.

Could the problem be that all my items are named with numbers in the beginning?!

rule "GroupDim-Kjellerstue"
when
    Item 0etg_Kjellergang_Lys_Spotter_Dimmer changed
then
    var s = 0etg_Kjellergang_Lys_Spotter_Dimmer.state.toString()
    sendCommand(0etg_Kjellerstue_Lys_Taklampe_Sofa_Color, s);
end

If I remove the “;” at the end of the sendcommand line I don’t get that error

Same error if I remove “;”

Did you try if the rule is working?

The problem seems to be the items starting with a number:

Item 0etg_Kjellergang_Lys_Spotter_Dimmer

Changed it to a letter and the script is working now.

Item i0etg_Kjellergang_Lys_Spotter_Dimmer

I still get the parse error message though.

See here: Configuration model 'default.rules' is either empty or cannot be parsed correctly!
Could be a timing error when using network file sharing.