8 Replies Latest reply on Aug 21, 2009 4:50 AM by kukeltje

    Database connection

    j.e.z

      Hi,

      im a begginer at using jBPM. I copied the jbpm.war from the Starters Kit to my Tomcat/webapps. But i dont know how to configure my database connection on it. I already used the scripts to create the a database in MySQL called jbpm. My problem is, how to inform my web application to use that database. When i tried without these configuration i got this error:

      SEVERE: Servlet.service() for servlet jsp threw exception
      javax.faces.el.EvaluationException: Cannot get value for expression '#{userBean.userSelectItems}'
       at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:399)
      ...
      


      I would appreciate any help.

      Sorry for the bad english, im not fluently yet.

      Regards,

      Jeferson Zanim

        • 1. Re: Database connection
          j.e.z

          Hi again,

          after some tests i discovered the true reason of the problem, but not a solution for it. If anybody know why it happens, tell me please:

          Exception in thread "JbpmCommandExecutor" java.lang.NoClassDefFoundError: org/hibernate/Session
           at org.jbpm.persistence.db.DbPersistenceServiceFactory.openService(DbPersistenceServiceFactory.java:55)
           at org.jbpm.svc.Services.getService(Services.java:136)
           at org.jbpm.svc.Services.getPersistenceService(Services.java:175)
           at org.jbpm.JbpmContext.getPersistenceService(JbpmContext.java:594)
           at org.jbpm.JbpmContext.getMessagingSession(JbpmContext.java:519)
           at org.jbpm.msg.db.DbMessageService.<init>(DbMessageService.java:49)
           at org.jbpm.msg.db.DbMessageServiceFactory.openService(DbMessageServiceFactory.java:32)
           at org.jbpm.svc.Services.getService(Services.java:136)
           at org.jbpm.svc.Services.getMessageService(Services.java:172)
           at org.jbpm.msg.command.CommandExecutorThread.executeCommand(CommandExecutorThread.java:112)
           at org.jbpm.msg.command.CommandExecutorThread.run(CommandExecutorThread.java:79)
          


          Thanks for help.

          Regards,
          Jeferson Zanim

          • 2. Re: Database connection

            It looks like you're missing the Hibernate JAR's in your JBoss AS.

            Regards.

            • 3. Re: Database connection

              If you have read the docs, then you should be aware that jBPM uses Hibernate to handle DB, hence the jars needed.

              Regards.

              • 4. Re: Database connection
                j.e.z

                Hi one more time,

                the last problem was a mistake with 'jbpm.cfg.xml' location. But, after solve it i got a new exception:

                org.jbpm.JbpmException: couldn't parse jbpm configuration from resource 'jbpm.cfg.xml'
                 at org.jbpm.JbpmConfiguration.getInstance(JbpmConfiguration.java:284)
                 at
                ...
                 at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
                Caused by: org.jbpm.JbpmException: no ObjectInfo class specified for element 'service'
                 at org.jbpm.JbpmConfiguration.getInstance(JbpmConfiguration.java:280)
                 ... 28 more
                


                Any idea of how can i solve it?

                Thank you again.

                Regards,
                Jeferson Zanim

                • 5. Re: Database connection
                  j.e.z

                  Additional comments:

                  I'm using Tomcat 5, MySQL 5 and jBPM 3.1.2

                  Regards,
                  Jeferson Zanim

                  • 6. Re: Database connection

                     

                    "J.E.Z" wrote:
                    Hi,

                    im a begginer at using jBPM. I copied the jbpm.war from the Starters Kit to my Tomcat/webapps.


                    Look at this: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=74781.

                    According to this, you need to deploy the jbpm.sar, not the jbpm.war; follow the instructions in the thread above to build the jbpm.sar connecting to your new DB.

                    Hope this helps.

                    • 7. after some tests i discovered the true reason of the problem
                      shaowenchang

                      Exception in thread "JbpmCommandExecutor" java.lang.NoClassDefFoundError: org/hibernate/Session
                      at org.jbpm.persistence.db.DbPersistenceServiceFactory.openService(DbPersistenceServiceFactory.java:55)
                      at org.jbpm.svc.Services.getService(Services.java:136)
                      at org.jbpm.svc.Services.getPersistenceService(Services.java:175)
                      at org.jbpm.JbpmContext.getPersistenceService(JbpmContext.java:594)
                      at org.jbpm.JbpmContext.getMessagingSession(JbpmContext.java:519)
                      at org.jbpm.msg.db.DbMessageService.(DbMessageService.java:49)
                      at org.jbpm.msg.db.DbMessageServiceFactory.openService(DbMessageServiceFactory.java:32)
                      at org.jbpm.svc.Services.getService(Services.java:136)
                      at org.jbpm.svc.Services.getMessageService(Services.java:172)
                      at org.jbpm.msg.command.CommandExecutorThread.executeCommand(CommandExecutorThread.java:112)
                      at org.jbpm.msg.command.CommandExecutorThread.run(CommandExecutorThread.java:79)

                      • 8. Re: Database connection
                        kukeltje

                        so?