2017-07-07 21:12:55.327 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'test.sitemap’
2017-07-07 21:12:55.341 [WARN ] [el.core.internal.ModelRepositoryImpl] - Configuration model ‘test.sitemap’ is either empty or cannot be parsed correctly!
2017-07-07 21:12:55.345 [ERROR] [.core.internal.folder.FolderObserver] - Error handling update of file ‘/etc/openhab2/sitemaps/test.sitemap’: null.
2017-07-07 21:12:55.421 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model ‘test.sitemap’
So here we can see that on my system the openhab user is running openHAB.
Next check the file permissions:
marcel@openhab:~ $ ls -l /etc/openhab2/sitemaps
-rw-r--r-- 1 openhab openhab 6408 Jun 7 21:53 default.sitemap
-rw-rw-r-- 1 openhab openhab 230 May 15 20:54 readme.txt
The file permissions for my default.sitemap are as follows:
Read/Write permissions for the owner (in this case openhab)
Read permissions for the group (in this case the group is also called openhab. The first openhab is the user, the second openhab is the group)
Read permissions for other (meaning any other user).
I also see the ‘Configuration model ‘test.sitemap’ is either empty or cannot be parsed correctly!’ errors in my log file. I do not experience the nullpointer exceptions, but I think that they have the same cause.
You are editing your sitemap file from a remote computer. When saving the file, openHAB is informed by the OS of a change in the file and starts reloading the file. However, since you’re saving the file over the network on the remote node running openHAB this saving takes too long, or openHAB starts reading too quickly. So the file is simply not complete when openHAB reads it. In the end openHAB succeeds in reading the sitemap as can also be seen by the last line of your log:
2017-07-07 21:12:55.421 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'test.sitemap'
I wouldn’t say that this is all normal and how it should be, but it is nothing to worry about.
This looks very much like the old “file encoding” issue that I had a while back.
What are you using to edit your files? Notepad++ by any chance??? It has something to do with UTF8 encoding, choose “Encoding”, “Encode in UTF-8-BOM” from the menu’s then save. Oddly though, I get a similar “Configuration model ‘home.rules’ is either empty or cannot be parsed correctly!” error with my rules file regardless of encoding, so am having to use normal notepad.exe for editing (or I edit with notepad++ locally on Windows, upload the file, then run vi to edit on my linux appliance, then make a simple change and save the file and voila, it works)