AnsweredAssumed Answered

5.10->5.12 db schema migration problem

Question asked by pgadecki on Mar 19, 2013
Latest reply on Mar 21, 2013 by jbarrez
It seems that there is a problem when trying to start activiti-engine:5.12 on Oracle database with activiti:5.10 tables and schema update policy set to: ProcessEngineConfigurationImpl.DB_SCHEMA_UPDATE_DROP_CREATE

I think that it might try to perform drop for 5.12 and it fails, then while creating tables we're getting errors as tables were not dropped.
It works with schema update policy set to UPDATE.


10:51:41,084 ERROR [DbSqlSession] problem during schema drop, statement drop index ACT_IDX_MODEL_SOURCE
10:51:41,087 ERROR [DbSqlSession] problem during schema drop, statement drop index ACT_IDX_MODEL_SOURCE_EXTRA
10:51:41,089 ERROR [DbSqlSession] problem during schema drop, statement drop index ACT_IDX_MODEL_DEPLOYMENT
10:51:41,515 ERROR [DbSqlSession] problem during schema drop, statement alter table ACT_RU_EXECUTION
drop CONSTRAINT ACT_FK_EXE_PROCDEF
10:51:41,607 WARN  [loggerI18N] [com.arjuna.ats.internal.jta.recovery.xarecovery1] Local XARecoveryModule.xaRecovery  got XA exception javax.transaction.xa.XAException, XAException.XAER_RMERR
10:51:41,877 ERROR [DbSqlSession] problem during schema drop, statement alter table ACT_RE_MODEL
drop CONSTRAINT ACT_FK_MODEL_SOURCE
10:51:41,879 ERROR [DbSqlSession] problem during schema drop, statement alter table ACT_RE_MODEL
drop CONSTRAINT ACT_FK_MODEL_SOURCE_EXTRA
10:51:41,881 ERROR [DbSqlSession] problem during schema drop, statement alter table ACT_RE_MODEL
drop CONSTRAINT ACT_FK_MODEL_DEPLOYMENT
10:51:42,185 ERROR [DbSqlSession] problem during schema drop, statement drop table  ACT_RE_MODEL
10:51:42,589 INFO  [DbSqlSession] performing create on engine with resource org/activiti/db/create/activiti.oracle.create.engine.sql
10:51:45,426 INFO  [DbSqlSession] performing create on history with resource org/activiti/db/create/activiti.oracle.create.history.sql
10:51:45,428 ERROR [DbSqlSession] problem during schema create, statement create table ACT_HI_PROCINST (
ID_ NVARCHAR2(64) not null,
PROC_INST_ID_ NVARCHAR2(64) not null,
BUSINESS_KEY_ NVARCHAR2(255),
PROC_DEF_ID_ NVARCHAR2(64) not null,
START_TIME_ TIMESTAMP(6) not null,
END_TIME_ TIMESTAMP(6),
DURATION_ NUMBER(19,0),
START_USER_ID_ NVARCHAR2(255),
START_ACT_ID_ NVARCHAR2(255),
END_ACT_ID_ NVARCHAR2(255),
SUPER_PROCESS_INSTANCE_ID_ NVARCHAR2(64),
DELETE_REASON_ NVARCHAR2(2000),
primary key (ID_),
unique (PROC_INST_ID_)
)
10:51:45,431 ERROR [DbSqlSession] problem during schema create, statement create table ACT_HI_ACTINST (
ID_ NVARCHAR2(64) not null,
PROC_DEF_ID_ NVARCHAR2(64) not null,
PROC_INST_ID_ NVARCHAR2(64) not null,
EXECUTION_ID_ NVARCHAR2(64) not null,
ACT_ID_ NVARCHAR2(255) not null,
TASK_ID_ NVARCHAR2(64),
CALL_PROC_INST_ID_ NVARCHAR2(64),
ACT_NAME_ NVARCHAR2(255),
ACT_TYPE_ NVARCHAR2(255) not null,
ASSIGNEE_ NVARCHAR2(64),
START_TIME_ TIMESTAMP(6) not null,
END_TIME_ TIMESTAMP(6),
DURATION_ NUMBER(19,0),
primary key (ID_)
)
10:51:45,433 ERROR [DbSqlSession] problem during schema create, statement create table ACT_HI_TASKINST (
ID_ NVARCHAR2(64) not null,
PROC_DEF_ID_ NVARCHAR2(64),
TASK_DEF_KEY_ NVARCHAR2(255),
PROC_INST_ID_ NVARCHAR2(64),
EXECUTION_ID_ NVARCHAR2(64),
PARENT_TASK_ID_ NVARCHAR2(64),
NAME_ NVARCHAR2(255),
DESCRIPTION_ NVARCHAR2(2000),
OWNER_ NVARCHAR2(255),
ASSIGNEE_ NVARCHAR2(255),
START_TIME_ TIMESTAMP(6) not null,
CLAIM_TIME_ TIMESTAMP(6),
END_TIME_ TIMESTAMP(6),
DURATION_ NUMBER(19,0),
DELETE_REASON_ NVARCHAR2(2000),
PRIORITY_ INTEGER,
DUE_DATE_ TIMESTAMP(6),
FORM_KEY_ NVARCHAR2(255),
primary key (ID_)
)
10:51:45,596 ERROR [DbSqlSession] problem during schema create, statement create table ACT_HI_DETAIL (
ID_ NVARCHAR2(64) not null,
TYPE_ NVARCHAR2(255) not null,
PROC_INST_ID_ NVARCHAR2(64),
EXECUTION_ID_ NVARCHAR2(64),
TASK_ID_ NVARCHAR2(64),
ACT_INST_ID_ NVARCHAR2(64),
NAME_ NVARCHAR2(255) not null,
VAR_TYPE_ NVARCHAR2(64),
REV_ INTEGER,
TIME_ TIMESTAMP(6) not null,
BYTEARRAY_ID_ NVARCHAR2(64),
DOUBLE_ NUMBER(*,10),
LONG_ NUMBER(19,0),
TEXT_ NVARCHAR2(2000),
TEXT2_ NVARCHAR2(2000),
primary key (ID_)
)
10:51:45,599 ERROR [DbSqlSession] problem during schema create, statement create table ACT_HI_COMMENT (
ID_ NVARCHAR2(64) not null,
TYPE_ NVARCHAR2(255),
TIME_ TIMESTAMP(6) not null,
USER_ID_ NVARCHAR2(255),
TASK_ID_ NVARCHAR2(64),
PROC_INST_ID_ NVARCHAR2(64),
ACTION_ NVARCHAR2(255),
MESSAGE_ NVARCHAR2(2000),
FULL_MSG_ BLOB,
primary key (ID_)
)
10:51:45,601 ERROR [DbSqlSession] problem during schema create, statement create table ACT_HI_ATTACHMENT (
ID_ NVARCHAR2(64) not null,
REV_ INTEGER,
USER_ID_ NVARCHAR2(255),
NAME_ NVARCHAR2(255),
DESCRIPTION_ NVARCHAR2(2000),
TYPE_ NVARCHAR2(255),
TASK_ID_ NVARCHAR2(64),
PROC_INST_ID_ NVARCHAR2(64),
URL_ NVARCHAR2(2000),
CONTENT_ID_ NVARCHAR2(64),
primary key (ID_)
)
10:51:45,606 ERROR [DbSqlSession] problem during schema create, statement create index ACT_IDX_HI_PRO_INST_END on ACT_HI_PROCINST(END_TIME_)
10:51:45,608 ERROR [DbSqlSession] problem during schema create, statement create index ACT_IDX_HI_PRO_I_BUSKEY on ACT_HI_PROCINST(BUSINESS_KEY_)
10:51:45,611 ERROR [DbSqlSession] problem during schema create, statement create index ACT_IDX_HI_ACT_INST_START on ACT_HI_ACTINST(START_TIME_)
10:51:45,613 ERROR [DbSqlSession] problem during schema create, statement create index ACT_IDX_HI_ACT_INST_END on ACT_HI_ACTINST(END_TIME_)
10:51:45,617 ERROR [DbSqlSession] problem during schema create, statement create index ACT_IDX_HI_DETAIL_PROC_INST on ACT_HI_DETAIL(PROC_INST_ID_)
10:51:45,619 ERROR [DbSqlSession] problem during schema create, statement create index ACT_IDX_HI_DETAIL_ACT_INST on ACT_HI_DETAIL(ACT_INST_ID_)
10:51:45,622 ERROR [DbSqlSession] problem during schema create, statement create index ACT_IDX_HI_DETAIL_TIME on ACT_HI_DETAIL(TIME_)
10:51:45,624 ERROR [DbSqlSession] problem during schema create, statement create index ACT_IDX_HI_DETAIL_NAME on ACT_HI_DETAIL(NAME_)
10:51:45,626 ERROR [DbSqlSession] problem during schema create, statement create index ACT_IDX_HI_DETAIL_TASK_ID on ACT_HI_DETAIL(TASK_ID_)
10:51:45,799 ERROR [DbSqlSession] problem during schema create, statement create unique index ACT_UNIQ_HI_BUS_KEY on ACT_HI_PROCINST
(case when BUSINESS_KEY_ is null then null else PROC_DEF_ID_ end,
case when BUSINESS_KEY_ is null then null else BUSINESS_KEY_ end)
10:51:45,990 ERROR [CommandContext] Error while closing command context
org.activiti.engine.ActivitiException: couldn't create db schema: create table ACT_HI_PROCINST (
ID_ NVARCHAR2(64) not null,
PROC_INST_ID_ NVARCHAR2(64) not null,
BUSINESS_KEY_ NVARCHAR2(255),
PROC_DEF_ID_ NVARCHAR2(64) not null,
START_TIME_ TIMESTAMP(6) not null,
END_TIME_ TIMESTAMP(6),
DURATION_ NUMBER(19,0),
START_USER_ID_ NVARCHAR2(255),
START_ACT_ID_ NVARCHAR2(255),
END_ACT_ID_ NVARCHAR2(255),
SUPER_PROCESS_INSTANCE_ID_ NVARCHAR2(64),
DELETE_REASON_ NVARCHAR2(2000),
primary key (ID_),
unique (PROC_INST_ID_)
)
   at org.activiti.engine.impl.db.DbSqlSession.executeSchemaResource(DbSqlSession.java:1055)
   at org.activiti.engine.impl.db.DbSqlSession.executeSchemaResource(DbSqlSession.java:980)
   at org.activiti.engine.impl.db.DbSqlSession.executeMandatorySchemaResource(DbSqlSession.java:797)
   at org.activiti.engine.impl.db.DbSqlSession.dbSchemaCreateHistory(DbSqlSession.java:770)
   at org.activiti.engine.impl.db.DbSqlSession.dbSchemaCreate(DbSqlSession.java:757)
   at org.activiti.engine.impl.db.DbSqlSession.performSchemaOperationsProcessEngineBuild(DbSqlSession.java:1108)
   at org.activiti.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:25)
   at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:24)
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:61)
   at org.activiti.engine.impl.interceptor.JtaTransactionInterceptor.execute(JtaTransactionInterceptor.java:60)
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31)
   at org.activiti.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:76)
   
Caused by: java.sql.SQLSyntaxErrorException: ORA-00955: Es gibt bereits ein Objekt mit diesem Namen

   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
   at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)
   at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:802)
   at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:436)
   at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
   at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)
   at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:194)
   at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1000)
   at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1307)
   at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1882)
   at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1847)
   at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:301)
   at org.jboss.resource.adapter.jdbc.WrappedStatement.execute(WrappedStatement.java:91)
   at org.activiti.engine.impl.db.DbSqlSession.executeSchemaResource(DbSqlSession.java:1029)
   … 73 more
10:51:45,993 INFO  [ScopedProcessEngineManager] Activiti service  failed to initialize, see above.

Outcomes