Clean install fails since IllegalStateException raised by PreCreateAssocListener
After updating to the latest commit a clean install of this plugin (removed dmx-db
folder from platform), the plugin can not be activates due to an error raised by the recently introduced guessAssocType()
implementation.
Here is the full stack trace of the clean install!
WARNUNG: ROLLBACK! (plugin "DMX Contacts")
Apr 10, 2019 8:32:48 PM systems.dmx.core.impl.PluginImpl$1 addingService
SCHWERWIEGEND: An error occurred while adding service org.osgi.service.event.EventAdmin to plugin "DMX Contacts":
java.lang.RuntimeException: Activating plugin "DMX Contacts" failed
at systems.dmx.core.impl.PluginImpl.activate(PluginImpl.java:522)
at systems.dmx.core.impl.PluginManager.activatePlugin(PluginManager.java:64)
at systems.dmx.core.impl.PluginImpl.checkRequirementsForActivation(PluginImpl.java:486)
at systems.dmx.core.impl.PluginImpl.addService(PluginImpl.java:439)
at systems.dmx.core.impl.PluginImpl.access$000(PluginImpl.java:44)
at systems.dmx.core.impl.PluginImpl$1.addingService(PluginImpl.java:388)
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.trackInitial(AbstractTracked.java:183)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:317)
at org.osgi.util.tracker.ServiceTracker.open(ServiceTracker.java:261)
at systems.dmx.core.impl.PluginImpl.openServiceTrackers(PluginImpl.java:417)
at systems.dmx.core.impl.PluginImpl.start(PluginImpl.java:119)
at systems.dmx.core.osgi.PluginActivator.start(PluginActivator.java:56)
at org.apache.felix.framework.util.SecureAction.startActivator(SecureAction.java:645)
at org.apache.felix.framework.Felix.activateBundle(Felix.java:2154)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2072)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:976)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:1175)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:1153)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.process(DirectoryWatcher.java:458)
at org.apache.felix.fileinstall.internal.DirectoryWatcher.run(DirectoryWatcher.java:263)
Caused by: java.lang.RuntimeException: Installing plugin "DMX Contacts" in the database failed
at systems.dmx.core.impl.PluginImpl.installPluginInDB(PluginImpl.java:557)
at systems.dmx.core.impl.PluginImpl.activate(PluginImpl.java:509)
... 22 more
Caused by: java.lang.RuntimeException: Running migration 1 of plugin "DMX Contacts" failed
at systems.dmx.core.impl.MigrationManager.runMigration(MigrationManager.java:117)
at systems.dmx.core.impl.MigrationManager.runPluginMigrations(MigrationManager.java:66)
at systems.dmx.core.impl.PluginImpl.installPluginInDB(PluginImpl.java:547)
... 23 more
Caused by: java.lang.RuntimeException: Reading migration file "/migrations/migration1.json" failed
at systems.dmx.core.impl.MigrationManager.readMigrationFile(MigrationManager.java:200)
at systems.dmx.core.impl.MigrationManager._runMigration(MigrationManager.java:130)
at systems.dmx.core.impl.MigrationManager.runMigration(MigrationManager.java:112)
... 25 more
Caused by: java.lang.RuntimeException: Creating topic type "dmx.contacts.phone_label" failed
at systems.dmx.core.impl.PersistenceLayer.createTopicType(PersistenceLayer.java:535)
at systems.dmx.core.impl.CoreServiceImpl.createTopicType(CoreServiceImpl.java:233)
at systems.dmx.core.impl.MigrationManager.createTopicTypes(MigrationManager.java:231)
at systems.dmx.core.impl.MigrationManager.readEntities(MigrationManager.java:213)
at systems.dmx.core.impl.MigrationManager.readEntities(MigrationManager.java:206)
at systems.dmx.core.impl.MigrationManager.readMigrationFile(MigrationManager.java:195)
... 27 more
Caused by: java.lang.RuntimeException: Associating type "dmx.contacts.phone_label" with data type "dmx.core.text" failed
at systems.dmx.core.impl.TypeStorage.storeDataType(TypeStorage.java:228)
at systems.dmx.core.impl.TypeStorage.storeType(TypeStorage.java:193)
at systems.dmx.core.impl.PersistenceLayer.createType(PersistenceLayer.java:876)
at systems.dmx.core.impl.PersistenceLayer.createTopicType(PersistenceLayer.java:528)
... 32 more
Caused by: java.lang.RuntimeException: Creating association failed, model=AssociationModelImpl {
"id": -1,
"uri": "",
"typeUri": "dmx.core.composition",
"value": "",
"childs": {},
"role1": {
"topicId": -1,
"topicUri": "dmx.contacts.phone_label",
"roleTypeUri": "dmx.core.type"
},
"role2": {
"topicId": -1,
"topicUri": "dmx.core.text",
"roleTypeUri": "dmx.core.default"
}
}
at systems.dmx.core.impl.PersistenceLayer.createAssociation(PersistenceLayer.java:377)
at systems.dmx.core.impl.PersistenceLayer.createAssociation(PersistenceLayer.java:344)
at systems.dmx.core.impl.TypeStorage.storeDataType(TypeStorage.java:223)
... 35 more
Caused by: java.lang.RuntimeException: An error occurred in the PreCreateAssociationListener of plugin "DMX Tableview"
at systems.dmx.core.impl.EventManager.dispatchEvent(EventManager.java:96)
at systems.dmx.core.impl.EventManager.fireEvent(EventManager.java:59)
at systems.dmx.core.impl.PersistenceLayer.createAssociation(PersistenceLayer.java:352)
... 37 more
Caused by: java.lang.IllegalStateException: Player ID is not set in TopicRoleModelImpl {
"topicId": -1,
"topicUri": "dmx.contacts.phone_label",
"roleTypeUri": "dmx.core.type"
}
at systems.dmx.core.impl.RoleModelImpl.getPlayerId(RoleModelImpl.java:36)
at systems.dmx.tableview.TableviewPlugin.guessAssocType(TableviewPlugin.java:96)
at systems.dmx.tableview.TableviewPlugin.preCreateAssociation(TableviewPlugin.java:89)
at systems.dmx.core.impl.CoreEvent$6.dispatch(CoreEvent.java:86)
at systems.dmx.core.impl.EventManager.dispatchEvent(EventManager.java:83)
... 39 more
Apr 10, 2019 8:32:48 PM systems.dmx.core.osgi.PluginActivator start
INFORMATION: ========== Starting plugin "DMX Config" ==========