Issue
In Semarchy xDI Designer, testing or reversing metadata that uses an ODBC datasource may fail with java.lang.NullPointerException.
Cause
xDI connects to ODBC datasources through the JDBC-ODBC Bridge. Java 8 and later no longer include this bridge, so the required Java 7 bridge libraries must be provided through an xDI module. The ODBC datasource, Java, and xDI Designer must also use the same 32-bit or 64-bit architecture.
Solution
- Confirm that the ODBC datasource is configured on the machine where xDI Designer or the runtime executes.
- Ensure the architecture is consistent: 32-bit ODBC with 32-bit Java/xDI, or 64-bit ODBC with 64-bit Java/xDI.
- From a Java 7 distribution, retrieve:
jre/lib/rt.jarjre/bin/JdbcOdbc.dllon Windows, orjre/bin/JdbcOdbc.soon Linux
- Create an ODBC Bridge module in xDI Designer and add these libraries to that module.
- Use this module when creating the metadata.
- Configure the metadata connection with:
- Driver:
com.semarchy.xdi.jdbc.odbc.JdbcOdbcDriverWrapper - URL:
jdbc:odbc:<alias>, where<alias>is the ODBC datasource alias defined in the operating system.
- Driver:
- Restart xDI Designer and test the connection again.
Tip: In xDI Designer, check the active JVM from Help > About Semarchy xDI Designer > Installation Details > Configuration and review the java.version, java.runtime.*, and java.library.path values.
Information: Prefer a native JDBC driver when one is available. Use ODBC mainly for technologies that only provide ODBC connectivity, such as Microsoft Access, DBF/DBase, HyperFile, or similar sources.