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

  1. Confirm that the ODBC datasource is configured on the machine where xDI Designer or the runtime executes.
  2. Ensure the architecture is consistent: 32-bit ODBC with 32-bit Java/xDI, or 64-bit ODBC with 64-bit Java/xDI.
  3. From a Java 7 distribution, retrieve:
    • jre/lib/rt.jar
    • jre/bin/JdbcOdbc.dll on Windows, or jre/bin/JdbcOdbc.so on Linux
  4. Create an ODBC Bridge module in xDI Designer and add these libraries to that module.
  5. Use this module when creating the metadata.
  6. 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.
  7. 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.