OpenHAB - Storage API generate filenames with colons - which are invalid on Windows

  • Platform information:
    • Hardware: Intel x64
    • OS: Windows Server 2016
    • Java Runtime Environment: V 8.171 64Bit
    • openHAB version: 2.3 RTM

Hello,
i use OpenHAB 2.3 on Windows.
Since a few days a have the Problem, that the AmazonEchoControl-Binding can not log in after i restart OpenHAB. I have always to go to the Website to validate my Login.
In the openHAB-logfile i see the following error:
07:18:50.454 [ERROR] [ome.storage.json.internal.JsonStorage] - Error writing JsonDB to D:\OpenHABRoot\OpenHAB2\userdata\jsondb\amazonechocontrol:account:account1.json. Cause D:\OpenHABRoot\OpenHAB2\userdata\jsondb\amazonechocontrol:account:account1.json (Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch).
07:18:50.458 [ERROR] [ome.storage.json.internal.JsonStorage] - Error writing JsonDB to D:\OpenHABRoot\OpenHAB2\userdata\jsondb\backup\1528175930458–amazonechocontrol:account:account1.json. Cause D:\OpenHABRoot\OpenHAB2\userdata\jsondb\backup\1528175930458–amazonechocontrol:account:account1.json (Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist falsch).

I think, this is the reason for the Login-error because the binding can not save the account-config in the json-file. On Windows filenames the colon“:” is not allowed in the filename.
I have contacted the binding-developper and he told me, that the filename is choosed from openHAB - not from him. He telled me, that he uses the open StorageService API.
Can anybody help me ?
Thanks.
Ralph

Double post

Thanks for the report, this is clearly a bug. I have created https://github.com/eclipse/smarthome/issues/5687 - shouldn’t be hard to fix, I hope.

Thank you Kai!