2 Replies Latest reply on Jan 23, 2008 6:58 PM by Eric Cartman

    MySQL ER_PARSE_ERROR at getFirstAcquirableJob / JobExecutorT

    Eric Cartman Newbie

      I just installed jboss-4.2.2.GA, and jbossesb-4.2.1GA, running with MySQL.

      I'm getting this annoying exception:

      2008-01-23 18:45:49,368 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
      2008-01-23 18:45:49,368 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] HQL:
      
       select token
       from org.jbpm.graph.exe.Token token
       where token.processInstance = :instance
      
      
      2008-01-23 18:45:49,368 DEBUG [org.hibernate.hql.ast.QueryTranslatorImpl] SQL: select token0_.ID_ as ID1_21_, token0_.VERSION_ as VERSION2_21_, token0_.NAME_ as NAME3_21_, token0_.START_ as START4_21_, token0_.END_ as END5_21_, token0_.NODEENTER_ as NODEENTER6_21_, token0_.NEXTLOGINDEX_ as NEXTLOGI7_21_, token0_.ISABLETOREACTIVATEPARENT_ as ISABLETO8_21_, token0_.ISTERMINATIONIMPLICIT_ as ISTERMIN9_21_, token0_.ISSUSPENDED_ as ISSUSPE10_21_, token0_.LOCK_ as LOCK11_21_, token0_.NODE_ as NODE12_21_, token0_.PROCESSINSTANCE_ as PROCESS13_21_, token0_.PARENT_ as PARENT14_21_, token0_.SUBPROCESSINSTANCE_ as SUBPROC15_21_ from JBPM_TOKEN token0_ where token0_.PROCESSINSTANCE_=?
      2008-01-23 18:45:49,368 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
      2008-01-23 18:45:49,368 DEBUG [org.hibernate.impl.SessionFactoryImpl] Checking 0 named SQL queries
      2008-01-23 18:45:49,370 DEBUG [org.jbpm.persistence.db.DbPersistenceService] creating hibernate session
      2008-01-23 18:45:49,403 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4919792227819520
      2008-01-23 18:45:49,403 DEBUG [org.jbpm.persistence.db.DbPersistenceService] beginning hibernate transaction
      2008-01-23 18:45:49,404 DEBUG [org.hibernate.transaction.JDBCTransaction] begin
      2008-01-23 18:45:49,404 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
      2008-01-23 18:45:49,404 DEBUG [org.hibernate.transaction.JDBCTransaction] current autocommit status: true
      2008-01-23 18:45:49,404 DEBUG [org.hibernate.transaction.JDBCTransaction] disabling autocommit
      2008-01-23 18:45:49,404 DEBUG [org.jbpm.persistence.db.DbPersistenceService] begun hibernate transaction org.hibernate.transaction.JDBCTransaction@1aabda3
      2008-01-23 18:45:49,405 DEBUG [org.jbpm.job.executor.JobExecutorThread] querying for acquirable job...
      2008-01-23 18:45:49,412 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
      2008-01-23 18:45:49,412 DEBUG [org.hibernate.SQL] select top ? job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_ as DUEDATE4_26_, job0_.PROCESSINSTANCE_ as PROCESSI5_26_, job0_.TOKEN_ as TOKEN6_26_, job0_.TASKINSTANCE_ as TASKINST7_26_, job0_.ISSUSPENDED_ as ISSUSPEN8_26_, job0_.ISEXCLUSIVE_ as ISEXCLUS9_26_, job0_.LOCKOWNER_ as LOCKOWNER10_26_, job0_.LOCKTIME_ as LOCKTIME11_26_, job0_.EXCEPTION_ as EXCEPTION12_26_, job0_.RETRIES_ as RETRIES13_26_, job0_.NAME_ as NAME14_26_, job0_.REPEAT_ as REPEAT15_26_, job0_.TRANSITIONNAME_ as TRANSIT16_26_, job0_.ACTION_ as ACTION17_26_, job0_.GRAPHELEMENTTYPE_ as GRAPHEL18_26_, job0_.GRAPHELEMENT_ as GRAPHEL19_26_, job0_.NODE_ as NODE20_26_, job0_.CLASS_ as CLASS2_26_ from JBPM_JOB job0_ where (job0_.LOCKOWNER_ is null or job0_.LOCKOWNER_=?) and job0_.RETRIES_>0 and job0_.DUEDATE_<=? and job0_.ISSUSPENDED_<>1 order by job0_.DUEDATE_ asc
      2008-01-23 18:45:49,414 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
      2008-01-23 18:45:49,415 DEBUG [org.hibernate.util.JDBCExceptionReporter] could not execute query [select job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_ as DUEDATE4_26_, job0_.PROCESSINSTANCE_ as PROCESSI5_26_, job0_.TOKEN_ as TOKEN6_26_, job0_.TASKINSTANCE_ as TASKINST7_26_, job0_.ISSUSPENDED_ as ISSUSPEN8_26_, job0_.ISEXCLUSIVE_ as ISEXCLUS9_26_, job0_.LOCKOWNER_ as LOCKOWNER10_26_, job0_.LOCKTIME_ as LOCKTIME11_26_, job0_.EXCEPTION_ as EXCEPTION12_26_, job0_.RETRIES_ as RETRIES13_26_, job0_.NAME_ as NAME14_26_, job0_.REPEAT_ as REPEAT15_26_, job0_.TRANSITIONNAME_ as TRANSIT16_26_, job0_.ACTION_ as ACTION17_26_, job0_.GRAPHELEMENTTYPE_ as GRAPHEL18_26_, job0_.GRAPHELEMENT_ as GRAPHEL19_26_, job0_.NODE_ as NODE20_26_, job0_.CLASS_ as CLASS2_26_ from JBPM_JOB job0_ where (job0_.LOCKOWNER_ is null or job0_.LOCKOWNER_=?) and job0_.RETRIES_>0 and job0_.DUEDATE_<=? and job0_.ISSUSPENDED_<>1 order by job0_.DUEDATE_ asc]
      com.mysql.jdbc.exceptions.jdbc4.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 '1 job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_ as DUEDAT' at line 1
       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
       at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
       at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
       at com.mysql.jdbc.Util.handleNewInstance(Util.java:353)
       at com.mysql.jdbc.Util.getInstance(Util.java:336)
       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1031)
       at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2938)
       at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1601)
       at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1710)
       at com.mysql.jdbc.Connection.execSQL(Connection.java:2436)
       at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1402)
       at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1556)
       at org.jboss.resource.adapter.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:236)
       at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:186)
       at org.hibernate.loader.Loader.getResultSet(Loader.java:1787)
       at org.hibernate.loader.Loader.doQuery(Loader.java:674)
       at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
       at org.hibernate.loader.Loader.doList(Loader.java:2220)
       at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
       at org.hibernate.loader.Loader.list(Loader.java:2099)
       at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
       at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
       at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
       at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
       at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
       at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:811)
       at org.jbpm.db.JobSession.getFirstAcquirableJob(JobSession.java:40)
       at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:114)
       at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:58)
      2008-01-23 18:45:49,415 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 1064, SQLState: 42000
      2008-01-23 18:45:49,415 ERROR [org.hibernate.util.JDBCExceptionReporter] 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 '1 job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_ as DUEDAT' at line 1
      2008-01-23 18:45:49,416 ERROR [org.jbpm.db.JobSession] org.hibernate.exception.SQLGrammarException: could not execute query
      2008-01-23 18:45:49,416 DEBUG [org.jbpm.JbpmContext] closing jbpmContext org.jbpm.JbpmContext@16e588e
      2008-01-23 18:45:49,416 DEBUG [org.jbpm.svc.Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@25a5d2
      2008-01-23 18:45:49,416 DEBUG [org.jbpm.persistence.db.DbPersistenceService] committing hibernate transaction org.hibernate.transaction.JDBCTransaction@1aabda3
      2008-01-23 18:45:49,416 DEBUG [org.hibernate.transaction.JDBCTransaction] commit
      2008-01-23 18:45:49,417 DEBUG [org.hibernate.transaction.JDBCTransaction] re-enabling autocommit
      2008-01-23 18:45:49,417 DEBUG [org.hibernate.transaction.JDBCTransaction] committed JDBC Connection
      2008-01-23 18:45:49,417 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
      2008-01-23 18:45:49,417 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
      2008-01-23 18:45:49,417 DEBUG [org.jbpm.persistence.db.DbPersistenceService] closing hibernate session
      2008-01-23 18:45:49,418 DEBUG [org.jbpm.svc.Services] closing service 'tx': org.jbpm.tx.TxService@13ceab3
      2008-01-23 18:45:49,418 ERROR [org.jbpm.job.executor.JobExecutorThread] exception in job executor thread. waiting 5000 milliseconds
      org.jbpm.JbpmException: couldn't get acquirable jobs
       at org.jbpm.db.JobSession.getFirstAcquirableJob(JobSession.java:44)
       at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:114)
       at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:58)
      Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
       at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:67)
       at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
       at org.hibernate.loader.Loader.doList(Loader.java:2223)
       at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
       at org.hibernate.loader.Loader.list(Loader.java:2099)
       at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
       at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
       at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
       at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
       at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
       at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:811)
       at org.jbpm.db.JobSession.getFirstAcquirableJob(JobSession.java:40)
       ... 2 more
      


      Please, where is the problem ? It seems to be around the syntax.

      Regards,
      Eric