4 Replies Latest reply on Aug 29, 2007 7:33 PM by Ronald van Kuijk

    Unable to insert new process definitions.

    tom Newbie

      I am trying to insert process definitions into a MySQL database from a stand-alone application.

      The process definitions are good as they install from JBoss. The problem seems to be with the persistence configuration but I can't see what is going wrong.

      I can also contact the database to retrieve process definitions.

      org.jbpm.JbpmException: problem closing services {persistence=org.jbpm.persistence.JbpmPersistenceException: couldn't commit hibernate session}
       [java] at org.jbpm.svc.Services.close(Services.java:223)
       [java] at org.jbpm.JbpmContext.close(JbpmContext.java:139)
      ....
       Caused by: org.jbpm.persistence.JbpmPersistenceException: couldn't commit hibernate session
       [java] at org.jbpm.persistence.db.DbPersistenceService.close(DbPersistenceService.java:172)
       [java] at org.jbpm.svc.Services.close(Services.java:211)
       [java] ... 22 more
       [java] Caused by: org.hibernate.exception.DataException: could not insert: [org.jbpm.graph.node.StartState]
       [java] at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:77)
       [java]
      ...
       Caused by: java.sql.SQLException: Data too long for column 'ISASYNC_' at row 1
       [java] at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2847)
       [java] at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1531)
       [java] at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1622)
       [java] at com.mysql.jdbc.Connection.execSQL(Connection.java:2376)
       [java] at com.mysql.jdbc.Connection.execSQL(Connection.java:2297)
       [java] at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1860)
       [java] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1957)
       [java] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1880)
       [java] at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:1741)
       [java] at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:73)
       [java] at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:33)
       [java] ... 53 more
      


      The jbpm.cfg.xml file;

      <jbpm-configuration>
       <jbpm-context>
       <service name='persistence' factory='org.jbpm.persistence.db.DbPersistenceServiceFactory' />
       </jbpm-context>
       <string name="resource.hibernate.cfg.xml" value="jbpm-hibernate.xml" />
      </jbpm-configuration>
      


      and the referenced hibernate config file;

      <hibernate-configuration>
      
       <session-factory>
      
       <!-- jdbc connection properties -->
      
       <property name="hibernate.cache.use_second_level_cache">false</property>
       <property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
      
       <!-- connection settings for stand-alone application -->
       <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
       <!-- <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property> -->
       <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
       <property name="hibernate.connection.url">jdbc:mysql://localhost/jbpmtest</property>
       <property name="hibernate.connection.username">jbpmuser</property>
       <property name="hibernate.connection.password">password</property>
       <property name="hibernate.connection.pool_size">3</property>
      
      
       <!-- other hibernate properties -->
       <property name="hibernate.show_sql">false</property>
       <property name="hibernate.format_sql">true</property>
       <property name="hibernate.use_sql_comments">true</property>
      
      <!-- Enable Hibernate's automatic session context management -->
       <property name="current_session_context_class">thread</property>
      


      Any help would be greatly appreciated. Thanks