AnsweredAssumed Answered

Activiti 5.0.rc1 - MySQL Database creation

Question asked by akakunin on Nov 2, 2010
Latest reply on Nov 10, 2010 by jbarrez
Hi!
I'm trying to setup activiti process engine with using Spring on top of my mysql database. This database has no activiti tables yet, so, I'm using "create-if-necessary" strategy. Process Engine configure in Spring like:

   <bean id="processEngine" class="org.activiti.spring.ProcessEngineFactoryBean">
      <property name="dataSource" ref="dataSource"/>
      <property name="transactionManager" ref="transactionManager" />
      <property name="dbSchemaStrategy" value="create-if-necessary" />
   </bean>   

But during application start-up I've got error like:

Caused by: org.activiti.engine.ActivitiException: couldn't create or drop db schema
   at org.activiti.engine.impl.db.DbSqlSessionFactory.executeSchemaResource(DbSqlSessionFactory.java:311)
   at org.activiti.engine.impl.db.DbSqlSessionFactory.dbSchemaCreate(DbSqlSessionFactory.java:264)
   at org.activiti.engine.impl.ProcessEngineImpl.performSchemaOperationsCreate(ProcessEngineImpl.java:109)
   at org.activiti.engine.impl.ProcessEngineImpl$1.execute(ProcessEngineImpl.java:70)
   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.ProcessEngineImpl.<init>(ProcessEngineImpl.java:68)
   at org.activiti.engine.impl.cfg.ProcessEngineConfiguration.buildProcessEngine(ProcessEngineConfiguration.java:302)
   at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:83)
   at org.activiti.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:54)
   at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142)
   … 30 more
Caused by: com.mysql.jdbc.exceptions.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'longvarbinary,
    primary key (ID_)
)' at line 6
   at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:936)
   at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2985)
   at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1631)
   at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1723)
   at com.mysql.jdbc.Connection.execSQL(Connection.java:3250)
   at com.mysql.jdbc.Connection.execSQL(Connection.java:3179)
   at com.mysql.jdbc.Statement.execute(Statement.java:714)
   at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.execute(DelegatingStatement.java:264)
   at org.activiti.engine.impl.db.DbSqlSessionFactory.executeSchemaResource(DbSqlSessionFactory.java:293)
   … 44 more

Is it bug or I'm doing something wrong?

Outcomes