Ticket #858 (closed Defect: worksforme)
upgrading my database from 4.3 to 4.7 failed
Reported by: | Malte | Owned by: | jri |
---|---|---|---|
Priority: | Major | Milestone: | Release 4.7 |
Component: | DeepaMehta Standard Distribution | Version: | 4.7 |
Keywords: | Cc: | ||
Complexity: | 3 | Area: | |
Module: | deepamehta-accesscontrol |
Description
Running migration 3 of plugin "DeepaMehta 4 Files" (runMode=UPDATE, isCleanInstall=false) Nov 06, 2015 11:09:15 AM de.deepamehta.core.impl.MigrationManager runMigration INFORMATION: Running plugin migration class de.deepamehta.plugins.files.migrations.Migration3 Nov 06, 2015 11:09:15 AM de.deepamehta.core.impl.MigrationManager injectServices INFORMATION: Injecting service de.deepamehta.plugins.config.ConfigService into migration 3 of plugin "DeepaMehta 4 Files" Nov 06, 2015 11:09:15 AM de.deepamehta.plugins.files.migrations.Migration3 run INFORMATION: ########## Adding "dm4.files.disk_quota" config topic to 4 usernames Nov 06, 2015 11:09:15 AM de.deepamehta.plugins.config.ConfigPlugin createConfigTopic INFORMATION: ### Creating config topic of type "dm4.files.disk_quota" for topic 2717 Nov 06, 2015 11:09:15 AM de.deepamehta.core.impl.PluginImpl installPluginInDB WARNUNG: ROLLBACK! (plugin "DeepaMehta 4 Files") Nov 06, 2015 11:09:15 AM de.deepamehta.core.impl.PluginImpl$1 addingService SCHWERWIEGEND: An error occurred while adding service de.deepamehta.plugins.config.ConfigService to plugin "DeepaMehta 4 Files": java.lang.RuntimeException: Activation of plugin "DeepaMehta 4 Files" failed at de.deepamehta.core.impl.PluginImpl.activate(PluginImpl.java:496) at de.deepamehta.core.impl.PluginManager.activatePlugin(PluginManager.java:64) at de.deepamehta.core.impl.PluginImpl.checkRequirementsForActivation(PluginImpl.java:460) at de.deepamehta.core.impl.PluginImpl.addService(PluginImpl.java:419) at de.deepamehta.core.impl.PluginImpl.access$000(PluginImpl.java:44) at de.deepamehta.core.impl.PluginImpl$1.addingService(PluginImpl.java:363) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:932) at org.osgi.util.tracker.ServiceTracker$Tracked.customizerAdding(ServiceTracker.java:864) at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256) at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229) at org.osgi.util.tracker.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:894) at org.apache.felix.framework.util.EventDispatcher.invokeServiceListenerCallback(EventDispatcher.java:943) at org.apache.felix.framework.util.EventDispatcher.fireEventImmediately(EventDispatcher.java:794) at org.apache.felix.framework.util.EventDispatcher.fireServiceEvent(EventDispatcher.java:544) at org.apache.felix.framework.Felix.fireServiceEvent(Felix.java:4445) at org.apache.felix.framework.Felix.registerService(Felix.java:3431) at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:346) at org.apache.felix.framework.BundleContextImpl.registerService(BundleContextImpl.java:320) at de.deepamehta.core.impl.PluginImpl.registerProvidedService(PluginImpl.java:705) at de.deepamehta.core.impl.PluginImpl.activate(PluginImpl.java:485) at de.deepamehta.core.impl.PluginManager.activatePlugin(PluginManager.java:64) at de.deepamehta.core.impl.PluginImpl.checkRequirementsForActivation(PluginImpl.java:460) at de.deepamehta.core.impl.PluginImpl.handleEvent(PluginImpl.java:913) at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415) at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks$1.run(SyncDeliverTasks.java:145) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.RuntimeException: Installing plugin "DeepaMehta 4 Files" in the database failed at de.deepamehta.core.impl.PluginImpl.installPluginInDB(PluginImpl.java:531) at de.deepamehta.core.impl.PluginImpl.activate(PluginImpl.java:483) ... 29 more Caused by: java.lang.RuntimeException: Running migration 3 of plugin "DeepaMehta 4 Files" failed at de.deepamehta.core.impl.MigrationManager.runMigration(MigrationManager.java:144) at de.deepamehta.core.impl.MigrationManager.runPluginMigration(MigrationManager.java:99) at de.deepamehta.core.impl.MigrationManager.runPluginMigrations(MigrationManager.java:67) at de.deepamehta.core.impl.PluginImpl.installPluginInDB(PluginImpl.java:521) ... 30 more Caused by: java.lang.RuntimeException: Creating config topic of type "dm4.files.disk_quota" for topic 2717 failed at de.deepamehta.plugins.config.ConfigPlugin.createConfigTopic(ConfigPlugin.java:160) at de.deepamehta.plugins.config.ConfigPlugin.createConfigTopic(ConfigPlugin.java:66) at de.deepamehta.plugins.files.migrations.Migration3.run(Migration3.java:41) at de.deepamehta.core.impl.MigrationManager.runMigration(MigrationManager.java:136) ... 33 more Caused by: java.lang.RuntimeException: The System workspace does not exist at de.deepamehta.core.impl.AccessControlImpl.getSystemWorkspaceId(AccessControlImpl.java:160) at de.deepamehta.plugins.config.ConfigPlugin.assignConfigTopicToWorkspace(ConfigPlugin.java:170) at de.deepamehta.plugins.config.ConfigPlugin.access$500(ConfigPlugin.java:29) at de.deepamehta.plugins.config.ConfigPlugin$1.call(ConfigPlugin.java:154) at de.deepamehta.plugins.config.ConfigPlugin$1.call(ConfigPlugin.java:147) at de.deepamehta.core.impl.AccessControlImpl.runWithoutWorkspaceAssignment(AccessControlImpl.java:208) at de.deepamehta.plugins.config.ConfigPlugin.createConfigTopic(ConfigPlugin.java:147) ... 36 more
Do i need to upgrade my database to an in-between version before upgrading it directly to 4.7?
Cheers!
Change History
comment:2 in reply to: ↑ 1 Changed 9 years ago by jri
In your particular case (updating from 4.3) it might be sufficient to install 4.5, and then 4.7 as the missing System workspace is created in 4.5.
Did this work for you?
comment:3 follow-up: ↓ 5 Changed 9 years ago by Malte
I just moved the "deepamehta-db" folder into a fresh 4.5 and after that migration completed, i moved the database to a fres 4.7 installation and everything works as expected (no errors are thrown).
Thank you for the new version and i am glad that i could help here!
comment:4 Changed 9 years ago by Malte
- Status changed from new to closed
- Resolution set to worksforme
comment:5 in reply to: ↑ 3 Changed 9 years ago by jri
Replying to Malte:
I just moved the "deepamehta-db" folder into a fresh 4.5 and after that migration completed, i moved the database to a fres 4.7 installation and everything works as expected (no errors are thrown).
That's good to hear :-)
Thank you for the new version and i am glad that i could help here!
See the follow-up: #872
Oh, that's revealing! The current migration mechanism fails if both applies, skipping several versions when updating, and complex dependencies exist between plugins :-(
The general workaround is indeed to install all the intermediate (major) releases consecutively, that is 4.4, 4.5, 4.6, ...
In your particular case (updating from 4.3) it might be sufficient to install 4.5, and then 4.7 as the missing System workspace is created in 4.5.
The original claim was that it is explicitly not required to install all intermediate versions when updating. Now I see why it is not fulfilled by the current migration mechanism and how it needs to be redesigned. Thank you very much for revealing that!