Migration to 7.8+ fails on my Oracle 12.1.0.2 Database with error: Unexpected error occurs java.lang.NullPointerException: null

marielle.spiteri
Blog Categories: 

What's wrong?

These error message can be found in the migration log when the tool reach the following step moving to version 7.8.0:

[INFO] | Execute migration step: Add Kerberos default configuration
[ERROR] Unexpected error occurs
java.lang.NullPointerException: null
    at oracle.jdbc.driver.AutoKeyInfo.initMetaDataKeyFlag(AutoKeyInfo.java:404)
    at oracle.jdbc.driver.AutoKeyInfo.initMetaData(AutoKeyInfo.java:392)
    at oracle.jdbc.driver.OracleReturnResultSet.getMetaData(OracleReturnResultSet.java:77)
    at org.apache.commons.dbcp2.DelegatingResultSet.getMetaData(DelegatingResultSet.java:663)
    at org.apache.commons.dbcp2.DelegatingResultSet.getMetaData(DelegatingResultSet.java:663)
    at groovy.sql.Sql.calculateKeys(Sql.java:4366)
    at groovy.sql.Sql.executeInsert(Sql.java:2667)
    at groovy.sql.Sql.executeInsert(Sql.java:2867)
    at groovy.sql.Sql$executeInsert$4.call(Unknown Source)
...

Explanation

The JDBC driver that you are using for the migration tool is not compatible with your Oracle database version.

How to verify your driver version

On linux, run the following command on the jar you use in the migration tool:
java -jar bonita-migration-distrib-sp-2.4X.X/lib/ojdbc7.jar

The result will most likely be:
Oracle 12.1.0.1.0 JDBC 4.1 compiled with JDK7 on Thu_Apr_04_15:09:24_PDT_2013

Default Connection Properties Resource Tue Aug 13 14:57:18 PDT 2019

On linux, run the following command on the jar you use in the migration tool:
sha1sum bonita-migration-distrib-sp-2.4X.X/lib/ojdbc7.jar

The result will most likely be:
a2348e4944956fac05235f7cd5d30bf872afb157

Resolution

If you are using Oracle version 12.1.0.2, you need to use the Driver for this version, you can find it here: https://www.oracle.com/technetwork/database/features/jdbc/default-228047...

ojdbc7.jar (3,698,857 bytes) -
(SHA1 Checksum: 7c9b5984b2c1e32e7c8cf3331df77f31e89e24c2) Certified with JDK7 and JDK8;

Notifications