13 Replies Latest reply on Nov 30, 2006 6:27 PM by meghanai_99

    jbpm 3.0 on tomcat

    robik123

      Hi,
      I am trying to install jbpm 3.1 from the jbpm starters-kit 3.1 on Jakarta Tomcat 5.0.28.

      I also use my own oracle db which seems to be working file after changing the hibernate settings

      I followed the instructions on http://www.jboss.com/index.html?module=bb&op=viewtopic&t=81337 to build a war file.

      I get the following error :

      javax.servlet.ServletException: Cannot get value for expression '#{userBean.userSelectItems}'
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
      org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:670)
      org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:637)
      org.apache.jsp.index_jsp._jspService(index_jsp.java:46)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
      org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
      org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
      root cause

      javax.faces.FacesException: Cannot get value for expression '#{userBean.userSelectItems}'
      org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:421)
      org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
      org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:300)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:95)
      org.apache.jasper.runtime.PageContextImpl.doForward(PageContextImpl.java:670)
      org.apache.jasper.runtime.PageContextImpl.forward(PageContextImpl.java:637)
      org.apache.jsp.index_jsp._jspService(index_jsp.java:46)
      org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:324)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      org.jbpm.webapp.filter.AuthenticationFilter.doFilter(AuthenticationFilter.java:55)
      org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
      org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)

      What am I missing?
      Please help.
      Thanks.
      Ruby

        • 1. Re: jbpm 3.0 on tomcat
          kukeltje

          could be a connection to the database, a db that is not filled either with tables or the tables with data.

          Look in the serverlogging if there is more info

          • 2. Re: jbpm 3.0 on tomcat
            robik123

            Hi,
            I checked the database. The tables are all there but there is no data. The documentation for creating the database that I used from the jbpm-db/readme.html of the jbpm starters-kit 3.1 only shows how to create the database schemas. Are we supposed to add data to start jbpm for the first time? if so, how do we do that?
            Thanks,
            Ruby

            • 3. Re: jbpm 3.0 on tomcat
              kukeltje

              when using hsqldb that is done automagically. There is however no sql generated to insert these users. One of the small things missing. I see no easy way (I myself did it manually by exporting the table in a hsqldb I had and inserting it in Oracle.

              I'll file a jira issue for this.

              • 4. Re: jbpm 3.0 on tomcat
                robik123

                I just found some documentation on what data should be added
                http://docs.jboss.com/jbpm/v3/userguide/persistence.html#changingthejbpmdb
                I ran the provided script that inserts users but I still get the same error!!
                Anybody has jbpm.war installed on a server other than jboss.
                what did you do different?
                Please advise!

                • 5. Re: jbpm 3.0 on tomcat
                  robik123
                  • 6. Re: jbpm 3.0 on tomcat
                    kukeltje

                    Yep, great I did not know it was in there. You only have users then, no groups. I think that should be added. Thanks for enlightening me

                    • 7. Re: jbpm 3.0 on tomcat
                      robik123

                      in the server log file deeper in the following :
                      Caused by: java.lang.NoClassDefFoundError
                      at org.hibernate.mapping.SimpleValue.createIdentifierGenerator(SimpleValue.java:152)
                      at org.hibernate.impl.SessionFactoryImpl.(SessionFactoryImpl.java:181)
                      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1154)
                      at org.jbpm.persistence.db.DbPersistenceServiceFactory.getSessionFactory(DbPersistenceServiceFactory.java:90)
                      at org.jbpm.persistence.db.DbPersistenceService.getSessionFactory(DbPersistenceService.java:74)
                      at org.jbpm.persistence.db.DbPersistenceService.getSession(DbPersistenceService.java:79)
                      at org.jbpm.JbpmContext.getSession(JbpmContext.java:354)
                      at org.jbpm.webapp.bean.UserBean.getUsers(UserBean.java:53)
                      at org.jbpm.webapp.bean.UserBean.getUserSelectItems(UserBean.java:61)
                      ... 87 more

                      which file/jar is missing ?
                      regards,
                      Ruby

                      • 8. Re: jbpm 3.0 on tomcat
                        kukeltje

                        not missing, but more likely an older version... strange that it does not mention which class, but I suspect hibernate.

                        • 9. Re: jbpm 3.0 on tomcat
                          dleerob

                          I am also trying to get jbpm 3.1 running on tomcat. I have deployed the jbpm war file to my tomcat/webapps directory, and included all the jar files mentioned in the Deployment section of the users guide. I have added the jbpm.cfg.xml and hibernate.cfg.xml to the root of my class path. I keep getting a hibernate exception: "Could find datasource: java/JbpmsDS". It all works fine when using the JBoss Application Server. Can anyone help?

                          • 10. Re: jbpm 3.0 on tomcat
                            robik123

                            DavidR
                            according to http://docs.jboss.com/jbpm/v3/userguide/thejbpmdatabase.html#d0e2251
                            you have to create 1 file called jbpm-ds.xml and have another one called jboss-service.xml that has the JbpmsDS entry. the setting is for JBoss server but you can try to do the same for tomcat though.
                            let me know if you had any luck with your installation.
                            Ruby

                            • 11. Re: jbpm 3.0 on tomcat
                              hswu

                              I follow the URL and change the setting for MySQL and Tomcat 5.5.17.
                              It Works!
                              So, you may follow the URL
                              http://blogs.sun.com/roller/page/chengfang?entry=how_to_run_jbpm_on

                              The possible problem is wrong database setting.
                              You should change ./src/config.files/hibernate.cfg.xml.

                              Edward WU

                              • 12. Re: jbpm 3.0 on tomcat
                                robik123

                                its finally working .. had to include more and more jars thats all.
                                ruby:)

                                • 13. Re: jbpm 3.0 on tomcat

                                  Hello robik123 and others,

                                  I am getting exactly same exception about userBean.userSelectItems from JSF. In you last post you said you had to include more jars, could you please be more specific and let me know which jars?

                                  I am using hsql and tomcat 5.5.17. I used the dbvisualizer tool to verify that the users exist in my 'localdb'. My hibernate.cfg.xml looks like this -

                                  org.hibernate.dialect.HSQLDialect
                                  org.hsqldb.jdbcDriver
                                  jdbc:hsqldb://localhost:1701
                                  sa



                                  Please let me know what I need to do here.

                                  Thank you,
                                  Meghana