cancel
Showing results for 
Search instead for 
Did you mean: 

Table already exists [RESOLVED]

experimental
Champ in-the-making
Champ in-the-making
I am trying to get Activiti installed. After following the advice in this post, by deleting the runtime and test library folders, it actually downloads everything.

I receive a SQL exception that the tables already exist:

db.create.engine:
      [sql] Executing resource: org/activiti/db/create/activiti.h2.create.sql
      [sql] Failed to execute:  create table ACT_GE_PROPERTY ( NAME_ varchar(64)
, VALUE_ varchar(300), REV_ integer, primary key (NAME_) )

BUILD FAILED
C:\activiti-5.0.rc1\setup\build.xml:180: org.h2.jdbc.JdbcSQLException: Table "AC
T_GE_PROPERTY" already exists; SQL statement:
create table ACT_GE_PROPERTY ( NAME_ varchar(64), VALUE_ varchar(300), REV_ int
eger, primary key (NAME_) ) [42101-124]

I am guessing this is due to a failed installation previously. How can I clear out the h2 database?

I've also noticed that a java persists after the build script fails. I know this is h2 because if I restart the build script it says port in use and it cannot bind. (The port used for h2)

I think the demo script and toolchain is quite complicated for what you are trying to accomplish and seems to be prone to falling over if the environment has a proxy or if the installation fails.
2 REPLIES 2

frederikherema1
Star Contributor
Star Contributor
Try running 'ant db.drop' to clear the tables and run the demo.setup again, this should do the trick.

To make sure H2 is stopped, you can run 'ant demo.teardown'

frederikherema1
Star Contributor
Star Contributor
The demo-setup has been reviewed and no longer uses maven, which can cause some issues depending on the environment (proxy etc.) and render the setup in a "stale" state when downloading dependencies failed the first time.