POSTGRES: db error upon restarting Activiti App
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-28-2015 01:14 PM
I'm moving our Activiti applicaation to a lcoal Postgres instance. With a clean database I can connect and ACtiviti generates the appropriate tables but after the first run I get the following error attached.
INFO 7/28/15 12:06 PM:liquibase: classpath:META-INF/liquibase/db-changelog-onpremise.xml::1::tijsrademakers: Successfully released change log lock
12:06:07,016 [localhost-startStop-1] WARN org.springframework.web.context.support.AnnotationConfigWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [com/activiti/conf/DatabaseConfiguration.class]: Invocation of init method failed;
nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set classpath:META-INF/liquibase/db-changelog-onpremise.xml::1::tijsrademakers:
Reason: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE public.hibernate_sequences (sequence_name VARCHAR(255), sequence_next_hi_value INT): ERROR: relation "hibernate_sequences" already exists
Here's a list of the tables generated in the Postgres instance:
List of relations
Schema | Name | Type | Owner
——–+————————-+———-+———-
public | act_evt_log | table | activiti
public | act_evt_log_log_nr__seq | sequence | activiti
public | act_ge_bytearray | table | activiti
public | act_ge_property | table | activiti
public | act_hi_actinst | table | activiti
public | act_hi_attachment | table | activiti
public | act_hi_comment | table | activiti
public | act_hi_detail | table | activiti
public | act_hi_identitylink | table | activiti
public | act_hi_procinst | table | activiti
public | act_hi_taskinst | table | activiti
public | act_hi_varinst | table | activiti
public | act_id_group | table | activiti
public | act_id_info | table | activiti
public | act_id_membership | table | activiti
public | act_id_user | table | activiti
public | act_re_deployment | table | activiti
public | act_re_model | table | activiti
public | act_re_procdef | table | activiti
public | act_ru_event_subscr | table | activiti
public | act_ru_execution | table | activiti
public | act_ru_identitylink | table | activiti
public | act_ru_job | table | activiti
public | act_ru_task | table | activiti
public | act_ru_variable | table | activiti
public | authority | table | activiti
public | cluster_config | table | activiti
public | databasechangelog | table | activiti
public | databasechangeloglock | table | activiti
public | hibernate_sequences | table | activiti
public | master_config | table | activiti
public | server_config | table | activiti
public | user_authority | table | activiti
public | user_info | table | activiti
It looks like Activiti already generated the correct tables. Do I have something mis-configured? From the docs I've configured the activti-app.properties and activiti-admin.properties like this in the tomcat/lib dir:
datasource.driver=org.postgresql.Driver
datasource.url=jdbc
ostgresql://10.1.1.14:15432/activiti
datasource.username=activiti
datasource.password=************
security.headers.frame=false
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
#hibernate.show_sql=false
#hibernate.generate_statistics=false
I've added the postgres driver to the tomcat/lib directory and gave my activiti user ALL PRIVILEGES on the activiti database.
What version of postgres do I need to be using? I've got 9.3 and 9.4 deployed.
Thanks!
INFO 7/28/15 12:06 PM:liquibase: classpath:META-INF/liquibase/db-changelog-onpremise.xml::1::tijsrademakers: Successfully released change log lock
12:06:07,016 [localhost-startStop-1] WARN org.springframework.web.context.support.AnnotationConfigWebApplicationContext - Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [com/activiti/conf/DatabaseConfiguration.class]: Invocation of init method failed;
nested exception is liquibase.exception.MigrationFailedException: Migration failed for change set classpath:META-INF/liquibase/db-changelog-onpremise.xml::1::tijsrademakers:
Reason: liquibase.exception.DatabaseException: Error executing SQL CREATE TABLE public.hibernate_sequences (sequence_name VARCHAR(255), sequence_next_hi_value INT): ERROR: relation "hibernate_sequences" already exists
Here's a list of the tables generated in the Postgres instance:
List of relations
Schema | Name | Type | Owner
——–+————————-+———-+———-
public | act_evt_log | table | activiti
public | act_evt_log_log_nr__seq | sequence | activiti
public | act_ge_bytearray | table | activiti
public | act_ge_property | table | activiti
public | act_hi_actinst | table | activiti
public | act_hi_attachment | table | activiti
public | act_hi_comment | table | activiti
public | act_hi_detail | table | activiti
public | act_hi_identitylink | table | activiti
public | act_hi_procinst | table | activiti
public | act_hi_taskinst | table | activiti
public | act_hi_varinst | table | activiti
public | act_id_group | table | activiti
public | act_id_info | table | activiti
public | act_id_membership | table | activiti
public | act_id_user | table | activiti
public | act_re_deployment | table | activiti
public | act_re_model | table | activiti
public | act_re_procdef | table | activiti
public | act_ru_event_subscr | table | activiti
public | act_ru_execution | table | activiti
public | act_ru_identitylink | table | activiti
public | act_ru_job | table | activiti
public | act_ru_task | table | activiti
public | act_ru_variable | table | activiti
public | authority | table | activiti
public | cluster_config | table | activiti
public | databasechangelog | table | activiti
public | databasechangeloglock | table | activiti
public | hibernate_sequences | table | activiti
public | master_config | table | activiti
public | server_config | table | activiti
public | user_authority | table | activiti
public | user_info | table | activiti
It looks like Activiti already generated the correct tables. Do I have something mis-configured? From the docs I've configured the activti-app.properties and activiti-admin.properties like this in the tomcat/lib dir:
datasource.driver=org.postgresql.Driver
datasource.url=jdbc

datasource.username=activiti
datasource.password=************
security.headers.frame=false
hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect
#hibernate.show_sql=false
#hibernate.generate_statistics=false
I've added the postgres driver to the tomcat/lib directory and gave my activiti user ALL PRIVILEGES on the activiti database.
What version of postgres do I need to be using? I've got 9.3 and 9.4 deployed.
Thanks!
Labels:
- Labels:
-
Archive
10 REPLIES 10
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2015 08:27 AM
Link to the postgres virtual instance:https://wiki.postgresql.org/wiki/PostgreSQL_For_Development_With_Vagrant
