3dcitydb / plugin-ade-manager

Importer/Exporter plugin to dynamically extend a 3D City Database instance to store and manage CityGML Application Domain Extensions (ADEs)
Apache License 2.0
2 stars 0 forks source link

Remove selected ADE fails without database connection #4

Closed clausnagel closed 6 years ago

clausnagel commented 6 years ago

In contrast to all other buttons on the ADE Manager tab, Remove selected ADE does not check whether a database connection is established. The operation consequently fails with the following error message in case a database is not connected:

[08:49:29 ERROR] ADE Deregistration aborted. Cause: Failed to initialize a database connection (connection = NULL).
clausnagel commented 6 years ago

The stderr also occassionally reports a NPE. Maybe this is related?

Exception in thread "Thread-6" java.lang.NullPointerException
    at org.citydb.plugins.ade_manager.gui.modules.OperationModuleView.checkAndConnectToDB(OperationModuleView.java:79)
    at org.citydb.plugins.ade_manager.gui.modules.ADERegistryPanel.registerADE(ADERegistryPanel.java:250)
    at org.citydb.plugins.ade_manager.gui.modules.ADERegistryPanel.access$100(ADERegistryPanel.java:43)
    at org.citydb.plugins.ade_manager.gui.modules.ADERegistryPanel$2$1.run(ADERegistryPanel.java:125)
yaozhihang commented 6 years ago

Thanks. Fixed in https://github.com/3dcitydb/plugin-ade-manager/commit/c1a7007e47e954cf36c06320ae0e860f32acd40f and https://github.com/3dcitydb/plugin-ade-manager/commit/7dba99c02890e4b8f9f25d055734f32d136c932d