cancel
Showing results for 
Search instead for 
Did you mean: 

Problem during schema upgrade

mikepoole
Champ in-the-making
Champ in-the-making
I recently amended my activiti-engine jar form 5.8 to 5.9 via Maven in Eclipse designer to fix another problem I was having.

Now when I attempt to run code, I kepe getting the following:

18-Jun-2012 09:30:44 org.activiti.engine.impl.db.DbSqlSession dbSchemaUpgrade
INFO: upgrading activiti engine schema from 5.8 to 5.9
18-Jun-2012 09:30:44 org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
INFO: performing upgrade on engine with resource org/activiti/db/upgrade/activiti.h2.upgradestep.58.to.59.engine.sql
18-Jun-2012 09:30:44 org.activiti.engine.impl.db.DbSqlSession executeSchemaResource
SEVERE: problem during schema upgrade, statement 'alter table ACT_RU_EXECUTION
add SUSPENSION_STATE_ integer
org.h2.jdbc.JdbcSQLException: Duplicate column name "SUSPENSION_STATE_"; SQL statement:
alter table ACT_RU_EXECUTION
add SUSPENSION_STATE_ integer [42121-132]
   at org.h2.message.DbException.getJdbcSQLException(DbException.java:316)
   at org.h2.message.DbException.get(DbException.java:167)
   at org.h2.message.DbException.get(DbException.java:144)
…and on and on….

What have I broken? Is there anything I can do to allow the schema upgrade to happen?

Many thanks

Mike
5 REPLIES 5

frederikherema1
Star Contributor
Star Contributor
Seems like the upgrade is already done bot your database is still marked as 5.8. You should validate all upgrades have taken place (see the files you mentioned in your post) on the DB. if so, it'w safe to change the version of your engine to 5.9 (in ACT_GE_PROPERTIES).

BEWARE: this is not something you just do on a production database, make sure all upgrades have been performed correctly…

mikepoole
Champ in-the-making
Champ in-the-making
Frederick

Thanks for the reply

I'm slightly confused. How do I get to the ACT_GE_PROPERTIES table to change the version? When I do ant demo.start, I get all the version errors and therefore cannot open Activiti Explorer on localhost:8080

Regards

Mike

frederikherema1
Star Contributor
Star Contributor
In the ACT_GE_PROPERTIES there is a schema.version property, containing in your case 5.8. Be sure to check ALL upgrade-sql's have been performed before changing

mikepoole
Champ in-the-making
Champ in-the-making
But if I can't open Activiti Explorer and log in as kermit, ho can I view/amend the ACT_GE_PROPERTIES table/schema-version?

Sorry for my ignorance on this matter. I can't see this table in the h2.console

Thanks for your time

Mike

mikepoole
Champ in-the-making
Champ in-the-making
Sorry Frederik - please ignore my last post

Had forgotten to emand the h2 console URL to jdbc:h2:tcp://localhost/activiti

D'oh!

Mike