Revision: 4769 http://sourceforge.net/p/jump-pilot/code/4769 Author: edso Date: 2016-01-10 21:35:17 +0000 (Sun, 10 Jan 2016) Log Message: ----------- reroute jdbc loading issues into extensions about panel as a message
Modified Paths: -------------- core/trunk/src/com/vividsolutions/jump/datastore/spatialdatabases/AbstractSpatialDatabasesDSExtension.java Modified: core/trunk/src/com/vividsolutions/jump/datastore/spatialdatabases/AbstractSpatialDatabasesDSExtension.java =================================================================== --- core/trunk/src/com/vividsolutions/jump/datastore/spatialdatabases/AbstractSpatialDatabasesDSExtension.java 2016-01-10 18:47:43 UTC (rev 4768) +++ core/trunk/src/com/vividsolutions/jump/datastore/spatialdatabases/AbstractSpatialDatabasesDSExtension.java 2016-01-10 21:35:17 UTC (rev 4769) @@ -5,6 +5,7 @@ import com.vividsolutions.jump.I18N; import com.vividsolutions.jump.datastore.DataStoreDriver; import com.vividsolutions.jump.workbench.JUMPWorkbench; +import com.vividsolutions.jump.workbench.Logger; import com.vividsolutions.jump.workbench.WorkbenchContext; import com.vividsolutions.jump.workbench.plugin.Extension; import com.vividsolutions.jump.workbench.plugin.PlugInContext; @@ -14,7 +15,8 @@ */ abstract public class AbstractSpatialDatabasesDSExtension extends Extension { - static final String I18NPREFIX = AbstractSpatialDatabasesDSExtension.class.getName(); + static final String I18NPREFIX = AbstractSpatialDatabasesDSExtension.class + .getName(); protected String errorMessage = null; protected DataStoreDriver driver = null; @@ -101,6 +103,7 @@ ClassLoader pluginLoader = JUMPWorkbench.getInstance().getPlugInManager() .getClassLoader(); String msg = ""; + String others = ""; for (Map.Entry<String, String> entry : classNameToJarName.entrySet()) { String clazz = entry.getKey(); String jar = entry.getValue(); @@ -109,12 +112,18 @@ Class.forName(clazz, false, pluginLoader); } catch (ClassNotFoundException e) { msg = msg.isEmpty() ? jar : msg + ", " + jar; + } catch (Throwable t) { + others = others.isEmpty() ? t.getClass().getSimpleName() +" "+ t.getLocalizedMessage() : others + "\n" + + t.getLocalizedMessage(); } } if (!msg.isEmpty()) - msg = I18N.getMessage(I18NPREFIX - + ".missing-dependency-jars {0}", msg); + msg = I18N.getMessage(I18NPREFIX + ".missing-dependency-jars {0}", msg); + if (!others.isEmpty()) + msg += (!msg.isEmpty() ? " " : "") + + I18N.getMessage(I18NPREFIX + ".there-were-errors:-{0}", others); + return errorMessage = msg; } @@ -156,12 +165,8 @@ dsDriver); } } else { - wbc.getWorkbench() - .getFrame() - .log( - I18N.getMessage(I18NPREFIX - + ".datastore-{0}-disabled:-{1}", getName(), isAvailable()), - this.getClass()); + Logger.warn(I18N.getMessage(I18NPREFIX + ".datastore-{0}-disabled:-{1}", + getName(), isAvailable())); } } ------------------------------------------------------------------------------ Site24x7 APM Insight: Get Deep Visibility into Application Performance APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month Monitor end-to-end web transactions and take corrective actions now Troubleshoot faster and improve end-user experience. Signup Now! http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel