4 Replies Latest reply on Apr 15, 2008 10:32 AM by marcotizzano

    Getting SQLGrammarException when installing jBPM BPEL 1.1-Be

    qliu

      I am getting the following SQLGrammarException when installing jBPM BPEL 1.1-Beta3:
      (I am using jBoss 4.0.5.GA and jbpm-bpel-1.1-Beta3)
      ===============================================================================
      10:29:17,820 WARN [JDBCExceptionReporter] SQL Error: 923, SQLState: 42000
      10:29:17,820 ERROR [JDBCExceptionReporter] ORA-00923: FROM keyword not found whe
      re expected

      10:29:17,820 ERROR [JobSession] org.hibernate.exception.SQLGrammarException: cou
      ld not execute query
      10:29:17,835 ERROR [JobExecutorThread] exception in job executor thread. waiting
      60000 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
      )
      ===============================================================================

      And the server log file shows the following:
      ===============================================================================
      2007-03-16 10:29:17,508 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
      2007-03-16 10:29:17,508 DEBUG [org.hibernate.hql.ast.ErrorCounter] throwQueryException() : no errors
      2007-03-16 10:29:17,508 DEBUG [org.hibernate.impl.SessionFactoryImpl] Checking 0 named SQL queries
      2007-03-16 10:29:17,524 DEBUG [org.jbpm.persistence.db.DbPersistenceService] creating hibernate session
      2007-03-16 10:29:17,586 DEBUG [org.hibernate.impl.SessionImpl] opened session at timestamp: 4808974981218304
      2007-03-16 10:29:17,586 DEBUG [org.jbpm.persistence.db.DbPersistenceService] beginning hibernate transaction
      2007-03-16 10:29:17,586 DEBUG [org.hibernate.transaction.JDBCTransaction] begin
      2007-03-16 10:29:17,586 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
      2007-03-16 10:29:17,586 DEBUG [org.hibernate.transaction.JDBCTransaction] current autocommit status: true
      2007-03-16 10:29:17,586 DEBUG [org.hibernate.transaction.JDBCTransaction] disabling autocommit
      2007-03-16 10:29:17,586 DEBUG [org.jbpm.job.executor.JobExecutorThread] querying for acquirable job...
      2007-03-16 10:29:17,602 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
      2007-03-16 10:29:17,602 DEBUG [org.hibernate.SQL] select top ? job0_.ID_ as ID1_25_, job0_.VERSION_ as VERSION3_25_, job0_.DUEDATE_ as DUEDATE4_25_, job0_.PROCESSINSTANCE_ as PROCESSI5_25_, job0_.TOKEN_ as TOKEN6_25_, job0_.TASKINSTANCE_ as TASKINST7_25_, job0_.ISSUSPENDED_ as ISSUSPEN8_25_, job0_.ISEXCLUSIVE_ as ISEXCLUS9_25_, job0_.LOCKOWNER_ as LOCKOWNER10_25_, job0_.LOCKTIME_ as LOCKTIME11_25_, job0_.EXCEPTION_ as EXCEPTION12_25_, job0_.RETRIES_ as RETRIES13_25_, job0_.NAME_ as NAME14_25_, job0_.REPEAT_ as REPEAT15_25_, job0_.TRANSITIONNAME_ as TRANSIT16_25_, job0_.ACTION_ as ACTION17_25_, job0_.GRAPHELEMENTTYPE_ as GRAPHEL18_25_, job0_.GRAPHELEMENT_ as GRAPHEL19_25_, job0_.NODE_ as NODE20_25_, job0_.CLASS_ as CLASS2_25_ 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
      2007-03-16 10:29:17,788 DEBUG [org.hibernate.loader.hql.QueryLoader] bindNamedParameters() JbpmJobExecutor:192.168.1.36:1 -> lockOwner [2]
      2007-03-16 10:29:17,788 DEBUG [org.hibernate.loader.hql.QueryLoader] bindNamedParameters() Fri Mar 16 10:29:17 PDT 2007 -> now [3]
      2007-03-16 10:29:17,820 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
      2007-03-16 10:29:17,820 DEBUG [org.hibernate.util.JDBCExceptionReporter] could not execute query [select job0_.ID_ as ID1_25_, job0_.VERSION_ as VERSION3_25_, job0_.DUEDATE_ as DUEDATE4_25_, job0_.PROCESSINSTANCE_ as PROCESSI5_25_, job0_.TOKEN_ as TOKEN6_25_, job0_.TASKINSTANCE_ as TASKINST7_25_, job0_.ISSUSPENDED_ as ISSUSPEN8_25_, job0_.ISEXCLUSIVE_ as ISEXCLUS9_25_, job0_.LOCKOWNER_ as LOCKOWNER10_25_, job0_.LOCKTIME_ as LOCKTIME11_25_, job0_.EXCEPTION_ as EXCEPTION12_25_, job0_.RETRIES_ as RETRIES13_25_, job0_.NAME_ as NAME14_25_, job0_.REPEAT_ as REPEAT15_25_, job0_.TRANSITIONNAME_ as TRANSIT16_25_, job0_.ACTION_ as ACTION17_25_, job0_.GRAPHELEMENTTYPE_ as GRAPHEL18_25_, job0_.GRAPHELEMENT_ as GRAPHEL19_25_, job0_.NODE_ as NODE20_25_, job0_.CLASS_ as CLASS2_25_ 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]
      java.sql.SQLException: ORA-00923: FROM keyword not found where expected

      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
      at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
      at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
      at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:503)
      at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:965)
      at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:535)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1051)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
      at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3026)
      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:1668)
      at org.hibernate.loader.Loader.doQuery(Loader.java:662)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
      at org.hibernate.loader.Loader.doList(Loader.java:2144)
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2028)
      at org.hibernate.loader.Loader.list(Loader.java:2023)
      at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:393)
      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:780)
      at org.jbpm.db.JobSession.getFirstAcquirableJob(JobSession.java:40)
      at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:111)
      at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:56)
      2007-03-16 10:29:17,820 WARN [org.hibernate.util.JDBCExceptionReporter] SQL Error: 923, SQLState: 42000
      2007-03-16 10:29:17,820 ERROR [org.hibernate.util.JDBCExceptionReporter] ORA-00923: FROM keyword not found where expected

      2007-03-16 10:29:17,820 ERROR [org.jbpm.db.JobSession] org.hibernate.exception.SQLGrammarException: could not execute query
      2007-03-16 10:29:17,835 DEBUG [org.jbpm.JbpmContext] closing JbpmContext
      2007-03-16 10:29:17,835 DEBUG [org.jbpm.svc.Services] closing service 'persistence': org.jbpm.bpel.persistence.db.DbPersistenceService@20ea6c
      2007-03-16 10:29:17,835 DEBUG [org.jbpm.persistence.db.DbPersistenceService] committing hibernate transaction
      2007-03-16 10:29:17,835 DEBUG [org.hibernate.transaction.JDBCTransaction] commit
      2007-03-16 10:29:17,835 DEBUG [org.hibernate.transaction.JDBCTransaction] re-enabling autocommit
      2007-03-16 10:29:17,835 DEBUG [org.hibernate.transaction.JDBCTransaction] committed JDBC Connection
      2007-03-16 10:29:17,835 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
      2007-03-16 10:29:17,835 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
      2007-03-16 10:29:17,835 DEBUG [org.jbpm.persistence.db.DbPersistenceService] closing hibernate session
      2007-03-16 10:29:17,835 DEBUG [org.jbpm.svc.Services] closing service 'tx': org.jbpm.tx.TxService@64af0f
      2007-03-16 10:29:17,835 ERROR [org.jbpm.job.executor.JobExecutorThread] exception in job executor thread. waiting 60000 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.java:67)
      at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
      at org.hibernate.loader.Loader.doList(Loader.java:2147)
      at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2028)
      at org.hibernate.loader.Loader.list(Loader.java:2023)
      at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:393)
      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:780)
      at org.jbpm.db.JobSession.getFirstAcquirableJob(JobSession.java:40)
      ... 2 more
      Caused by: java.sql.SQLException: ORA-00923: FROM keyword not found where expected

      at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
      at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
      at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
      at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
      at oracle.jdbc.driver.T4CPreparedStatement.execute_for_describe(T4CPreparedStatement.java:503)
      at oracle.jdbc.driver.OracleStatement.execute_maybe_describe(OracleStatement.java:965)
      at oracle.jdbc.driver.T4CPreparedStatement.execute_maybe_describe(T4CPreparedStatement.java:535)
      at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1051)
      at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
      at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3026)
      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:1668)
      at org.hibernate.loader.Loader.doQuery(Loader.java:662)
      at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
      at org.hibernate.loader.Loader.doList(Loader.java:2144)
      ... 11 more

      ===============================================================================

      Please help.

      Thanks.

      Qingdi

        • 1. Re: Getting SQLGrammarException when installing jBPM BPEL 1.
          aguizar

          The query looks good to me:

          select
           job0_.ID_ as ID1_25_,
           job0_.VERSION_ as VERSION3_25_,
           job0_.DUEDATE_ as DUEDATE4_25_,
           job0_.PROCESSINSTANCE_ as PROCESSI5_25_,
           job0_.TOKEN_ as TOKEN6_25_,
           job0_.TASKINSTANCE_ as TASKINST7_25_,
           job0_.ISSUSPENDED_ as ISSUSPEN8_25_,
           job0_.ISEXCLUSIVE_ as ISEXCLUS9_25_,
           job0_.LOCKOWNER_ as LOCKOWNER10_25_,
           job0_.LOCKTIME_ as LOCKTIME11_25_,
           job0_.EXCEPTION_ as EXCEPTION12_25_,
           job0_.RETRIES_ as RETRIES13_25_,
           job0_.NAME_ as NAME14_25_,
           job0_.REPEAT_ as REPEAT15_25_,
           job0_.TRANSITIONNAME_ as TRANSIT16_25_,
           job0_.ACTION_ as ACTION17_25_,
           job0_.GRAPHELEMENTTYPE_ as GRAPHEL18_25_,
           job0_.GRAPHELEMENT_ as GRAPHEL19_25_,
           job0_.NODE_ as NODE20_25_,
           job0_.CLASS_ as CLASS2_25_
          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


          so the problem must lie in the combination of database, JDBC driver and Hibernate dialect. Use org.hibernate.dialect.OracleDialect for Oracle 8 and earlier, org.hibernate.dialect.Oracle9Dialect for Oracle 9 and 10. If you are already doing so, please tell us your database/driver versions and connection settings.

          • 2. Re: Getting SQLGrammarException when installing jBPM BPEL 1.
            qliu

            Thanks for your quick response. There must be sth wrong with my setup. I am new to JBoss, please bear with me.

            After I changed the property "hibernate.dialect" to org.hibernate.dialect.Oracle9Dialect, I am getting the error:

            2007-03-16 14:29:31,657 DEBUG [org.hibernate.SQL] select * from ( select job0_.ID_ as ID1_25_, job0_.VERSION_ as VERSION3_25_, job0_.DUEDATE_ as DUEDATE4_25_, job0_.PROCESSINSTANCE_ as PROCESSI5_25_, job0_.TOKEN_ as TOKEN6_25_, job0_.TASKINSTANCE_ as TASKINST7_25_, job0_.ISSUSPENDED_ as ISSUSPEN8_25_, job0_.ISEXCLUSIVE_ as ISEXCLUS9_25_, job0_.LOCKOWNER_ as LOCKOWNER10_25_, job0_.LOCKTIME_ as LOCKTIME11_25_, job0_.EXCEPTION_ as EXCEPTION12_25_, job0_.RETRIES_ as RETRIES13_25_, job0_.NAME_ as NAME14_25_, job0_.REPEAT_ as REPEAT15_25_, job0_.TRANSITIONNAME_ as TRANSIT16_25_, job0_.ACTION_ as ACTION17_25_, job0_.GRAPHELEMENTTYPE_ as GRAPHEL18_25_, job0_.GRAPHELEMENT_ as GRAPHEL19_25_, job0_.NODE_ as NODE20_25_, job0_.CLASS_ as CLASS2_25_ 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 ) where rownum <= ?
            2007-03-16 14:29:31,657 DEBUG [org.hibernate.loader.hql.QueryLoader] bindNamedParameters() JbpmJobExecutor:192.168.1.36:1 -> lockOwner [1]
            2007-03-16 14:29:31,657 DEBUG [org.hibernate.loader.hql.QueryLoader] bindNamedParameters() Fri Mar 16 14:29:31 PDT 2007 -> now [2]
            2007-03-16 14:29:31,688 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
            2007-03-16 14:29:31,688 DEBUG [org.hibernate.util.JDBCExceptionReporter] could not execute query [select job0_.ID_ as ID1_25_, job0_.VERSION_ as VERSION3_25_, job0_.DUEDATE_ as DUEDATE4_25_, job0_.PROCESSINSTANCE_ as PROCESSI5_25_, job0_.TOKEN_ as TOKEN6_25_, job0_.TASKINSTANCE_ as TASKINST7_25_, job0_.ISSUSPENDED_ as ISSUSPEN8_25_, job0_.ISEXCLUSIVE_ as ISEXCLUS9_25_, job0_.LOCKOWNER_ as LOCKOWNER10_25_, job0_.LOCKTIME_ as LOCKTIME11_25_, job0_.EXCEPTION_ as EXCEPTION12_25_, job0_.RETRIES_ as RETRIES13_25_, job0_.NAME_ as NAME14_25_, job0_.REPEAT_ as REPEAT15_25_, job0_.TRANSITIONNAME_ as TRANSIT16_25_, job0_.ACTION_ as ACTION17_25_, job0_.GRAPHELEMENTTYPE_ as GRAPHEL18_25_, job0_.GRAPHELEMENT_ as GRAPHEL19_25_, job0_.NODE_ as NODE20_25_, job0_.CLASS_ as CLASS2_25_ 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]
            java.sql.SQLException: ORA-00942: table or view does not exist
            


            Here is what I have done:
            1) installed JBoss 4.0.5.GA in C:\jboss-4.0.5.GA
            Copied Oracle's JDBC driver JAR file ojdbc14.jar to the server/default/lib directory.
            And put the following oracle-ds.xml to server/default/deploy dir:
            <?xml version="1.0" encoding="UTF-8"?>
            
            <!-- ===================================================================== -->
            <!-- -->
            <!-- JBoss Server Configuration -->
            <!-- -->
            <!-- ===================================================================== -->
            
            <!-- $Id: oracle-ds.xml 23720 2004-09-15 14:37:40Z loubyansky $ -->
            <!-- ==================================================================== -->
            <!-- Datasource config for Oracle originally from Steven Coy -->
            <!-- ==================================================================== -->
            
            
            <datasources>
             <local-tx-datasource>
             <jndi-name>QLTestDS</jndi-name>
             <connection-url>jdbc:oracle:thin:@localhost:1521:QLTest</connection-url>
             <driver-class>oracle.jdbc.driver.OracleDriver</driver-class>
             <user-name>soademo</user-name>
             <password>oracle</password>
             <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the pool -->
             <!--valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name-->
             <!-- Checks the Oracle error codes and messages for fatal errors -->
             <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
             <!-- sql to call when connection is created
             <new-connection-sql>some arbitrary sql</new-connection-sql>
             -->
            
             <!-- sql to call on an existing pooled connection when it is obtained from pool - the OracleValidConnectionChecker is prefered
             <check-valid-connection-sql>some arbitrary sql</check-valid-connection-sql>
             -->
            
             <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->
             <metadata>
             <type-mapping>Oracle10g</type-mapping>
             </metadata>
             </local-tx-datasource>
            
            </datasources>
            


            2) put jbpm-bpel-1.1.Beta3 at C:\jbpm-bpel-1.1.Beta3
            The config/hibernate.cfg.xml is:
            <?xml version='1.0' encoding='utf-8'?>
            <!DOCTYPE hibernate-configuration PUBLIC
             "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
             "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
            <hibernate-configuration>
            
             <session-factory>
            
             <!-- SQL dialect -->
             <property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
            
             <!-- JDBC connection properties (begin) ====
             <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
             <property name="hibernate.connection.url">jdbc:hsqldb:mem:jbpm</property>
             <property name="hibernate.connection.username">sa</property>
             <property name="hibernate.connection.password"/>
             <property name="hibernate.hbm2ddl.auto">create</property>
             <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
             ==== JDBC connection properties (end) -->
            
             <!-- DataSource properties (begin) -->
             <property name="hibernate.connection.datasource">java:/QLTestDS</property>
             <!-- <property name="hibernate.hbm2ddl.auto">update</property> -->
             <property name="hibernate.cache.provider_class">org.hibernate.cache.EhCacheProvider</property>
             <!-- DataSource properties (end) -->
            
             <!-- JTA transaction properties (begin) ===
             <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
             <property name="jta.UserTransaction">java:comp/UserTransaction</property>
             ==== JTA transaction properties (end) -->
            
             <!-- CMT transaction properties (begin) ===
             <property name="hibernate.transaction.factory_class">org.hibernate.transaction.CMTTransactionFactory</property>
             <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
             ==== CMT transaction properties (end) -->
            
             <!-- logging properties (begin) ===
             <property name="hibernate.show_sql">true</property>
             <property name="hibernate.format_sql">true</property>
             <property name="hibernate.use_sql_comments">true</property>
             ==== logging properties (end) -->
            
             <!-- ############################################ -->
             <!-- # mapping files with external dependencies # -->
             <!-- ############################################ -->
            
             <!-- following mapping file has a dependendy on -->
             <!-- 'bsh-{version}.jar'. -->
             <!-- uncomment this if you don't have bsh on your -->
             <!-- classpath. you won't be able to use the -->
             <!-- script element in process definition files -->
             <mapping resource="org/jbpm/graph/action/Script.hbm.xml"/>
            
             <!-- following mapping files have a dependendy on -->
             <!-- 'jbpm-identity.jar', mapping files -->
             <!-- of the pluggable jbpm identity component. -->
             <!-- Uncomment the following 3 lines if you -->
             <!-- want to use the jBPM identity mgmgt -->
             <!-- component. -->
             <!-- identity mappings (begin) ===
             <mapping resource="org/jbpm/identity/User.hbm.xml"/>
             <mapping resource="org/jbpm/identity/Group.hbm.xml"/>
             <mapping resource="org/jbpm/identity/Membership.hbm.xml"/>
             ==== identity mappings (end) -->
            
             <!-- following mapping files have a dependency on -->
             <!-- the JCR API -->
             <!-- jcr mappings (begin) ===
             <mapping resource="org/jbpm/context/exe/variableinstance/JcrNodeInstance.hbm.xml"/>
             ==== jcr mappings (end) -->
            
             <!-- ###################### -->
             <!-- # jbpm mapping files # -->
             <!-- ###################### -->
            
             <!-- hql queries and type defs -->
             <mapping resource="org/jbpm/db/hibernate.queries.hbm.xml" />
            
             <!-- following mapping files have been overriden in the BPEL module -->
             <!-- bpel overrides (begin) ===
             <mapping resource="org/jbpm/graph/def/ProcessDefinition.hbm.xml"/>
             ==== bpel overrides (end) -->
            
             <!-- graph.def mapping files -->
             <mapping resource="org/jbpm/graph/def/Node.hbm.xml"/>
             <mapping resource="org/jbpm/graph/def/Transition.hbm.xml"/>
             <mapping resource="org/jbpm/graph/def/Event.hbm.xml"/>
             <mapping resource="org/jbpm/graph/def/Action.hbm.xml"/>
             <mapping resource="org/jbpm/graph/def/SuperState.hbm.xml"/>
             <mapping resource="org/jbpm/graph/def/ExceptionHandler.hbm.xml"/>
             <mapping resource="org/jbpm/instantiation/Delegation.hbm.xml"/>
            
             <!-- graph.node mapping files -->
             <mapping resource="org/jbpm/graph/node/StartState.hbm.xml"/>
             <mapping resource="org/jbpm/graph/node/EndState.hbm.xml"/>
             <mapping resource="org/jbpm/graph/node/ProcessState.hbm.xml"/>
             <mapping resource="org/jbpm/graph/node/Decision.hbm.xml"/>
             <mapping resource="org/jbpm/graph/node/Fork.hbm.xml"/>
             <mapping resource="org/jbpm/graph/node/Join.hbm.xml"/>
             <mapping resource="org/jbpm/graph/node/State.hbm.xml"/>
             <mapping resource="org/jbpm/graph/node/TaskNode.hbm.xml"/>
            
             <!-- context.def mapping files -->
             <mapping resource="org/jbpm/context/def/ContextDefinition.hbm.xml"/>
             <mapping resource="org/jbpm/context/def/VariableAccess.hbm.xml"/>
            
             <!-- taskmgmt.def mapping files -->
             <mapping resource="org/jbpm/taskmgmt/def/TaskMgmtDefinition.hbm.xml"/>
             <mapping resource="org/jbpm/taskmgmt/def/Swimlane.hbm.xml"/>
             <mapping resource="org/jbpm/taskmgmt/def/Task.hbm.xml"/>
             <mapping resource="org/jbpm/taskmgmt/def/TaskController.hbm.xml"/>
            
             <!-- module.def mapping files -->
             <mapping resource="org/jbpm/module/def/ModuleDefinition.hbm.xml"/>
            
             <!-- bytes mapping files -->
             <mapping resource="org/jbpm/bytes/ByteArray.hbm.xml"/>
            
             <!-- file.def mapping files -->
             <mapping resource="org/jbpm/file/def/FileDefinition.hbm.xml"/>
            
             <!-- scheduler.def mapping files -->
             <mapping resource="org/jbpm/scheduler/def/CreateTimerAction.hbm.xml"/>
             <mapping resource="org/jbpm/scheduler/def/CancelTimerAction.hbm.xml"/>
            
             <!-- graph.exe mapping files -->
             <mapping resource="org/jbpm/graph/exe/Comment.hbm.xml"/>
             <mapping resource="org/jbpm/graph/exe/ProcessInstance.hbm.xml"/>
             <mapping resource="org/jbpm/graph/exe/Token.hbm.xml"/>
             <mapping resource="org/jbpm/graph/exe/RuntimeAction.hbm.xml"/>
            
             <!-- module.exe mapping files -->
             <mapping resource="org/jbpm/module/exe/ModuleInstance.hbm.xml"/>
            
             <!-- context.exe mapping files -->
             <mapping resource="org/jbpm/context/exe/ContextInstance.hbm.xml"/>
             <mapping resource="org/jbpm/context/exe/TokenVariableMap.hbm.xml"/>
             <mapping resource="org/jbpm/context/exe/VariableInstance.hbm.xml"/>
             <mapping resource="org/jbpm/context/exe/variableinstance/ByteArrayInstance.hbm.xml"/>
             <mapping resource="org/jbpm/context/exe/variableinstance/DateInstance.hbm.xml"/>
             <mapping resource="org/jbpm/context/exe/variableinstance/DoubleInstance.hbm.xml"/>
             <mapping resource="org/jbpm/context/exe/variableinstance/HibernateLongInstance.hbm.xml"/>
             <mapping resource="org/jbpm/context/exe/variableinstance/HibernateStringInstance.hbm.xml"/>
             <mapping resource="org/jbpm/context/exe/variableinstance/LongInstance.hbm.xml"/>
             <mapping resource="org/jbpm/context/exe/variableinstance/NullInstance.hbm.xml"/>
             <mapping resource="org/jbpm/context/exe/variableinstance/StringInstance.hbm.xml"/>
            
             <!-- job mapping files -->
             <mapping resource="org/jbpm/job/Job.hbm.xml"/>
             <mapping resource="org/jbpm/job/Timer.hbm.xml"/>
             <mapping resource="org/jbpm/job/ExecuteNodeJob.hbm.xml"/>
             <mapping resource="org/jbpm/job/ExecuteActionJob.hbm.xml"/>
            
             <!-- taskmgmt.exe mapping files -->
             <mapping resource="org/jbpm/taskmgmt/exe/TaskMgmtInstance.hbm.xml"/>
             <mapping resource="org/jbpm/taskmgmt/exe/TaskInstance.hbm.xml"/>
             <mapping resource="org/jbpm/taskmgmt/exe/PooledActor.hbm.xml"/>
             <mapping resource="org/jbpm/taskmgmt/exe/SwimlaneInstance.hbm.xml"/>
            
             <!-- logging mapping files -->
             <mapping resource="org/jbpm/logging/log/ProcessLog.hbm.xml"/>
             <mapping resource="org/jbpm/logging/log/MessageLog.hbm.xml"/>
             <mapping resource="org/jbpm/logging/log/CompositeLog.hbm.xml"/>
             <mapping resource="org/jbpm/graph/log/ActionLog.hbm.xml"/>
             <mapping resource="org/jbpm/graph/log/NodeLog.hbm.xml"/>
             <mapping resource="org/jbpm/graph/log/ProcessInstanceCreateLog.hbm.xml"/>
             <mapping resource="org/jbpm/graph/log/ProcessInstanceEndLog.hbm.xml"/>
             <mapping resource="org/jbpm/graph/log/ProcessStateLog.hbm.xml"/>
             <mapping resource="org/jbpm/graph/log/SignalLog.hbm.xml"/>
             <mapping resource="org/jbpm/graph/log/TokenCreateLog.hbm.xml"/>
             <mapping resource="org/jbpm/graph/log/TokenEndLog.hbm.xml"/>
             <mapping resource="org/jbpm/graph/log/TransitionLog.hbm.xml"/>
             <mapping resource="org/jbpm/context/log/VariableLog.hbm.xml"/>
             <mapping resource="org/jbpm/context/log/VariableCreateLog.hbm.xml"/>
             <mapping resource="org/jbpm/context/log/VariableDeleteLog.hbm.xml"/>
             <mapping resource="org/jbpm/context/log/VariableUpdateLog.hbm.xml"/>
             <mapping resource="org/jbpm/context/log/variableinstance/ByteArrayUpdateLog.hbm.xml"/>
             <mapping resource="org/jbpm/context/log/variableinstance/DateUpdateLog.hbm.xml"/>
             <mapping resource="org/jbpm/context/log/variableinstance/DoubleUpdateLog.hbm.xml"/>
             <mapping resource="org/jbpm/context/log/variableinstance/HibernateLongUpdateLog.hbm.xml"/>
             <mapping resource="org/jbpm/context/log/variableinstance/HibernateStringUpdateLog.hbm.xml"/>
             <mapping resource="org/jbpm/context/log/variableinstance/LongUpdateLog.hbm.xml"/>
             <mapping resource="org/jbpm/context/log/variableinstance/StringUpdateLog.hbm.xml"/>
             <mapping resource="org/jbpm/taskmgmt/log/TaskLog.hbm.xml"/>
             <mapping resource="org/jbpm/taskmgmt/log/TaskCreateLog.hbm.xml"/>
             <mapping resource="org/jbpm/taskmgmt/log/TaskAssignLog.hbm.xml"/>
             <mapping resource="org/jbpm/taskmgmt/log/TaskEndLog.hbm.xml"/>
             <mapping resource="org/jbpm/taskmgmt/log/SwimlaneLog.hbm.xml"/>
             <mapping resource="org/jbpm/taskmgmt/log/SwimlaneCreateLog.hbm.xml"/>
             <mapping resource="org/jbpm/taskmgmt/log/SwimlaneAssignLog.hbm.xml"/>
            
             <!-- ###################### -->
             <!-- # bpel mapping files # -->
             <!-- ###################### -->
            
             <!-- hql queries and type defs -->
             <mapping resource="org/jbpm/bpel/db/hibernate.queries.hbm.xml" />
            
             <!-- graph.def mapping files -->
             <mapping resource="org/jbpm/bpel/graph/def/BpelDefinition.hbm.xml" />
             <mapping resource="org/jbpm/bpel/graph/def/ImportsDefinition.hbm.xml" />
             <mapping resource="org/jbpm/bpel/graph/def/LinkDefinition.hbm.xml" />
             <mapping resource="org/jbpm/bpel/graph/def/Activity.hbm.xml" />
             <mapping resource="org/jbpm/bpel/graph/def/Namespace.hbm.xml" />
            
             <mapping resource="org/jbpm/bpel/graph/basic/BasicActivity.hbm.xml"/>
             <mapping resource="org/jbpm/bpel/graph/basic/assign/Copy.hbm.xml"/>
             <mapping resource="org/jbpm/bpel/graph/basic/assign/From.hbm.xml" />
             <mapping resource="org/jbpm/bpel/graph/basic/assign/To.hbm.xml" />
            
             <mapping resource="org/jbpm/bpel/graph/struct/StructuredActivity.hbm.xml" />
            
             <mapping resource="org/jbpm/bpel/graph/scope/Scope.hbm.xml" />
             <mapping resource="org/jbpm/bpel/graph/scope/ScopeHandler.hbm.xml" />
            
             <!-- graph.exe mapping files -->
             <mapping resource="org/jbpm/bpel/graph/exe/LinkInstance.hbm.xml" />
             <mapping resource="org/jbpm/bpel/graph/exe/ScopeInstance.hbm.xml" />
             <mapping resource="org/jbpm/bpel/graph/exe/FaultInstance.hbm.xml" />
            
             <!-- variable.def mapping files -->
             <mapping resource="org/jbpm/bpel/variable/def/VariableDefinition.hbm.xml" />
             <mapping resource="org/jbpm/bpel/variable/def/VariableType.hbm.xml" />
            
             <!-- variable.exe mapping files -->
             <mapping resource="org/jbpm/bpel/variable/exe/ElementInstance.hbm.xml" />
             <mapping resource="org/jbpm/bpel/variable/exe/MessageValue.hbm.xml" />
            
             <!-- sublang.def mapping files -->
             <mapping resource="org/jbpm/bpel/sublang/def/Snippet.hbm.xml" />
            
             <!-- alarm mapping files -->
             <mapping resource="org/jbpm/bpel/alarm/Alarm.hbm.xml" />
            
             <!-- integration.def mapping files -->
             <mapping resource="org/jbpm/bpel/integration/def/CorrelationSetDefinition.hbm.xml" />
             <mapping resource="org/jbpm/bpel/integration/def/PartnerLinkDefinition.hbm.xml" />
             <mapping resource="org/jbpm/bpel/integration/def/Correlations.hbm.xml" />
             <mapping resource="org/jbpm/bpel/integration/def/Receiver.hbm.xml" />
             <mapping resource="org/jbpm/bpel/integration/def/Replier.hbm.xml" />
             <mapping resource="org/jbpm/bpel/integration/def/Invoker.hbm.xml" />
            
             <!-- integration.exe mapping files -->
             <mapping resource="org/jbpm/bpel/integration/exe/CorrelationSetInstance.hbm.xml" />
             <mapping resource="org/jbpm/bpel/integration/exe/PartnerLinkInstance.hbm.xml" />
            
             <!-- endpointref mapping files -->
             <mapping resource="org/jbpm/bpel/endpointref/EndpointReference.hbm.xml" />
             <mapping resource="org/jbpm/bpel/endpointref/SoapEndpointReference.hbm.xml" />
            
             <!-- wsdl mapping files -->
             <mapping resource="org/jbpm/bpel/wsdl/impl/PropertyImpl.hbm.xml" />
             <mapping resource="org/jbpm/bpel/wsdl/impl/PartnerLinkTypeImpl.hbm.xml" />
             <mapping resource="org/jbpm/bpel/wsdl/impl/PropertyAliasImpl.hbm.xml" />
             <mapping resource="org/jbpm/bpel/wsdl/impl/OperationImpl.hbm.xml" />
             <mapping resource="org/jbpm/bpel/wsdl/impl/PortTypeImpl.hbm.xml" />
             <mapping resource="org/jbpm/bpel/wsdl/impl/OperationMember.hbm.xml" />
             <mapping resource="org/jbpm/bpel/wsdl/impl/MessageImpl.hbm.xml" />
             <mapping resource="org/jbpm/bpel/wsdl/impl/PartImpl.hbm.xml" />
            
             </session-factory>
            
            </hibernate-configuration>
            



            I am using Oracle 10g.

            Thanks.



            • 3. Re: Getting SQLGrammarException when installing jBPM BPEL 1.
              marcotizzano

              I have the same problem simply deploying the jbpm-console.war under jboss 4.2.2 GA

              please help me. :-(

              • 4. Re: Getting SQLGrammarException when installing jBPM BPEL 1.
                marcotizzano

                Surely, there is an error in the configuration of your datasource, regarding the value of tag <type-mapping>. In fact, when you use Oracle10g, the value to set is Oracle9i.

                In any case, my problem there is yet.

                Please, can someone help me?

                thanks a lot.