AnsweredAssumed Answered

Activiti Integration in Liferay

Question asked by tbednarz on Dec 27, 2010
I tried to integrate Activiti in Liferay Portal 6.0.5 following a description found at
http://www.emforge.net/web/activiti-liferay/wiki/-/wiki/Main/BPMN+2.0+for+Liferay+with+using+Activiti+Plugin

I use Tomcat 6 and PostgreSQL as database. It seems there are problems with Postgres since I got the following errors:

08:49:23,329 INFO [AutoDeployDir:167] Processing activiti-web-6.0.5.2.war
08:49:23,333 INFO [WebAutoDeployListener:43] Copying web plugin for /opt/liferay/deploy/activiti-web-6.0.5.2.war
Expanding: /opt/liferay/deploy/activiti-web-6.0.5.2.war into /opt/liferay/tomcat-6.0.26/temp/20101227084923367
Copying 1 file to /opt/liferay/tomcat-6.0.26/temp/20101227084923367/WEB-INF/classes
Copying 117 files to /opt/liferay/tomcat-6.0.26/webapps/activiti-web
Copied 28 empty directories to 1 empty directory under /opt/liferay/tomcat-6.0.26/webapps/activiti-web
Copying 1 file to /opt/liferay/tomcat-6.0.26/webapps/activiti-web
Deleting directory /opt/liferay/tomcat-6.0.26/temp/20101227084923367
08:49:30,892 INFO [WebAutoDeployListener:49] Web plugin for /opt/liferay/deploy/activiti-web-6.0.5.2.war copied successfully. Deployment will start in a few seconds.
27.12.2010 08:49:35 org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory activiti-web
08:49:35,854 INFO [ContextLoader:187] Root WebApplicationContext: initialization started
08:49:35,891 INFO [XmlWebApplicationContext:456] Refreshing Root WebApplicationContext: startup date [Mon Dec 27 08:49:35 GMT 2010]; root of context hierarchy
08:49:35,945 INFO [XmlBeanDefinitionReader:315] Loading XML bean definitions from ServletContext resource [/WEB-INF/classes/META-INF/messaging-spring.xml]
08:49:36,195 INFO [XmlBeanDefinitionReader:315] Loading XML bean definitions from ServletContext resource [/WEB-INF/classes/META-INF/activiti-spring.xml]
08:49:36,687 INFO [DefaultListableBeanFactory:549] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@af7970: defining beans [messageListener.workflow_definition,messageListener.workflow_engine,messageListener.workflow_instance,messageListener.workflow_log,messageListener.workflow_task,messagingConfigurator,liferayIdentitySession,liferayGroups,workflowInstanceManager,workflowDefinitionManager,updateStatusHandler,idMappingService,workflowTaskManager,processInstanceExtensionDao,processInstanceHistoryDao,workflowDefinitionExtensionDao,workflowEngineManager,workflowLogManager,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,dataSource,org.springframework.aop.config.internalAutoProxyCreator,org.springframework.transaction.annotation.AnnotationTransactionAttributeSource#0,org.springframework.transaction.interceptor.TransactionInterceptor#0,org.springframework.transaction.config.internalTransactionAdvisor,sharedTransactionTemplate,sessionFactory,transactionManager,com.liferay.portal.kernel.workflow.comparator.WorkflowComparatorFactoryUtil,processEngine,repositoryService,runtimeService,taskService,historyService,managementService,identityService]; root of factory hierarchy
08:49:37,060 INFO [Version:43] Hibernate Annotations 3.5.3-Final
08:49:37,078 INFO [Environment:570] Hibernate 3.5.3-Final
08:49:37,082 INFO [Environment:603] hibernate.properties not found
08:49:37,088 INFO [Environment:781] Bytecode provider name : javassist
08:49:37,095 INFO [Environment:662] using JDK 1.4 java.sql.Timestamp handling
08:49:37,296 INFO [Version:37] Hibernate Commons Annotations 3.2.0.Final
08:49:37,310 INFO [Configuration:1533] configuring from url: file:/opt/liferay/tomcat-6.0.26/webapps/activiti-web/WEB-INF/classes/hibernate.cfg.xml
08:49:37,392 INFO [Configuration:1633] Configured SessionFactory: null
08:49:37,456 INFO [AnnotationBinder:529] Binding entity from annotated class: net.emforge.activiti.entity.WorkflowDefinitionExtensionImpl
08:49:37,500 INFO [EntityBinder:501] Bind entity net.emforge.activiti.entity.WorkflowDefinitionExtensionImpl on table ACT_PROCESSDEFINITIONEXTENSION_LIFERAY
08:49:37,543 INFO [AnnotationBinder:529] Binding entity from annotated class: net.emforge.activiti.entity.ProcessInstanceExtensionImpl
08:49:37,544 INFO [EntityBinder:501] Bind entity net.emforge.activiti.entity.ProcessInstanceExtensionImpl on table ACT_PROCESSINSTANCEEXTENSION_LIFERAY
08:49:37,547 INFO [AnnotationBinder:529] Binding entity from annotated class: net.emforge.activiti.entity.ProcessInstanceHistory
08:49:37,548 INFO [EntityBinder:501] Bind entity net.emforge.activiti.entity.ProcessInstanceHistory on table ACT_WORKFLOW_LOG_LIFERAY
08:49:37,559 INFO [AnnotationConfiguration:450] Hibernate Validator not found: ignoring
08:49:37,563 INFO [AnnotationSessionFactoryBean:772] Building new Hibernate SessionFactory
08:49:37,569 INFO [HibernateSearchEventListenerRegister:75] Unable to find org.hibernate.search.event.FullTextIndexEventListener on the classpath. Hibernate Search is not enabled.
08:49:37,642 INFO [ConnectionProviderFactory:95] Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider
08:49:37,652 INFO [SettingsFactory:117] RDBMS: PostgreSQL, version: 8.4.6
08:49:37,654 INFO [SettingsFactory:118] JDBC driver: PostgreSQL Native Driver, version: PostgreSQL 8.4 JDBC3 (build 701)
08:49:37,686 INFO [Dialect:206] Using dialect: org.hibernate.dialect.PostgreSQLDialect
08:49:37,694 INFO [JdbcSupportLoader:79] Disabling contextual LOB creation as JDBC driver reported JDBC version [3] less than 4
08:49:37,696 INFO [TransactionFactoryFactory:62] Transaction strategy: org.springframework.orm.hibernate3.SpringTransactionFactory
08:49:37,698 INFO [TransactionManagerLookupFactory:80] No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
08:49:37,699 INFO [SettingsFactory:169] Automatic flush during beforeCompletion(): disabled
08:49:37,700 INFO [SettingsFactory:173] Automatic session close at end of transaction: disabled
08:49:37,700 INFO [SettingsFactory:180] JDBC batch size: 15
08:49:37,701 INFO [SettingsFactory:183] JDBC batch updates for versioned data: disabled
08:49:37,703 INFO [SettingsFactory:188] Scrollable result sets: enabled
08:49:37,704 INFO [SettingsFactory:196] JDBC3 getGeneratedKeys(): enabled
08:49:37,705 INFO [SettingsFactory:204] Connection release mode: auto
08:49:37,706 INFO [SettingsFactory:231] Default batch fetch size: 1
08:49:37,707 INFO [SettingsFactory:235] Generate SQL with comments: disabled
08:49:37,708 INFO [SettingsFactory:239] Order SQL updates by primary key: disabled
08:49:37,708 INFO [SettingsFactory:243] Order SQL inserts for batching: disabled
08:49:37,709 INFO [SettingsFactory:410] Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
08:49:37,712 INFO [ASTQueryTranslatorFactory:47] Using ASTQueryTranslatorFactory
08:49:37,713 INFO [SettingsFactory:251] Query language substitutions: {}
08:49:37,714 INFO [SettingsFactory:256] JPA-QL strict compliance: disabled
08:49:37,714 INFO [SettingsFactory:261] Second-level cache: enabled
08:49:37,715 INFO [SettingsFactory:265] Query cache: disabled
08:49:37,720 INFO [SettingsFactory:395] Cache region factory : org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge
08:49:37,721 INFO [RegionFactoryCacheProviderBridge:61] Cache provider: org.hibernate.cache.EhCacheProvider
08:49:37,725 INFO [SettingsFactory:275] Optimize cache for minimal puts: disabled
08:49:37,726 INFO [SettingsFactory:284] Structured second-level cache entries: disabled
08:49:37,732 INFO [SettingsFactory:313] Statistics: disabled
08:49:37,733 INFO [SettingsFactory:317] Deleted entity synthetic identifier rollback: disabled
08:49:37,734 INFO [SettingsFactory:332] Default entity-mode: pojo
08:49:37,735 INFO [SettingsFactory:336] Named query checking : enabled
08:49:37,735 INFO [SettingsFactory:340] Check Nullability in Core (should be disabled when Bean Validation is on): enabled
08:49:37,780 INFO [SessionFactoryImpl:199] building session factory
08:49:37,807 WARN [ConfigurationFactory:134] No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath: jar:file:/opt/liferay/tomcat-6.0.26/webapps/activiti-web/WEB-INF/lib/ehcache.jar!/ehcache-failsafe.xml
08:49:38,116 INFO [SessionFactoryObjectFactory:105] Not binding factory to JNDI, no JNDI name configured
08:49:38,124 INFO [SchemaUpdate:155] Running hbm2ddl schema update
08:49:38,125 INFO [SchemaUpdate:167] fetching database metadata
08:49:38,127 INFO [SchemaUpdate:179] updating schema
08:49:38,295 INFO [TableMetadata:65] table found: public.act_processdefinitionextension_liferay
08:49:38,296 INFO [TableMetadata:66] columns: [company_id, title, workflow_definition_extension_id, name, process_definition_id, active, version]
08:49:38,297 INFO [TableMetadata:68] foreign keys: []
08:49:38,298 INFO [TableMetadata:69] indexes: [act_processdefinitionextension_liferay_pkey]
08:49:38,332 INFO [TableMetadata:65] table found: public.act_processinstanceextension_liferay
08:49:38,334 INFO [TableMetadata:66] columns: [process_instance_id, company_id, class_pk, process_instance_extension_id, group_id, user_id, class_name]
08:49:38,336 INFO [TableMetadata:68] foreign keys: []
08:49:38,338 INFO [TableMetadata:69] indexes: [act_processinstanceextension_liferay_pkey]
08:49:38,366 INFO [TableMetadata:65] table found: public.act_workflow_log_liferay
08:49:38,368 INFO [TableMetadata:66] columns: [previoususerid, roleid, previousstate, processinstancehistoryid, workflowinstanceid, userid, state, createdate, type, previousroleid, comment]
08:49:38,370 INFO [TableMetadata:68] foreign keys: []
08:49:38,372 INFO [TableMetadata:69] indexes: [act_workflow_log_liferay_pkey]
08:49:38,374 INFO [SchemaUpdate:217] schema update complete
08:49:38,413 INFO [LiferayProcessEngineFactoryBean:51] database type is not specified - try to autodetect it
08:49:38,415 INFO [LiferayProcessEngineFactoryBean:61] DBName: PostgreSQL
08:49:38,417 INFO [LiferayProcessEngineFactoryBean:76] Set Database Type to postgres
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.postgresql.util.PSQLException: FEHLER: Relation »act_ru_job« existiert nicht
Position: 20
### The error may involve org.activiti.persistence.selectNextJobsToExecute-Inline
### The error occurred while setting parameters
### Cause: org.postgresql.util.PSQLException: FEHLER: Relation »act_ru_job« existiert nicht
Position: 20
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:61)
at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:152)
at org.activiti.engine.impl.db.DbRuntimeSession.findNextJobsToExecute(DbRuntimeSession.java:132)
at org.activiti.engine.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:47)
at org.activiti.engine.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:32)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:22)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:36)
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.activiti.engine.impl.jobexecutor.JobAcquisitionThread.run(JobAcquisitionThread.java:63)
Caused by: org.postgresql.util.PSQLException: FEHLER: Relation »act_ru_job« existiert nicht
Position: 20
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:360)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:989)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:39)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:55)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:41)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:94)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:72)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:59)
… 11 more
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.postgresql.util.PSQLException: FEHLER: Relation »act_ru_job« existiert nicht
Position: 20
### The error may involve org.activiti.persistence.selectNextJobsToExecute-Inline
### The error occurred while setting parameters
### Cause: org.postgresql.util.PSQLException: FEHLER: Relation »act_ru_job« existiert nicht
Position: 20
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:8)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:61)
at org.activiti.engine.impl.db.DbSqlSession.selectList(DbSqlSession.java:152)
at org.activiti.engine.impl.db.DbRuntimeSession.findNextJobsToExecute(DbRuntimeSession.java:132)
at org.activiti.engine.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:47)
at org.activiti.engine.impl.cmd.AcquireJobsCmd.execute(AcquireJobsCmd.java:32)
at org.activiti.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:22)
at org.activiti.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:36)
at org.activiti.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:42)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:130)
at org.activiti.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:40)
at org.activiti.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
at org.activiti.engine.impl.jobexecutor.JobAcquisitionThread.run(JobAcquisitionThread.java:63)
Caused by: org.postgresql.util.PSQLException: FEHLER: Relation »act_ru_job« existiert nicht
Position: 20
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2062)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1795)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:257)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:479)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:367)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:360)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.execute(NewProxyPreparedStatement.java:989)
at org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:39)
at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:55)
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:41)
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:94)
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:72)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:59)
… 11 more

I removed Liferays standard Workflow Engine (kaleo-web). The Liferay demo app (sevencogs) is not installed on my system.
The problems start when Postgres is found as database:

08:49:38,417 INFO [LiferayProcessEngineFactoryBean:76] Set Database Type to postgres
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.postgresql.util.PSQLException: FEHLER: Relation »act_ru_job« existiert nicht

Is postgres not supported by activiti or what am I missing?

Many thanks for you feedback.

Thomas

Outcomes