5 Replies Latest reply on Sep 15, 2006 7:34 AM by Jitendra Singh

    Oracle exception deploying process

    Manuel Teira Paz Newbie

      Hello.
      I'm trying to setup jBPM inside JBoss 4.0.4 GA. Once I've deployed the jbpm.ear (from CVS) I tried to deploy a process from the Graphic Designer. I'm getting an oracle exception while trying to identify older versions of the process trying to be deployed. What could be the cause? The select shown works correctly into an SQLPlus session.

      Thanks.


      14:39:29,605 DEBUG [JDBCExceptionReporter] could not execute query [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]
      java.sql.SQLException: ORA-00923: FROM keyword not found where expected
      
       at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
       at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2355)
       at oracle.jdbc.oci8.OCIDBAccess.parseExecuteDescribe(OCIDBAccess.java:1274)
       at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2516)
       at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2850)
       at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
       at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:537)
       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(Loader.java:224)
       at org.hibernate.loader.Loader.doList(Loader.java:2145)
       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.java: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.java:756)
       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.ProcessUploadServlet.doDeployArchive(ProcessUploadServlet.java:155)
       at org.jbpm.webapp.servlet.ProcessUploadServlet.handleRequest(ProcessUploadServlet.java:103)
       at org.jbpm.webapp.servlet.ProcessUploadServlet.service(ProcessUploadServlet.java:63)
       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.LogFilter.doFilter(LogFilter.java:59)
       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:96)
       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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       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:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       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:595)
      14:39:29,608 WARN [JDBCExceptionReporter] SQL Error: 923, SQLState: 42000
      14:39:29,608 ERROR [JDBCExceptionReporter] ORA-00923: FROM keyword not found where expected
      
      14:39:29,827 ERROR [STDERR] 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: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.java: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.java:756)
       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.ProcessUploadServlet.doDeployArchive(ProcessUploadServlet.java:155)
       at org.jbpm.webapp.servlet.ProcessUploadServlet.handleRequest(ProcessUploadServlet.java:103)
       at org.jbpm.webapp.servlet.ProcessUploadServlet.service(ProcessUploadServlet.java:63)
       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.LogFilter.doFilter(LogFilter.java:59)
       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:96)
       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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       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:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       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:595)
      Caused by: java.sql.SQLException: ORA-00923: FROM keyword not found where expected
      
       at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
       at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2355)
       at oracle.jdbc.oci8.OCIDBAccess.parseExecuteDescribe(OCIDBAccess.java:1274)
       at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2516)
       at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2850)
       at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
       at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:537)
       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(Loader.java:224)
       at org.hibernate.loader.Loader.doList(Loader.java:2145)
       ... 37 more
      14:39:29,829 ERROR [GraphSession] org.hibernate.exception.SQLGrammarException: could not execute query
      14:39:29,829 DEBUG [JbpmContext] closing JbpmContext
      14:39:29,831 DEBUG [Services] closing service 'persistence': org.jbpm.persistence.db.DbPersistenceService@dd7404
      14:39:29,833 DEBUG [DbPersistenceService] committing hibernate transaction
      14:39:29,833 DEBUG [JTATransaction] commit
      14:39:29,835 DEBUG [JTATransaction] Committed JTA UserTransaction
      14:39:29,836 DEBUG [DbPersistenceService] closing hibernate session
      14:39:29,836 DEBUG [Services] closing service 'tx': org.jbpm.tx.TxService@1606bf5
      14:39:29,837 ERROR [[ProcessUploadServlet]] Servlet.service() for servlet ProcessUploadServlet threw exception
      org.jbpm.JbpmException: couldn't find process definition 'Forker'
       at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:170)
       at org.jbpm.db.GraphSession.deployProcessDefinition(GraphSession.java:67)
       at org.jbpm.JbpmContext.deployProcessDefinition(JbpmContext.java:173)
       at org.jbpm.webapp.servlet.ProcessUploadServlet.doDeployArchive(ProcessUploadServlet.java:155)
       at org.jbpm.webapp.servlet.ProcessUploadServlet.handleRequest(ProcessUploadServlet.java:103)
       at org.jbpm.webapp.servlet.ProcessUploadServlet.service(ProcessUploadServlet.java:63)
       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.LogFilter.doFilter(LogFilter.java:59)
       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:96)
       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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
       at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
       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:869)
       at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
       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:595)
      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: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.java: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.java:756)
       at org.jbpm.db.GraphSession.findLatestProcessDefinition(GraphSession.java:153)
       ... 28 more
      Caused by: java.sql.SQLException: ORA-00923: FROM keyword not found where expected
      
       at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
       at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2355)
       at oracle.jdbc.oci8.OCIDBAccess.parseExecuteDescribe(OCIDBAccess.java:1274)
       at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2516)
       at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2850)
       at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:609)
       at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:537)
       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(Loader.java:224)
       at org.hibernate.loader.Loader.doList(Loader.java:2145)
       ... 37 more
      14:46:03,640 DEBUG [IdleRemover] run: IdleRemover notifying pools, interval: 450000


        • 1. Re: Oracle exception deploying process
          Tom Baeyens Master

          i didn't see this problem before.

          did you specify the dialect correctly ? do you know there is a different dialect for oracle 9 ?

          it is quite clearly explained in this other forum discussion :-) http://www.vkfz.com/hibernate-sequence-t64969.htm


          or maybe it's related to this unresolved issue in the hibernate forums: http://forums.hibernate.org/viewtopic.php?p=2183728&sid=ba9ac2625930b7de3c07241179ca5dab

          • 2. Re: Oracle exception deploying process
            Tom Baeyens Master

            if you can post more information in the hibernate topic, that might help them to analyse the problem further.

            • 3. Re: Oracle exception deploying process
              Manuel Teira Paz Newbie

               

              did you specify the dialect correctly ? do you know there is a different dialect for oracle 9 ?


              I thought I was using the Oracle9 dialect, but it seems that, in some way, that is not what JBoss is thinking, as I'm seeing the log:

              2006-09-13 14:38:56,698 DEBUG [org.hibernate.cfg.Configuration] hibernate.dialect=org.hibernate.dialect.HSQLDialect


              I've just extracted the hibernate.cfg.xml from my jbpm-configs.jar inside the jbpm.ear application and yes, that's the problem, it's using the HSQL dialect.

              I'm going to change it and see what happens.

              THanks a lot.



              it is quite clearly explained in this other forum discussion :-) http://www.vkfz.com/hibernate-sequence-t64969.htm

              :-)


              • 4. Re: Oracle exception deploying process
                Manuel Teira Paz Newbie

                I've been looking at the build.xml ear file and as far as I understand, the hibernate.cfg.xml file is copied from the jbom-console.war that is uncompressed to extract their configuration files

                <target name="customize.war">
                 <ant antfile="../../console/build.xml" inheritall="false" />
                 <mkdir dir="target/customizedwar" />
                 <unzip src="${local.repository}/${lib.jbpm.console.dir}/jbpm-console.war" dest="target/customizedwar" />


                and:

                <mkdir dir="target/jbpm.configs" />
                 <move todir="target/jbpm.configs">
                 <fileset dir="target/customizedwar/WEB-INF/classes">
                 <include name="*.xml" />
                 </fileset>
                 </move>


                Furthermore, the hibernate.cfg.xml file is copied from the /jpdl/jar/src/main/config/hibernate.cfg.xml file when the jbpm-console.war is built:

                <target name="create.customized.config.files">
                 <mkdir dir="target/config.files" />
                 <copy todir="target/config.files">
                 <fileset dir="../jpdl/jar/src/main/config" />
                 </copy>


                To change the dialect to Oracle9 one, I had to touch directly that file (/jpdl/jar/src/main/config/hibernate.cfg.xml), but I got bad feelings doing that. Is this the preferred way to do this, or perhaps there's some other way, touching some build.preferences file or something so?

                Regards.

                • 5. Re: Oracle exception deploying process
                  Jitendra Singh Newbie

                  There will be a hibernate.properties file in the jbpm core download.

                  We need to update that, as during the build the properties for the datasource are picked from there and updated into hibernate.cfg.xml.

                  I have messed around too much with my core to guide you to exact solution. But I was able to stop the replacement of data by modifying the build file.