Problem
When running the Nexus Database Migrator utility to migrate OrientDB/H2 database to Postgresql or OrientDB to H2, the migrator failed with the below exceptions:
18:40:45 [main] ERROR o.s.boot.SpringApplication - Application run failed
org.springframework.beans.factory.UnsatisfiedDependencyException:
Error creating bean with name 'batchConfig': Unsatisfied dependency expressed through method 'setProcessorConfig' parameter 0;
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'processorConfig' defined in URL [jar:file:/apps/nexus/dbmigration/nexus-db-migrator-3.70.4-02.jar!/com/sonatype/nexus/db/migrator/config/ProcessorConfig.class]: Unsatisfied dependency expressed through constructor parameter 1;
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cipherHandler' defined in class path resource [com/sonatype/nexus/db/migrator/config/CipherConfig.class]: Bean instantiation via factory method failed;
nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.sonatype.nexus.db.migrator.utils.CipherHandler]: Factory method 'cipherHandler' threw exception;
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pbeCipher' defined in class path resource [com/sonatype/nexus/db/migrator/config/CipherConfig.class]: Bean instantiation via factory method failed;
nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.sonatype.nexus.crypto.PbeCipherFactory$PbeCipher]: Factory method 'pbeCipher' threw exception;
nested exception is java.lang.SecurityException: JCE cannot authenticate the provider BC Possible causes
Most likely cause is Oracle JDK is used to run the db migrator utility. You can verify this by checking the migrator log to see what Java version is used. Example:
09:59:10 [main] INFO c.s.n.d.migrator.MigratorApplication - Java version: Oracle Corporation 1.8.0_421
Solution
Based on our help document, the database migrator requires OpenJDK.
The database migrator does not support Oracle JDK. Migrating from OrientDB requires using Java 8 or 11. You will have to upgrade the version of Java after the upgrade depending on the supported version. Consult the system requirements for the version you are upgrading to.