How to use REST API with activiti-app?

cancel
Showing results for 
Search instead for 
Did you mean: 
fcorti
Alfresco Employee

Re: How to use REST API with activiti-app?

The question here is about REST API, can you please open a new question for this?
About this issue, I might suggest to drop the DB instances and restart the server... probably there is something broken during the tests.

k82cn
Member II

Re: How to use REST API with activiti-app?

Please check the description of this question, it's about how activiti-app and activiti-rest work together. Why new ticket?

The error is still here after remove data directory of MySQL, and restart activiti server:

Caused by: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE activiti.HIBERNATE_SEQUENCES (sequence_name VARCHAR(255) NULL, sequence_next_hi_value INT NULL): Table 'hibernate_sequences' already exists
    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:61)
    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:106)
    at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1189)
    at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1172)
    at liquibase.changelog.ChangeSet.execute(ChangeSet.java:352)
    ... 31 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'hibernate_sequences' already exists
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)
    at com.mysql.jdbc.Util.getInstance(Util.java:408)
    at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:943)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)
    at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)
    at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2527)
    at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2680)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2490)
    at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2448)
    at com.mysql.jdbc.StatementImpl.executeInternal(StatementImpl.java:845)
    at com.mysql.jdbc.StatementImpl.execute(StatementImpl.java:745)
    at com.mchange.v2.c3p0.impl.NewProxyStatement.execute(NewProxyStatement.java:75)
    at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:294)
    at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:54)
    ... 35 more

fcorti
Alfresco Employee

Re: How to use REST API with activiti-app?

Why you say "remove data directory of MySQL"?
You should drop the database.

k82cn
Member II

Re: How to use REST API with activiti-app?

that means the MySQL is clear, all data, all table and databases.

fcorti
Alfresco Employee

Re: How to use REST API with activiti-app?

Mmmm... the schema should exist but empty, without tables or stuff.

k82cn
Member II

Re: How to use REST API with activiti-app?

you can consider it is a fresh MySQL.

fcorti
Alfresco Employee

Re: How to use REST API with activiti-app?

Ok, but you should create an empty schema named in the same way the properties file declare.
As an example, if your properties file contains the following setup:

jdbc.driver=com.mysql.jdbc.Driver
jdbc
.url=jdbc:mysql://localhost:3306/activiti?autoReconnect=true
jdbc
.username=activiti
jdbc
.password=activiti

You should create an empty schema on MySql named "activiti".

Then you can run the we application and it will create (automatically) all the data structures during the bootstrap.

Be sure you are defining the correct username and password too.

k82cn
Member II

Re: How to use REST API with activiti-app?

hmm... the config is right, but when activiti-app and activiti-rest point to the same database, they report table conflict. How to resolve it?

k82cn
Member II

Re: How to use REST API with activiti-app?

Any suggestion? have you config activiti-app and activiti-rest to point to the same database?

fcorti
Alfresco Employee

Re: How to use REST API with activiti-app?

Yes, sure, dozens of times.

I saw you left some requests of support also on other threads with similar issues.
As you read, the suggestion is always to work on the configuration and "drop&recreate" the schema.

Maybe you can try to re-install from the very beginning...