Symptom


When using a Metadata which uses an ODBC Datasource, the operation fails with a "java.lang.NullPointerException" error. 

This may concern Metadatas for technologies such as: Cassandra, Microsoft Access, ODBC Datasources...


An example of a full error message can be: 


com.stambia.md.custom.exception.ExecuteException: java.sql.SQLException: java.lang.NullPointerException

    at com.indy.jdbc.editor.JdbcConnectionNew.run(JdbcConnectionNew.java:32)

    at com.indy.md.ui.out.MdMenuUtil$2.run(MdMenuUtil.java:396)

    at org.eclipse.jface.action.Action.runWithEvent(Action.java:476)

    at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:568)

    at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:400)

    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)

    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4145)

    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1055)

    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3958)

    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3561)

    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)

    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)

    at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)

    at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)

    at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:628)

    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)

    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:563)

    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:151)

    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)

    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:199)

    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)

    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)

    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:391)

    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:246)

    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

    at java.base/java.lang.reflect.Method.invoke(Method.java:566)

    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)

    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)

    at org.eclipse.equinox.launcher.Main.run(Main.java:1501)

Caused by: java.sql.SQLException: java.lang.NullPointerException

    at com.stambia.jdbc.odbc.JdbcOdbcDriverWrapper.connect(Unknown Source)

    at com.indy.ui.sql.internal.ConnectionManager.createJDBCConnection(ConnectionManager.java:255)

    at com.indy.jdbc.editor.JDBCHelper.createJDBCConnection(JDBCHelper.java:48)

    at com.indy.jdbc.editor.JdbcConnectionNew.run(JdbcConnectionNew.java:30)

    ... 30 more

Caused by: java.lang.NullPointerException

    at sun.jdbc.odbc.JdbcOdbcDriver.initialize(JdbcOdbcDriver.java:453)

    at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:153)

    ... 34 more


Solution

- Download a Java 7 distribution and extract the 3 following files: "lib/rt.jar", "bin/JdbcOdbc.dll" and "bin/msvcr100.dll"

- Copy "rt.jar" into the directory of the Module used by your metadata

- Copy "JdbcOdbc.dll" and "msvcr100.dll" into the Designer's installation directory

- Restart the Designer


Feel free to contact the support team if you encounter issues.