This repository has been archived by the owner on May 17, 2021. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[MapDB] should just create a default directory and data store if it doesn't already exist #4662
Labels
Comments
See referenced issue. |
Closed
9037568
added a commit
to 9037568/openhab
that referenced
this issue
Dec 1, 2016
initialization. The main change is modifying mkdir() to mkdirs() to cover the case where more than one directory in the path does not exist. Also added some additional debugging/log messages. Fixes openhab#4662. Fixes openhab#4844.
I have a code change ready that should fix this. Would someone like to try out this test jar? The code change is in my fork. If someone can verify the fix, I'll create a PR. |
kaikreuzer
pushed a commit
that referenced
this issue
Dec 2, 2016
mvolaart
pushed a commit
to mvolaart/openhab
that referenced
this issue
Dec 23, 2016
…nhab#4850) initialization. The main change is modifying mkdir() to mkdirs() to cover the case where more than one directory in the path does not exist. Also added some additional debugging/log messages. Fixes openhab#4662. Fixes openhab#4844.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Expected Behavior
When using MapDB on a new openHAB 2 install it should create missing parent folders for the path to its persistence files instead of throwing an error in the logs.
Current Behavior
When migrating to a brand new openHAB 2 install and first starting up MapDB persistence an error gets thrown in the logs complaining about the parent directory not existing.
2016-09-24 12:14:59.335 [ERROR] [org.openhab.persistence.mapdb ] - [org.openhab.persistence.mapdb(194)] The activate method has thrown an exception java.io.IOError: java.io.IOException: Parent folder does not exist: /opt/openhab2/userdata/persistence/mapdb/storage.mapdb
To correct the error one need only manually create the persistence/mapdb folder.
This may primarily be a problem with openHAB 2 manual installs only as I saw it when setting up openHAB 2 in Docker and this thread is using paths that imply a manual install.
Possible Solution
Have the binding create missing parent directories if they are missing.
Steps to Reproduce (for bugs)
Context
Initial setup and configuration of openHAB 2. It was an unexpected, if easily manually mitigated error.
Your Environment
The text was updated successfully, but these errors were encountered: