openhab-core: [Automation] Paper UI (JSON) rules fail to load after ESH reintegration
Before the ESH reintegration, Paper UI saved rule files with…
"class": "org.eclipse.smarthome.automation.dto.RuleDTO"
After the ESH reintegration (observed on S1557), the rules are saved with…
"class": "org.openhab.core.automation.dto.RuleDTO"
This causes the following error after OH is upgraded and the rule files are loaded…
2019-03-21 15:22:55.362 [ERROR] [org.eclipse.smarthome.storage.json.internal.JsonStorage] - Couldn't deserialize value 'org.eclipse.smarthome.storage.json.internal.StorageEntry@4aee9d1c'. Root cause is: org.eclipse.smarthome.automation.dto.RuleDTO cannot be found by org.openhab.core.automation_2.5.0.201903152356
After upgrading OH, users that have created rules in Paper UI will need to:
- Stop OH
- Using the openhab account, edit /userdata/jsondb/automation_rules.json
- Search/replace the class name
- Save the file
- Repeat with /userdata/jsondb/automation_rules_disabled.json
- Delete the files in /userdata/jsondb/backup directory
- Restart OH
It wouldn’t help people with manual installs, but could this be added to an update script?
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 27 (23 by maintainers)
With https://github.com/openhab/openhab-docker/pull/239 the openHAB Docker images will also use the common update files. That way the rules will also be patched by the new REPLACE command (https://github.com/openhab/openhab-distro/pull/946).
Why not hooking into the Karaf startup and apply the migration using Java code?