Migration to 7.9.+ fails on Oracle 12.1.x due to new index named idx_fni_activity_instance_id_kind too long 34 characters: ORA-00972: identifier is too long

marielle.spiteri's picture
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.9.0:

2019-08-13-12:19:31.688-07:00 [INFO] | Execute migration step: Add new index 'idx_fni_activity_instance_id_kind' on 'flownode_instance' table
2019-08-13-12:19:31.717-07:00 [INFO] Executing request: CREATE INDEX idx_fni_activity_instance_id_kind ON flownode_instance (activityInstanceId, kind, tenantid)
2019-08-13-12:19:31.723-07:00 [ERROR] Unexpected error occurs
java.sql.SQLSyntaxErrorException: ORA-00972: identifier is too long

    at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:494)
    at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:446)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:1054)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:623)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:213)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:37)
    at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:896)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1119)
    at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1737)
    at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1692)
    at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:300)
    at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:175)
    at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:175)
    at groovy.sql.Sql.execute(Sql.java:2339)
    at groovy.sql.Sql$execute.call(Unknown Source)
    at org.bonitasoft.migration.core.database.DatabaseHelper.addOrReplaceIndex(DatabaseHelper.groovy:429)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoCachedMethodSite.invoke(PogoMetaMethodSite.java:169)
    at org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.call(PogoMetaMethodSite.java:71)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.bonitasoft.migration.version.to7_9_0.AddIndexActivityKindOnFlownodeInstance.execute(AddIndexActivityKindOnFlownodeInstance.groovy:15)
    at org.bonitasoft.migration.version.to7_9_0.AddIndexActivityKindOnFlownodeInstance$execute.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
    at org.bonitasoft.migration.version.to7_9_0.AddIndexLogicalGroupOnFlownodeInstance$execute.call(Unknown Source)
    at org.bonitasoft.migration.core.MigrationRunner$_run_closure1$_closure7.doCall(MigrationRunner.groovy:57)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
    at groovy.lang.Closure.call(Closure.java:420)
    at groovy.lang.Closure.call(Closure.java:436)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2125)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2110)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2151)
    at org.codehaus.groovy.runtime.dgm$163.invoke(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
    at org.bonitasoft.migration.core.MigrationRunner$_run_closure1.doCall(MigrationRunner.groovy:53)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:98)
    at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
    at org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:264)
    at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1034)
    at groovy.lang.Closure.call(Closure.java:420)
    at groovy.lang.Closure.call(Closure.java:436)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2125)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2110)
    at org.codehaus.groovy.runtime.DefaultGroovyMethods.each(DefaultGroovyMethods.java:2151)
    at org.codehaus.groovy.runtime.dgm$163.invoke(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite$PojoMetaMethodSiteNoUnwrapNoCoerce.invoke(PojoMetaMethodSite.java:274)
    at org.codehaus.groovy.runtime.callsite.PojoMetaMethodSite.call(PojoMetaMethodSite.java:56)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
    at org.bonitasoft.migration.core.MigrationRunner.run(MigrationRunner.groovy:43)
    at org.bonitasoft.migration.core.MigrationRunner$run.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
    at org.bonitasoft.migration.core.Migration.run(Migration.groovy:69)
    at org.bonitasoft.migration.core.Migration$run.call(Unknown Source)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
    at com.bonitasoft.migration.core.Migration.main(Migration.groovy:10)
Caused by: oracle.jdbc.OracleDatabaseException: ORA-00972: identifier is too long

    at oracle.jdbc.driver.T4CTTIoer11.processError(T4CTTIoer11.java:498)
    ... 78 common frames omitted

Explanation

Oracle 12c (12.2.x.y) is the supported version of the database to migrate to version 7.9+.
If you are using an Oracle 12c version 12.1.0.1 and 12.1.0.2, you will need to upgrade. The migration tool will prevent you to migrate to 7.9+ on a lower version than 12.2.x.y.

Resolution - How to migrate?

To migrate to Bonita 7.9+ when using Oracle, please follow this procedure:
1. ensure your Bonita platform is shut down
2. in a first step, run Bonita migration tool to update Bonita platform to version 7.8.4, following the procedure described in the documentation online: https://documentation.bonitasoft.com/bonita/7.9/migrate-from-an-earlier-...
3. then upgrade your Oracle database server to the version 12c (it must be 12.2.x.y)
4. in a second step, run the migration tool again to migrate the platform to 7.9.0 or newer
5. once done, you can restart your updated Bonita platform
See documenation online for more details: https://documentation.bonitasoft.com/bonita/7.9/migrate-from-an-earlier-...

Notifications