Error while creating tables of ActivitiBPM in Postgresql

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2015 06:41 AM
Hi,
I was trying to use Postgresql instead of H2 db, as the db for Activiti.
I have made the changes in activiti.cfg.xml as below.
and I was running DbSchemaCreate class. I get the below error and I have no clue how to move forward
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
<property name="jdbcDriver" value="org.postgresql.Driver" />
<property name="jdbcUrl" value="jdbc
ostgresql://172.160.110.121:5433/ActivitiDB" />
<property name="jdbcUsername" value="postgres" />
<property name="jdbcPassword" value="postgres" />
<property name="databaseSchemaUpdate" value="true"/>
</bean>
</beans>
Exception in thread "main" org.activiti.engine.ActivitiException: Error while building ibatis SqlSessionFactory: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.binding.BindingException: Only interfaces can be configured by the MapperFactory. Type class org.activiti.engine.impl.persistence.entity.AttachmentEntity is not an interface.
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:649)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:386)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:362)
at org.activiti.designer.test.DbSchemaCreate.main(DbSchemaCreate.java:17)
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.binding.BindingException: Only interfaces can be configured by the MapperFactory. Type class org.activiti.engine.impl.persistence.entity.AttachmentEntity is not an interface.
at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:68)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.parse(XMLConfigBuilder.java:53)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:644)
… 3 more
Caused by: org.apache.ibatis.binding.BindingException: Only interfaces can be configured by the MapperFactory. Type class org.activiti.engine.impl.persistence.entity.AttachmentEntity is not an interface.
at org.apache.ibatis.binding.MapperRegistry.addMapper(MapperRegistry.java:35)
at org.apache.ibatis.session.Configuration.addMapper(Configuration.java:320)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.bindMapperForNamespace(XMLMapperBuilder.java:236)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:40)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.mapperElement(XMLConfigBuilder.java:226)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:66)
… 5 more
Thanks,
Hari
I was trying to use Postgresql instead of H2 db, as the db for Activiti.
I have made the changes in activiti.cfg.xml as below.
and I was running DbSchemaCreate class. I get the below error and I have no clue how to move forward
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
<property name="jdbcDriver" value="org.postgresql.Driver" />
<property name="jdbcUrl" value="jdbc

<property name="jdbcUsername" value="postgres" />
<property name="jdbcPassword" value="postgres" />
<property name="databaseSchemaUpdate" value="true"/>
</bean>
</beans>
Exception in thread "main" org.activiti.engine.ActivitiException: Error while building ibatis SqlSessionFactory: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.binding.BindingException: Only interfaces can be configured by the MapperFactory. Type class org.activiti.engine.impl.persistence.entity.AttachmentEntity is not an interface.
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:649)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:386)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:362)
at org.activiti.designer.test.DbSchemaCreate.main(DbSchemaCreate.java:17)
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: org.apache.ibatis.binding.BindingException: Only interfaces can be configured by the MapperFactory. Type class org.activiti.engine.impl.persistence.entity.AttachmentEntity is not an interface.
at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:68)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.parse(XMLConfigBuilder.java:53)
at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initSqlSessionFactory(ProcessEngineConfigurationImpl.java:644)
… 3 more
Caused by: org.apache.ibatis.binding.BindingException: Only interfaces can be configured by the MapperFactory. Type class org.activiti.engine.impl.persistence.entity.AttachmentEntity is not an interface.
at org.apache.ibatis.binding.MapperRegistry.addMapper(MapperRegistry.java:35)
at org.apache.ibatis.session.Configuration.addMapper(Configuration.java:320)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.bindMapperForNamespace(XMLMapperBuilder.java:236)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:40)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.mapperElement(XMLConfigBuilder.java:226)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:66)
… 5 more
Thanks,
Hari
Labels:
- Labels:
-
Archive
2 REPLIES 2

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2015 08:38 AM
Which version of Postgres and Activiti are you using? Are you using a driver version compatible with your db version?
Best regards,
Best regards,

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-08-2015 09:29 AM
Thanks Tijs for your quick reply.
I found a different way to create the activiti tables. or may be I found the actual way to do it.
I found all the DDL statements for the tables under activiti-5.14\database folder.
I executed the db scripts and the tables got created.
Regards,
Hari.
I found a different way to create the activiti tables. or may be I found the actual way to do it.
I found all the DDL statements for the tables under activiti-5.14\database folder.
I executed the db scripts and the tables got created.
Regards,
Hari.
