2 Replies Latest reply on Nov 29, 2005 5:59 AM by Srikanth Ramaswamy

    org.hibernate.exception.SQLGrammarException

    Srikanth Ramaswamy Newbie

      I am trying to configure mysql instead of hypersonic database, i modified it and deploy jbpm.sar and copy it and put in jbpm deploy folder After that when i start run (i am using jbpm-starters-kit-3.1-alpha1) and getting the following error below,

      could you please help me in this regard, if you not able to find the below error, can you please explain me instruction what are configure need to be done for mysql database.


      17:05:57,328 DEBUG [LogFilter] request parameter [archive]=file://C:\DOCUME~1\srikanth\LOCALS~1\Temp\nccSplitTask.par11593.tmp
      17:05:57,359 DEBUG [PersistenceContext] beginning transaction
      17:05:57,359 DEBUG [DeployServlet] deploying archive file://C:\DOCUME~1\srikanth\LOCALS~1\Temp\nccSplitTask.par11593.tmp
      17:05:57,390 DEBUG [SchemaValidationHelper] activating schema validation...
      17:05:57,406 WARN [JpdlXmlReader] process xml warning: swimlane 'customer' does not have an assignment
      17:05:57,421 WARN [JpdlXmlReader] process xml warning: action does not have class nor ref-name attribute
      17:05:57,421 DEBUG [FileDefinition] preparing file 'processimage.jpg' for storage in the database
      17:05:57,421 DEBUG [FileDefinition] preparing file 'gpd.xml' for storage in the database
      17:05:57,421 DEBUG [ProcessArchiveDeployer] starting transaction to deploy process ProcessDefinition(nccSplitTask)
      17:05:57,421 INFO [STDOUT] Hibernate: select processdef0_.ID_ as col_0_0_ from JBPM_PROCESSDEFINITION processdef0_ where processdef0_.NAME_=? order by pro
      17:05:57,468 INFO [STDOUT] Hibernate: insert into JBPM_PROCESSDEFINITION (NAME_, VERSION_, ISTERMINATIONIMPLICIT_, STARTSTATE_) values (?, ?, ?, ?)
      17:05:57,468 INFO [STDOUT] Hibernate: select last_insert_id()
      17:05:57,468 WARN [JDBCExceptionReporter] SQL Error: -11, SQLState: 37000
      17:05:57,468 ERROR [JDBCExceptionReporter] Unexpected token: LAST_INSERT_ID in statement [select last_insert_id()]
      17:05:57,468 INFO [STDOUT] org.hibernate.exception.SQLGrammarException: could not insert: [org.jbpm.graph.def.ProcessDefinition]
      at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:65)
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
      at org.hibernate.id.AbstractPostInsertGenerator.getGenerated(AbstractPostInsertGenerator.java:56)
      at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:1984)
      at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2395)
      at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:37)
      at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:243)
      at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:269)
      at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:167)
      at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:101)
      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.saveWithGeneratedOrRequestedId(DefaultSaveOrUpdateEventListener.java:186)
      at org.hibernate.event.def.DefaultSaveEventListener.saveWithGeneratedOrRequestedId(DefaultSaveEventListener.java:33)
      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.entityIsTransient(DefaultSaveOrUpdateEventListener.java:175)
      at org.hibernate.event.def.DefaultSaveEventListener.performSaveOrUpdate(DefaultSaveEventListener.java:27)
      at org.hibernate.event.def.DefaultSaveOrUpdateEventListener.onSaveOrUpdate(DefaultSaveOrUpdateEventListener.java:70)
      at org.hibernate.impl.SessionImpl.fireSave(SessionImpl.java:523)
      at org.hibernate.impl.SessionImpl.save(SessionImpl.java:513)
      at org.hibernate.impl.SessionImpl.save(SessionImpl.java:509)
      at org.jbpm.db.GraphSession.saveProcessDefinition(GraphSession.java:51)
      at org.jbpm.jpdl.par.ProcessArchiveDeployer.deployProcessDefinition(ProcessArchiveDeployer.java:87)
      at org.jbpm.jpdl.par.ProcessArchiveDeployer.deployZipInputStream(ProcessArchiveDeployer.java:50)
      at org.jbpm.webapp.servlet.DeployServlet.doGet(DeployServlet.java:47)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:25)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jbpm.webapp.filter.PersistenceFilter.doFilter(PersistenceFilter.java:28)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jbpm.webapp.filter.ContextFilter.doFilter(ContextFilter.java:19)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:38)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
      at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: java.sql.SQLException: Unexpected token: LAST_INSERT_ID in statement [select last_insert_id()]
      at org.hsqldb.jdbc.Util.throwError(Unknown Source)
      at org.hsqldb.jdbc.jdbcPreparedStatement.(Unknown Source)
      at org.hsqldb.jdbc.jdbcConnection.prepareStatement(Unknown Source)
      at org.jboss.resource.adapter.jdbc.BaseWrapperManagedConnection.prepareStatement(BaseWrapperManagedConnection.java:312)
      at org.jboss.resource.adapter.jdbc.WrappedConnection.prepareStatement(WrappedConnection.java:172)
      at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:431)
      at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:93)
      at org.hibernate.jdbc.AbstractBatcher.prepareStatement(AbstractBatcher.java:86)
      at org.hibernate.id.AbstractPostInsertGenerator.getGenerated(AbstractPostInsertGenerator.java:39)
      ... 52 more