cancel
Showing results for 
Search instead for 
Did you mean: 

Error in postgres database initialization in activiti-explorer

danilo1
Champ in-the-making
Champ in-the-making
I need to run a copy of activiti explorer under postgres and jboss7, to start from a clean database I delete and recreate by hand the activiti database itself.
If I use activiti via code in my project (including the activiti-engine dependencies) it works fine (creating related schema and tables).
If I try to deploy  the modified activiti-engine.war in jboss an error is raised.
For initialize the database I have be obliged to extract the initialization "postgres sql files" from the war and run them by hand.

By logs seems that the deploy stops because the postgres objects in the database do not exist, but the databaseSchemaUpdate is set to true and, by documentation,  the schema have to be created if needs.

Is it a bug or I have to set anything in the configuration files?

Thanks in advance for each suggestion.


Here are same infos:
- Postgres 9.2
- Jboss 7.1.3
- modified db.properties:
****************
db=postgres
jdbc.driver=org.postgresql.Driver
jdbc.url=jdbcSmiley Tongueostgresql://localhost:5432/activiti
jdbc.username=postgres
jdbc.password=manager
****************


Raised error in jboss log (setting an highest log level):
****************
08:04:36,778 ERROR [org.activiti.engine.impl.interceptor.CommandContext] (Thread-86) Error while closing command context: org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: relation "act_ru_job" does not exist
  Position: 36
### The error may exist in org/activiti/db/mapping/entity/Job.xml
### The error may involve org.activiti.engine.impl.persistence.entity.JobEntity.selectNextJobsToExecute-Inline
### The error occurred while setting parameters
### SQL: select       RES.*            from ACT_RU_JOB RES          LEFT OUTER JOIN ACT_RU_EXECUTION PI ON PI.ID_ = RES.PROCESS_INSTANCE_ID_     where (RES.RETRIES_ > 0)       and (RES.DUEDATE_ is null or RES.DUEDATE_ < ?)       and (RES.LOCK_OWNER_ is null or RES.LOCK_EXP_TIME_ < ?)    and (         (RES.EXECUTION_ID_ is null)      or       (PI.SUSPENSION_STATE_ = 1)       )       LIMIT ? OFFSET ?
### Cause: org.postgresql.util.PSQLException: ERROR: relation "act_ru_job" does not exist
  Position: 36
   at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23) [mybatis-3.2.2.jar:3.2.2]
   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:107) [mybatis-3.2.2.jar:3.2.2]
   at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:98) [mybatis-3.2.2.jar:3.2.2]
   at org.activiti.engine.impl.db.DbSqlSession.selectListWithRawParameter(DbSqlSession.java:286) [activiti-engine-5.14.jar:5.14]
   at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:277) [activiti-engine-5.14.jar:5.14]
   at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:272) [activiti-engine-5.14.jar:5.14]
   at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:259) [activiti-engine-5.14.jar:5.14]
   at org.activiti.engine.impl.persistence.entity.JobEntityManager.findNextJobsToExecute(JobEntityManager.java:105) [activiti-engine-5.14.jar:5.14]
   at org.activiti.engine.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:48) [activiti-engine-5.14.jar:5.14]
   at org.activiti.engine.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:33) [activiti-engine-5.14.jar:5.14]
   at org.activiti.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:24) [activiti-engine-5.14.jar:5.14]
   at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:57) [activiti-engine-5.14.jar:5.14]
   at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:47) [activiti-spring-5.14.jar:5.14]
   at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130) [spring-tx-3.1.2.RELEASE.jar:3.1.2.RELEASE]
   at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:45) [activiti-spring-5.14.jar:5.14]
   at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:31) [activiti-engine-5.14.jar:5.14]
   at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:40) [activiti-engine-5.14.jar:5.14]
   at org.activiti.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:35) [activiti-engine-5.14.jar:5.14]
   at org.activiti.engine.impl.jobexecutor.AcquireJobsRunnable.run(AcquireJobsRunnable.java:59) [activiti-engine-5.14.jar:5.14]
   at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
Caused by: org.postgresql.util.PSQLException: ERROR: relation "act_ru_job" does not exist
7 REPLIES 7

jbarrez
Star Contributor
Star Contributor
See other post where I answered.

donnahutchins
Champ in-the-making
Champ in-the-making
that's a lot of error. Well, I can't understand it myself. I'll try to recommend this problem to others so they can help.

hier

schaganti
Champ in-the-making
Champ in-the-making
jbarrez,
Can you please share the link that you are asking to refer?

Thanks
schaganti

jbarrez
Star Contributor
Star Contributor
No I'm sorry, I'm not a search machine

kapitanrum
Champ in-the-making
Champ in-the-making
I cannot find other post.

If i delete <property name="defaultAutoCommit" value="false" />, then create tables working.

kapitanrum
Champ in-the-making
Champ in-the-making
I cannot find previous post.

If i delete <code><property name="defaultAutoCommit" value="false" /></code>, then create tables working.

jbarrez
Star Contributor
Star Contributor
Could you elaborate on your problem: what are you trying to do? What is failing?