9 Replies Latest reply on Nov 12, 2007 5:49 PM by neville.sequeira

    Problem with jBPM 3.2.2 + JBoss AS 4.2.2

    neville.sequeira

      I really need have the jBPM console web app (the jbpm-console.war that comes with the jBPM suite download) working under JBoss AS 4.2.2

      I get the following exception on starting JBoss AS:
      16:19:52,437 ERROR [[/jbpm-console]] Exception sending context initialized event to listener instance of class org.jboss.web.jsf.integration.config.JBossJSFConfigureListener
      java.lang.NoClassDefFoundError: edu/emory/mathcs/backport/java/util/concurrent/ConcurrentMap
      at java.lang.Class.getDeclaredConstructors0(Native Method)
      at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)
      at java.lang.Class.getConstructor0(Class.java:2699)
      at java.lang.Class.newInstance0(Class.java:326)
      at java.lang.Class.newInstance(Class.java:308)
      at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:825)
      at com.sun.faces.config.ConfigureListener.configure(ConfigureListener.java:486)
      at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:381)
      at org.jboss.web.jsf.integration.config.JBossJSFConfigureListener.contextInitialized(JBossJSFConfigureListener.java:69)
      ...
      ...

      After following the information at http://wiki.jboss.org/wiki/Wiki.jsp?page=DeployJbpm3.2WebAppUnderJBoss4.2.x I am still getting the same exception mentioned above.

      By the way, I have read another similar related forum topic http://jboss.org/index.html?module=bb&op=viewtopic&t=112908, but unfortunately I can't glean much from that.

      Thanks very much in advance.

        • 1. Re: Problem with jBPM 3.2.2 + JBoss AS 4.2.2
          kukeltje

          did you try this: (it's in the wiki)

          Additional Notes for jBPM 3.2.1

          If you want to deploy the jBPM 3.2.1 web app to a JBoss AS 4.2.x version, the easiest way at the moment would be to checkout the latest version from CVS, because the build.xml inside the jbpm.3/console branch has a custom target for building a 4.2-compatible web-app:

          ant war-4.2.x


          • 2. Re: Problem with jBPM 3.2.2 + JBoss AS 4.2.2
            neville.sequeira

            @kukeltje

            Thanks for the pointer.

            I got jbpm.3 source code and built jbpm console using

            ant war-4.2.x
            . Deployed that on JBoss AS 4.2.2. But, now, every page in the application shows me the following message:

            Now on starting JBoss AS, I keep getting the following message on the command prompt every few seconds:
            00:15:46,146 ERROR [JobExecutorThread] exception in job executor thread. waiting 160000 milliseconds
            java.lang.IllegalStateException: No data type for node: org.hibernate.hql.ast.tree.MethodNode
             \-[METHOD_CALL] MethodNode: '('
             +-[METHOD_NAME] IdentNode: 'stddev' {originalText=stddev}
             \-[EXPR_LIST] SqlNode: 'exprList'
             \-[DOT] DotNode: 'nodelog0_.DURATION_' {propertyName=duration,dereferenceType=4,propertyPath=duration,path=nl.dur
            ation,tableAlias=nodelog0_,className=org.jbpm.graph.log.NodeLog,classAlias=nl}
             +-[ALIAS_REF] IdentNode: 'nodelog0_.ID_' {alias=nl, className=org.jbpm.graph.log.NodeLog, tableAlias=nodelog0_
            }
             \-[IDENT] IdentNode: 'duration' {originalText=duration}
            
             at org.hibernate.hql.ast.tree.SelectClause.initializeExplicitSelectClause(SelectClause.java:145)
             at org.hibernate.hql.ast.HqlSqlWalker.useSelectClause(HqlSqlWalker.java:705)
             at org.hibernate.hql.ast.HqlSqlWalker.processQuery(HqlSqlWalker.java:529)
             at org.hibernate.hql.antlr.HqlSqlBaseWalker.query(HqlSqlBaseWalker.java:645)
             at org.hibernate.hql.antlr.HqlSqlBaseWalker.selectStatement(HqlSqlBaseWalker.java:281)
             at org.hibernate.hql.antlr.HqlSqlBaseWalker.statement(HqlSqlBaseWalker.java:229)
             at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:228)
             at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:160)
             at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:111)
             at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:77)
             at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:56)
             at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:72)
             at org.hibernate.impl.SessionFactoryImpl.checkNamedQueries(SessionFactoryImpl.java:402)
             at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:352)
             at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
             at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:91)
             at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:95)
             at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:99)
             at org.jbpm.persistence.db.DbPersistenceService.getJobSession(DbPersistenceService.java:359)
             at org.jbpm.JbpmContext.getJobSession(JbpmContext.java:563)
             at org.jbpm.job.executor.JobExecutorThread.acquireJobs(JobExecutorThread.java:112)
             at org.jbpm.job.executor.JobExecutorThread.run(JobExecutorThread.java:58)
            


            The message also repeats at increasing time intervals in the command prompt from where I started JBoss AS. First I see it in 5 seconds, then in 10 seconds, then in 20 seconds and so on.


            • 3. Re: Problem with jBPM 3.2.2 + JBoss AS 4.2.2
              kukeltje

              I did not try it on JBoss AS 4.2.2 (Yet) so it might be related to that. on JBoss AS 4.2.1 GA it works. It looks like it's hibernate related, but I guess you already found that out yourself ;-). Coming days I have no time to try it out on 4.2.2, sorry. So you might experiment a little with this yourself. From http://opensource.atlassian.com/projects/hibernate/browse/HHH-1218 it might even be related to a wrong dialect in hibernate

              • 4. Re: Problem with jBPM 3.2.2 + JBoss AS 4.2.2
                neville.sequeira

                Unfortunately, I get the exact same result on JBoss AS 4.2.1 GA
                Yes, it seems to be someting related to Hibernate.

                Thanks for you help kukeltje. I will see what other things I can try.

                • 5. Re: Problem with jBPM 3.2.2 + JBoss AS 4.2.2
                  neville.sequeira

                  It seems the root cause is the following query defined in the file org/jbpm/db/hibernate.queries.hbm.xml (to be found in jbpm-jpdl.jar) :

                   <query name="Simulation.calculateAverageTimeForDecisions">
                   <![CDATA[
                   select
                   nl.node.id,
                   nl.node.name,
                   count(nl.leave),
                   avg(nl.duration),
                   min(nl.duration),
                   max(nl.duration),
                   stddev(nl.duration)
                   from org.jbpm.graph.log.NodeLog nl
                   where nl.node.processDefinition = :processDefinition
                   and nl.node.class = org.jbpm.graph.node.Decision
                   and time(nl.enter) > time(:fromTime) and time(nl.enter) < time(:tillTime)
                   group by nl.node
                   ]]>
                   </query>
                  


                  jBPM Job Executor is attemting to execute this query every so often. However, on going through hibernate soure code for org.hibernate.dialect.HSQLDialect, the problem seems to be that this dialect (HSQLDialect) does not invoke registerFunction for the function named 'stddev' :-(
                  In fact, the function 'stddev' is being registered for only DB2, Oracle8i, Oracle9 and PostgresSQL dialects.

                  The issue did not exist in earlier versions of jBPM source code.
                  This is a weird state of affairs - jBPM code is sort of ahead of the Hibernate code it depends on?

                  Any ideas for how to address this will be highly appreciated?


                  • 6. Re: Problem with jBPM 3.2.2 + JBoss AS 4.2.2
                    kukeltje

                    Did you do a checkout of cvs-head? Or the 3.2.2 tagged version? The former is under development, but still it should not happen. I'll notify the developer who is workin on this.

                    • 7. Re: Problem with jBPM 3.2.2 + JBoss AS 4.2.2
                      neville.sequeira

                      My attempt to get the source version tagged 3.2.2 has been to run the following command:

                      cvsgrab -url http://fisheye.jboss.org/browse/JBPM/jbpm.3 -tag 3.2.2


                      However, the source I get (specifially the file JBPM\jbpm.3\jpdl\jar\src\main\java\org\jbpm\db\hibernate.queries.hbm.xml) is no different than the version I got without specifying the -tag option.

                      Never used cvsgrab before.
                      How do I make sure I am getting the version tagged 3.2.2 ?

                      By the way, I resolved the issue by commenting out the relevant problematic queries (name starting with "Simulation." from the said file.

                      But, I really would like to know how to get the source version tagged 3.2.2. In the version tagged 3.2.2, I was (and am) expecting a version of the said file in which the said problematic queries do not exist.


                      • 8. Re: Problem with jBPM 3.2.2 + JBoss AS 4.2.2
                        kukeltje
                        • 9. Re: Problem with jBPM 3.2.2 + JBoss AS 4.2.2
                          neville.sequeira

                          Thanks kukeltje !!
                          I am all set now. I was able to build and deploy jbmp-console on JBoss AS 4.2.1 GA