Addons.cfg syntax

For a little while now, I have been having a problem with openHAB 2 reading my addons.cfg file.

My current format is as follows (note: I have stripped out comments for now while I have been trying various syntax options).

package = standard
remote = true
experimental = true
binding =  astro,mqtt,network,ntp,systeminfo,rfxcom,zwave
ui = basic,classic,habmin,habpanel,paper
persistence = mapdb,rrd4j
action = mail

Everytime I save the file I get the following message in the log:

2016-10-07 18:36:10.139 [WARN ] [g.dispatch.internal.ConfigDispatcher] - Could not parse line 'astro,mqtt,network,ntp,systeminfo,rfxcom,zwave'
2016-10-07 18:36:10.140 [WARN ] [g.dispatch.internal.ConfigDispatcher] - Could not parse line 'basic,classic,habmin,habpanel,paper'

Can someone please post their addons.cfg file that is known to work, so that I can hopefully see what I am doing wrong.

I am currently running build #514 on WIN 7.

Looks all fine. Do you have any fancy invisible Windows characters in there?
Or maybe it isn’t at all about the addons.cfg, because you have a backup file in the same folder or something like that?

@kai thanks for the reply and suggestions. I will take a closer look and report back.

Thanks @kai, looks like that was the problem, although I have no idea what the character was. I will rebuild my addons.cfg file from scratch tomorrow and then test it following an update to the latest snapshot.

It almost certainly a ^M character which Windows puts on the end of every line (in its escaped form it is \r).

You can run dos2unix on the file and it will strip those characters out.

If this is the cause, I would consider it a bug. On Windows, Windows line breaks should be expected and allowed.

Agreed, and usually Java is pretty good at handling them without problem. So maybe that isn’t the problem. I missed the note that OP is on Win 7.