7 Replies Latest reply on Sep 26, 2005 2:52 PM by tom.baeyens

    Running jbpm on tomcat

    aguizar

      Go to the https://sourceforge.net/projects/jbpm/, open the forums and search for "tomcat" there.

      Please post the issues you're facing and the workaround you have found so that we can help you.

        • 1. Re: Running jbpm on tomcat
          jasontwm

          I have posted a solution to run the websale jbpm app on tomcat with mysql.
          Go to the link https://sourceforge.net/projects/jbpm/ and do a search on 'tomcat'. The thread is 'how to deploy websale sample to tomcat'. This solution might not be the best, but comments are welcome to improve on the solution.

          Cheers
          Jason.

          • 2. Re: Running jbpm on tomcat
            cuchivano

            I have deployed the websale sample to tomcat with the info in the link https://sourceforge.net/projects/jbpm. I use the Oracle Database. But when I access the site http://localhost/jbpm get the next error:

            javax.faces.FacesException: Expression: '#{homeBean.taskInstances}'
            at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatc
            h(ServletExternalContextImpl.java:411)
            at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspV
            iewHandlerImpl.java:280)
            at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:
            300)
            at javax.faces.webapp.FacesServlet.service(FacesServlet.java:110)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
            icationFilterChain.java:252)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
            ilterChain.java:173)
            at org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFi
            lter.java:25)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
            icationFilterChain.java:202)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
            ilterChain.java:173)
            at org.jbpm.webapp.filter.PersistenceFilter.doFilter(PersistenceFilter.j
            ava:28)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
            icationFilterChain.java:202)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
            ilterChain.java:173)
            at org.jbpm.webapp.filter.ContextFilter.doFilter(ContextFilter.java:19)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
            icationFilterChain.java:202)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
            ilterChain.java:173)
            at org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:38)
            at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
            icationFilterChain.java:202)
            at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
            ilterChain.java:173)
            at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
            alve.java:214)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
            eContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
            a:520)
            at org.apache.catalina.core.StandardContextValve.invokeInternal(Standard
            ContextValve.java:198)
            at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
            alve.java:152)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
            eContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
            a:520)
            at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
            ava:137)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
            eContext.java:104)
            at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
            ava:118)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
            eContext.java:102)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
            a:520)
            at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
            ve.java:109)
            at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValv
            eContext.java:104)
            at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.jav
            a:520)
            at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)

            at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:16
            0)
            at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
            :799)
            at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
            ssConnection(Http11Protocol.java:705)
            at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java
            :577)
            at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadP
            ool.java:684)
            at java.lang.Thread.run(Thread.java:534)

            • 3. Re: Running jbpm on tomcat
              cuchivano

               

              "cuchivano" wrote:
              I have deployed the websale sample to tomcat with the info in the link https://sourceforge.net/projects/jbpm. I use the Oracle Database. But when I access the site http://localhost/jbpm get the next error:

              2005-09-02 18:08:00 StandardContext[/jbpm]Root cause: ORA-00904: "FALSE": invalid identifier

              java.sql.SQLException: ORA-00904: "FALSE": invalid identifier

              at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
              at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java:242)
              at oracle.jdbc.ttc7.Oall7.receive(Oall7.java:554)
              at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1478)
              at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java:677)
              at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2371)
              at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2660)
              at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:457)
              at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:387)
              at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:120)
              at org.hibernate.loader.Loader.getResultSet(Loader.java:1272)
              at org.hibernate.loader.Loader.doQuery(Loader.java:391)
              at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:218)
              at org.hibernate.loader.Loader.doList(Loader.java:1593)
              at org.hibernate.loader.Loader.list(Loader.java:1577)
              at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:395)
              at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:271)
              at org.hibernate.impl.SessionImpl.list(SessionImpl.java:844)
              at org.hibernate.impl.QueryImpl.list(QueryImpl.java:74)
              at org.jbpm.db.TaskMgmtSession.findTaskInstances(TaskMgmtSession.java:34)
              at org.jbpm.webapp.bean.HomeBean.getTaskInstances(HomeBean.java:27)


              My properties for the hibernate config file are:

              hibernate.dialect=org.hibernate.dialect.Oracle9Dialect
              hibernate.connection.driver_class=oracle.jdbc.driver.OracleDriver
              hibernate.connection.url=jdbc:oracle:thin:@localhost:1521:ORA
              hibernate.connection.username=WEBSALES
              hibernate.connection.password=WEBSALES
              hibernate.c3p0.min_size=1
              hibernate.c3p0.max_size=3
              hibernate.show_sql=true
              hibernate.query.substitutions=true 1, false 0



              • 4. Re: Running jbpm on tomcat
                stembol

                I got the same error with Oracle...

                Hibernate: select taskinstan0_.ID_ as ID1_, taskinstan0_.NAME_ as NAME2_26_, taskinstan0_.DESCRIPTION_ as DESCRIPT3_26_, taskinstan0_.ACTORID_ as ACTORID4_26_, taskinstan0_.CREATE_ as CREATE5_26_, taskinstan0_.START_ as START6_26_, taskinstan0_.END_ as END7_26_, taskinstan0_.DUEDATE_ as DUEDATE8_26_, taskinstan0_.PRIORITY_ as PRIORITY9_26_, taskinstan0_.ISCANCELLED_ as ISCANCE10_26_, taskinstan0_.ISSIGNALLING_ as ISSIGNA11_26_, taskinstan0_.ISBLOCKING_ as ISBLOCKING12_26_, taskinstan0_.TASK_ as TASK13_26_, taskinstan0_.TOKEN_ as TOKEN14_26_, taskinstan0_.SWIMLANINSTANCE_ as SWIMLAN15_26_, taskinstan0_.TASKMGMTINSTANCE_ as TASKMGM16_26_ from JBPM_TASKINSTANCE taskinstan0_ where taskinstan0_.ACTORID_=? and (taskinstan0_.END_ is null) and taskinstan0_.ISCANCELLED_=false
                15:08:35,935 WARN JDBCExceptionReporter : SQL Error: 904, SQLState: 42000
                15:08:35,951 ERROR JDBCExceptionReporter : ORA-00904: "FALSE": invalid identifier

                • 5. Re: Running jbpm on tomcat
                  kukeltje

                  search the forum for the words 'false' and 'true' and orcale. I think there is some anwser there

                  • 6. Re: Running jbpm on tomcat
                    stembol

                    In TaskMgmtSession.java,

                    I replaced

                    private static final String findTaskInstancesByActorId =
                    "select ti " +
                    "from org.jbpm.taskmgmt.exe.TaskInstance as ti " +
                    "where ti.actorId = :actorId " +
                    " and ti.end is null " +
                    " and ti.isCancelled = false";

                    by

                    private static final String findTaskInstancesByActorId =
                    "select ti " +
                    "from org.jbpm.taskmgmt.exe.TaskInstance as ti " +
                    "where ti.actorId = :actorId " +
                    " and ti.end is null " +
                    " and ti.isCancelled = 0";

                    and it works better as JBPM_TASKINSTANCE.ISCANCELLED has the number(1,0) data type in my oracle database.

                    Is it the correct way to solve the problem? I see a dependence to the database system.

                    Regards

                    • 7. Re: Running jbpm on tomcat
                      tom.baeyens

                      there is a hibernate property to replace all true's to 1 and false's to 0's. that you should use instead of updating the queries in the code.

                      regards, tom.