5 Replies Latest reply on Sep 26, 2005 7:44 AM by Hannes Stillerich

    How to run jbpm-starter-kit 3.0.1 with MySQL ?

    Eric Chow Apprentice

      How to run jbpm-starter-kit 3.0.1 with MySQL ?


        • 2. Re: How to run jbpm-starter-kit 3.0.1 with MySQL ?
          Eric Chow Apprentice

          Hello,

          When I run the SQL script(mysql.create.sql) in mysql build folder that comes with the starter-kit, it just failed to create the tables:


          /*------ 26/9/2005 9:03:59 --------*/

          create table JBPM_ACTION (ID_ bigint generated by default as identity (start with 1), class char(1) not null, NAME_ varchar(255), ISPROPAGATIONALLOWED_ bit, REFERENCEDACTION_ bigint, ACTIONDELEGATION_ bigint, EVENT_ bigint, PROCESSDEFINITION_ bigint, EXPRESSION_ varchar(4000), TIMERNAME_ varchar(255), DUEDATE_ varchar(255), REPEAT_ varchar(255), TRANSITIONNAME_ varchar(255), TIMERACTION_ bigint, EVENTINDEX_ integer, EXCEPTIONHANDLER_ bigint, EXCEPTIONHANDLERINDEX_ integer, primary key (ID_));

          /* Error : "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 'generated by default as identity (start with 1), class char(1) not null, NAME_ v' at line 1" */




          • 3. Re: How to run jbpm-starter-kit 3.0.1 with MySQL ?
            Eric Chow Apprentice

            I build the jbpm.db with eclipse 3.1. But it seems something problem, I check all the SQL scripts, all the SQL scripts are same.


            • 4. Re: How to run jbpm-starter-kit 3.0.1 with MySQL ?
              Eric Chow Apprentice

              I tried to download the jboss-db-3.0.zip again and run the MySQL script. It works fine.

              The following steps I did:
              1. run the MySQL script
              2. add a mysql-ds.xml into the deploy folder
              3. change the jbpm.sar/META-INF/jboss-service.xml
              (change the DefaultDS to MySQLDS)
              4. clean up all the data in the Hypersonic (delete the default.properties and default.script)

              After completed the above steps, I start the JBoss, it seems not success.
              (but if I copy the original default.properties and default.script into the Hypersonic data folder, everything works fine again)

              Anything I missed ?


              The following is the error logs.

              11:57:53,062 WARN [JDBCExceptionReporter] SQL Error: -22, SQLState: S0002
              11:57:53,062 ERROR [JDBCExceptionReporter] Table not found: JBPM_TIMER in statem
              ent [select timer0_.ID_ as col_0_0_ from JBPM_TIMER timer0_ where timer0_.EXCEPT
              ION_ is null order by timer0_.DUEDATE_ asc]
              11:57:53,078 WARN [JDBCExceptionReporter] SQL Error: -22, SQLState: S0002
              11:57:53,078 ERROR [JDBCExceptionReporter] Table not found: JBPM_TIMER in statem
              ent [select timer0_.ID_ as col_0_0_ from JBPM_TIMER timer0_ where timer0_.EXCEPT
              ION_ is null order by timer0_.DUEDATE_ asc]
              11:57:53,078 ERROR [SchedulerSession] org.hibernate.exception.SQLGrammarExceptio
              n: could not execute query using iterate
              11:57:53,078 ERROR [JbpmSession] java.lang.NullPointerException
              11:57:53,078 ERROR [JDBCTransaction] Could not toggle autocommit
              org.hibernate.HibernateException: Session is closed
               at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:103)
               at org.hibernate.transaction.JDBCTransaction.toggleAutoCommit(JDBCTransa
              ction.java:158)
               at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.ja
              va:148)
               at org.jbpm.db.JbpmSession.handleException(JbpmSession.java:177)
               at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:106)
               at org.jbpm.db.JbpmSession.commitTransactionAndClose(JbpmSession.java:12
              9)
               at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread
              .java:121)
               at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:34)
              11:57:53,093 ERROR [JbpmSession] couldn't rollback hibernate transaction
              org.hibernate.HibernateException: Session is closed
               at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:103)
               at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.ja
              va:134)
               at org.jbpm.db.JbpmSession.handleException(JbpmSession.java:177)
               at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:106)
               at org.jbpm.db.JbpmSession.commitTransactionAndClose(JbpmSession.java:12
              9)
               at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread
              .java:121)
               at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:34)
              11:57:53,093 WARN [JbpmSession] can't pop current session: are you calling Jbpm
              Session.close() multiple times ?
              11:57:53,093 INFO [SchedulerThread] runtime exception while executing timers
              java.lang.RuntimeException: couldn't commit transaction
               at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:107)
               at org.jbpm.db.JbpmSession.commitTransactionAndClose(JbpmSession.java:12
              9)
               at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread
              .java:121)
               at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:34)
              Caused by: java.lang.NullPointerException
               at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:102)
               ... 3 more
              11:57:53,500 INFO [Http11Protocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-80
              11:57:53,781 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
              11:57:53,812 INFO [JkMain] Jk running ID=0 time=0/62 config=null
              11:57:53,828 INFO [Server] JBoss (MX MicroKernel) [4.0.2 (build: CVSTag=JBoss_4
              _0_2 date=200505022023)] Started in 28s:344ms
              11:57:58,109 DEBUG [SchedulerThread] checking for timers
              11:57:58,109 WARN [JDBCExceptionReporter] SQL Error: -22, SQLState: S0002
              11:57:58,109 ERROR [JDBCExceptionReporter] Table not found: JBPM_TIMER in statem
              ent [select timer0_.ID_ as col_0_0_ from JBPM_TIMER timer0_ where timer0_.EXCEPT
              ION_ is null order by timer0_.DUEDATE_ asc]
              11:57:58,109 WARN [JDBCExceptionReporter] SQL Error: -22, SQLState: S0002
              11:57:58,109 ERROR [JDBCExceptionReporter] Table not found: JBPM_TIMER in statem
              ent [select timer0_.ID_ as col_0_0_ from JBPM_TIMER timer0_ where timer0_.EXCEPT
              ION_ is null order by timer0_.DUEDATE_ asc]
              11:57:58,109 ERROR [SchedulerSession] org.hibernate.exception.SQLGrammarExceptio
              n: could not execute query using iterate
              11:57:58,109 ERROR [JbpmSession] java.lang.NullPointerException
              11:57:58,109 ERROR [JDBCTransaction] Could not toggle autocommit
              org.hibernate.HibernateException: Session is closed
               at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:103)
               at org.hibernate.transaction.JDBCTransaction.toggleAutoCommit(JDBCTransa
              ction.java:158)
               at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.ja
              va:148)
               at org.jbpm.db.JbpmSession.handleException(JbpmSession.java:177)
               at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:106)
               at org.jbpm.db.JbpmSession.commitTransactionAndClose(JbpmSession.java:12
              9)
               at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread
              .java:121)
               at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:34)
              11:57:58,109 ERROR [JbpmSession] couldn't rollback hibernate transaction
              org.hibernate.HibernateException: Session is closed
               at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:103)
               at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.ja
              va:134)
               at org.jbpm.db.JbpmSession.handleException(JbpmSession.java:177)
               at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:106)
               at org.jbpm.db.JbpmSession.commitTransactionAndClose(JbpmSession.java:12
              9)
               at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread
              .java:121)
               at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:34)
              11:57:58,109 WARN [JbpmSession] can't pop current session: are you calling Jbpm
              Session.close() multiple times ?
              11:57:58,109 INFO [SchedulerThread] runtime exception while executing timers
              java.lang.RuntimeException: couldn't commit transaction
               at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:107)
               at org.jbpm.db.JbpmSession.commitTransactionAndClose(JbpmSession.java:12
              9)
               at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread
              .java:121)
               at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:34)
              Caused by: java.lang.NullPointerException
               at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:102)
               ... 3 more
              11:58:03,109 DEBUG [SchedulerThread] checking for timers
              11:58:03,109 WARN [JDBCExceptionReporter] SQL Error: -22, SQLState: S0002
              11:58:03,109 ERROR [JDBCExceptionReporter] Table not found: JBPM_TIMER in statem
              ent [select timer0_.ID_ as col_0_0_ from JBPM_TIMER timer0_ where timer0_.EXCEPT
              ION_ is null order by timer0_.DUEDATE_ asc]
              11:58:03,109 WARN [JDBCExceptionReporter] SQL Error: -22, SQLState: S0002
              11:58:03,109 ERROR [JDBCExceptionReporter] Table not found: JBPM_TIMER in statem
              ent [select timer0_.ID_ as col_0_0_ from JBPM_TIMER timer0_ where timer0_.EXCEPT
              ION_ is null order by timer0_.DUEDATE_ asc]
              11:58:03,109 ERROR [SchedulerSession] org.hibernate.exception.SQLGrammarExceptio
              n: could not execute query using iterate
              11:58:03,109 ERROR [JbpmSession] java.lang.NullPointerException
              11:58:03,109 ERROR [JDBCTransaction] Could not toggle autocommit
              org.hibernate.HibernateException: Session is closed
               at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:103)
               at org.hibernate.transaction.JDBCTransaction.toggleAutoCommit(JDBCTransa
              ction.java:158)
               at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.ja
              va:148)
               at org.jbpm.db.JbpmSession.handleException(JbpmSession.java:177)
               at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:106)
               at org.jbpm.db.JbpmSession.commitTransactionAndClose(JbpmSession.java:12
              9)
               at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread
              .java:121)
               at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:34)
              11:58:03,109 ERROR [JbpmSession] couldn't rollback hibernate transaction
              org.hibernate.HibernateException: Session is closed
               at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:103)
               at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.ja
              va:134)
               at org.jbpm.db.JbpmSession.handleException(JbpmSession.java:177)
               at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:106)
               at org.jbpm.db.JbpmSession.commitTransactionAndClose(JbpmSession.java:12
              9)
               at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread
              .java:121)
               at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:34)
              11:58:03,109 WARN [JbpmSession] can't pop current session: are you calling Jbpm
              Session.close() multiple times ?
              11:58:03,109 INFO [SchedulerThread] runtime exception while executing timers
              java.lang.RuntimeException: couldn't commit transaction
               at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:107)
               at org.jbpm.db.JbpmSession.commitTransactionAndClose(JbpmSession.java:12
              9)
               at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread
              .java:121)
               at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:34)
              Caused by: java.lang.NullPointerException
               at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:102)
               ... 3 more
              11:58:08,109 DEBUG [SchedulerThread] checking for timers
              11:58:08,109 WARN [JDBCExceptionReporter] SQL Error: -22, SQLState: S0002
              11:58:08,109 ERROR [JDBCExceptionReporter] Table not found: JBPM_TIMER in statem
              ent [select timer0_.ID_ as col_0_0_ from JBPM_TIMER timer0_ where timer0_.EXCEPT
              ION_ is null order by timer0_.DUEDATE_ asc]
              11:58:08,109 WARN [JDBCExceptionReporter] SQL Error: -22, SQLState: S0002
              11:58:08,109 ERROR [JDBCExceptionReporter] Table not found: JBPM_TIMER in statem
              ent [select timer0_.ID_ as col_0_0_ from JBPM_TIMER timer0_ where timer0_.EXCEPT
              ION_ is null order by timer0_.DUEDATE_ asc]
              11:58:08,109 ERROR [SchedulerSession] org.hibernate.exception.SQLGrammarExceptio
              n: could not execute query using iterate
              11:58:08,109 ERROR [JbpmSession] java.lang.NullPointerException
              11:58:08,109 ERROR [JDBCTransaction] Could not toggle autocommit
              org.hibernate.HibernateException: Session is closed
               at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:103)
               at org.hibernate.transaction.JDBCTransaction.toggleAutoCommit(JDBCTransa
              ction.java:158)
               at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.ja
              va:148)
               at org.jbpm.db.JbpmSession.handleException(JbpmSession.java:177)
               at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:106)
               at org.jbpm.db.JbpmSession.commitTransactionAndClose(JbpmSession.java:12
              9)
               at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread
              .java:121)
               at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:34)
              11:58:08,109 ERROR [JbpmSession] couldn't rollback hibernate transaction
              org.hibernate.HibernateException: Session is closed
               at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:103)
               at org.hibernate.transaction.JDBCTransaction.rollback(JDBCTransaction.ja
              va:134)
               at org.jbpm.db.JbpmSession.handleException(JbpmSession.java:177)
               at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:106)
               at org.jbpm.db.JbpmSession.commitTransactionAndClose(JbpmSession.java:12
              9)
               at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread
              .java:121)
               at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:34)
              11:58:08,125 WARN [JbpmSession] can't pop current session: are you calling Jbpm
              Session.close() multiple times ?
              11:58:08,125 INFO [SchedulerThread] runtime exception while executing timers
              java.lang.RuntimeException: couldn't commit transaction
               at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:107)
               at org.jbpm.db.JbpmSession.commitTransactionAndClose(JbpmSession.java:12
              9)
               at org.jbpm.scheduler.impl.SchedulerThread.executeTimers(SchedulerThread
              .java:121)
               at org.jbpm.scheduler.impl.SchedulerThread.run(SchedulerThread.java:34)
              Caused by: java.lang.NullPointerException
               at org.jbpm.db.JbpmSession.commitTransaction(JbpmSession.java:102)
               ... 3 more
              
              
              
              



              • 5. Re: How to run jbpm-starter-kit 3.0.1 with MySQL ?
                Hannes Stillerich Newbie

                Hi,
                I am really no expert, but is the schema already created? Because of the:

                11:57:53,062 ERROR [JDBCExceptionReporter] Table not found: JBPM_TIMER in statement [select timer0_.ID_ as col_0_0_ from JBPM_TIMER timer0_ where timer0_.EXCEPT
                ION_ is null order by timer0_.DUEDATE_ asc]

                The call:
                jbpmSessionFactory.getJbpmSchema().createSchema() prepares the db.