11 Replies Latest reply on Jan 8, 2008 11:18 AM by rodosa

    Syntax error when lauching jBPM => MySQL

    riket44

      Hello,

      I've followed the installation guide for MySQL on jBPM 3.2 GA and when I try to launch the server... There is an error I don't understand, here it is :

      10:01:29,187 DEBUG [JobExecutorThread] acquiring jobs for execution...
      10:01:29,187 DEBUG [JbpmContextInfo] creating jbpm context with service factorie
      s '[tx, message, scheduler, logging, persistence, authentication]'
      10:01:29,187 DEBUG [JbpmContext] creating org.jbpm.JbpmContext@23a559
      10:01:29,187 DEBUG [DbPersistenceServiceFactory] creating persistence service
      10:01:29,187 DEBUG [DbPersistenceService] creating hibernate session
      10:01:29,187 DEBUG [DbPersistenceService] beginning hibernate transaction
      10:01:29,187 DEBUG [JobExecutorThread] querying for acquirable job...
      10:01:29,187 WARN [JDBCExceptionReporter] SQL Error: 1064, SQLState: 42000
      10:01:29,187 ERROR [JDBCExceptionReporter] You have an error in your SQL syntax;
       check the manual that corresponds to your MySQL server version for the right sy
      ntax to use near '1 job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.
      DUEDATE_ as DUEDAT' at line 1
      10:01:29,187 ERROR [JobSession] org.hibernate.exception.SQLGrammarException: cou
      ld not execute query
      10:01:29,187 DEBUG [JbpmContext] closing JbpmContext
      10:01:29,203 DEBUG [Services] closing service 'persistence': org.jbpm.persistenc
      e.db.DbPersistenceService@1ea71d4
      10:01:29,203 DEBUG [DbPersistenceService] committing hibernate transaction
      10:01:29,203 DEBUG [DbPersistenceService] closing hibernate session
      10:01:29,203 DEBUG [Services] closing service 'tx': org.jbpm.tx.TxService@d73c3c
      
      10:01:29,203 ERROR [JobExecutorThread] exception in job executor thread. waiting
       320000 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:111)
       at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56
      )
      Caused by: org.hibernate.exception.SQLGrammarException: could not execute query
       at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.j
      ava:67)
       at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelp
      er.java:43)
       at org.hibernate.loader.Loader.doList(Loader.java:2148)
       at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
       at org.hibernate.loader.Loader.list(Loader.java:2024)
       at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:392)
       at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.ja
      va:333)
       at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java
      :172)
       at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1114)
       at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
       at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.j
      ava:756)
       at org.jbpm.db.JobSession.getFirstAcquirableJob(JobSession.java:40)
       ... 2 more
      Caused by: java.sql.SQLException: You have an error in your SQL syntax; check th
      e manual that corresponds to your MySQL server version for the right syntax to u
      se near '1 job0_.ID_ as ID1_26_, job0_.VERSION_ as VERSION3_26_, job0_.DUEDATE_
      as DUEDAT' at line 1
       at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2975)
       at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1600)
       at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1695)
       at com.mysql.jdbc.Connection.execSQL(Connection.java:3026)
       at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.ja
      va:1137)
       at com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:
      1231)
       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:1669)
       at org.hibernate.loader.Loader.doQuery(Loader.java:662)
       at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Lo
      ader.java:224)
       at org.hibernate.loader.Loader.doList(Loader.java:2145)
       ... 11 more


      I hope you could help me.

      Regards,
      Richard.