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

marielle.spiteri's picture
marielle.spiteri
Blog Categories: 

Component: Bonita Migration Tool | Version: 2.4x+

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

On windows, use the Microsoft File Checksum Integrity Verifier tool: https://www.microsoft.com/en-us/download/details.aspx?id=11533

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-2280470.html

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

And now it's time to restart your migration from scratch:
- Restore your database from your backup made when you followed the migration procedure.
- And then redo the migration without errors!
- Congratulations!

Comments

Submitted by Pierre-yves Monnet on Sat, 02/01/2020 - 18:47

Hello,

Thanks a lot, Marielle, this is exactly what we face, and this is the exact solution!

Notifications