1 Reply Latest reply on Jan 6, 2007 5:15 AM by koen.aers

    hibernate error when using jbpm on tomcat

    mdemont

      well, i tried to setup jbpm (from jbpm.war) to tomcat server, and it seem to work:
      - I configured hibernate.cfg.xml to connect to mysql, create db & table & few datas (the insert lines from http://docs.jboss.com/jbpm/v3/userguide/thejbpmdatabase.html#d0e2251 )

      - and I can now connect to http://127.0.0.1:8080/jbpm/
      (I then got the same page as when I used jbpm server & hypersonic)

      - but if I try to use eclipse plugin to upload a process, it have that strange error :?
      <log...>
      Hibernate:
      /* named HQL query GraphSession.findLatestProcessDefinitionQuery */ select
      processdef0_.ID_ as ID1_4_,
      processdef0_.NAME_ as NAME2_4_,
      processdef0_.VERSION_ as VERSION3_4_,
      processdef0_.ISTERMINATIONIMPLICIT_ as ISTERMIN4_4_,
      processdef0_.STARTSTATE_ as STARTSTATE5_4_
      from
      JBPM_PROCESSDEFINITION processdef0_
      where
      processdef0_.NAME_=?
      order by
      processdef0_.VERSION_ desc limit ?
      2006-12-14 17:11:18,828 DEBUG [http-8080-Processor23] org.hibernate.jdbc.AbstractBatcher (AbstractBatcher.java:421) - preparing statement
      2006-12-14 17:11:18,875 DEBUG [http-8080-Processor23] com.mchange.v2.c3p0.impl.NewPooledConnection (NewPooledConnection.java:367) - com.mchange.v2.c3p0.impl.NewPooledConnection@1c57a6a handling a throwable.
      java.sql.SQLException: 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 '?' at line 1
      at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2851)
      at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1534)
      at com.mysql.jdbc.ServerPreparedStatement.serverPrepare(ServerPreparedStatement.java:1485)
      at com.mysql.jdbc.ServerPreparedStatement.(ServerPreparedStatement.java:151)
      at com.mysql.jdbc.Connection.prepareStatement(Connection.java:1309)
      at com.mysql.jdbc.Connection.prepareStatement(Connection.java:1281)
      at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:190)
      at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:439)
      at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:366)
      at org.hibernate.jdbc.AbstractBatcher.prepareQueryStatement(AbstractBatcher.java:105)
      at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1561)
      at org.hibernate.loader.Loader.doQuery(Loader.java:661)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:223)
      at org.hibernate.loader.Loader.doList(Loader.java:2147)
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2026)
      at org.hibernate.loader.Loader.list(Loader.java:2021)
      at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:369)
      at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:298)
      at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1020)
      at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
      at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:650)
      at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:153)
      at org.jbpm.db.GraphSession.deployProcessDefinition(GraphSession.java:67)
      at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
      at org.jbpm.webapp.servlet.UploadServlet.doDeployment(UploadServlet.java:94)
      at org.jbpm.webapp.servlet.UploadServlet.handleRequest(UploadServlet.java:81)
      at org.jbpm.webapp.servlet.UploadServlet.service(UploadServlet.java:50)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

      do you have any suggestion ?

      Mathieu