3 Replies Latest reply on Aug 31, 2011 11:57 AM by saig0

    Problem with hibernate configuration for JBPM

    jbpm_4_user

      Hi,

       

      I'm new to JBPM and have some problems with database configuration for hibernate in jbpm.hibernate.cfg.xml file. I would like to use values for hibernate.connection.url, hibernate.connection.username and hibernate.connection.password properties from configuration.properties file (which is located in the tomcat's lib directory) but adding it like this, doesn't work:

       

       

       

      The error I get is:

       

       

      Thanks.

        • 1. Re: Problem with hibernate configuration for JBPM
          jbpm_4_user

          Sry, the configuration and error message wasn't added with previous post:

           

          <property name="hibernate.connection.url">${database.url}</property>
          <property name="hibernate.connection.username">${database.username}</property>
          <property name="hibernate.connection.password">${database.password}</property>

           

          And the error message:

          [WARN ] 23.08.11 16:00:40 - org.hibernate.connection.UserSuppliedConnectionProvider - No connection properties specified - the user must supply JDBC connections

          [ERROR] 23.08.11 16:00:41 - org.jbpm.pvm.internal.tx.HibernateSessionResource - hibernate transaction begin failed.  closing hibernate session

          java.lang.UnsupportedOperationException: The user must supply a JDBC connection

              at org.hibernate.connection.UserSuppliedConnectionProvider.getConnection(UserSuppliedConnectionProvider.java:54)

              at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:446)

              at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:167)

              at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:142)

              at org.hibernate.transaction.JDBCTransaction.begin(JDBCTransaction.java:85)

              at org.hibernate.impl.SessionImpl.beginTransaction(SessionImpl.java:1353)

              at org.jbpm.pvm.internal.tx.HibernateSessionResource.<init>(HibernateSessionResource.java:44)

              at org.jbpm.pvm.internal.wire.descriptor.HibernateSessionDescriptor.construct(HibernateSessionDescriptor.java:87)

              at org.jbpm.pvm.internal.wire.WireContext.construct(WireContext.java:487)

              at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:466)

              at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:455)

              at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:429)

              at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:339)

              at org.jbpm.pvm.internal.wire.WireContext.get(WireContext.java:704)

              at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:132)

              at org.jbpm.pvm.internal.env.BasicEnvironment.get(BasicEnvironment.java:123)

              at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:207)

              at org.jbpm.pvm.internal.env.EnvironmentImpl.getFromCurrent(EnvironmentImpl.java:196)

              at org.jbpm.pvm.internal.cmd.CheckDbCmd.execute(CheckDbCmd.java:44)

              at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)

              at org.jbpm.pvm.internal.tx.StandardTransactionInterceptor.execute(StandardTransactionInterceptor.java:50)

              at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.executeInNewEnvironment(EnvironmentInterceptor.java:53)

          • 2. Re: Problem with hibernate configuration for JBPM
            maxandersen

            moved to jbpm forum.

            • 3. Re: Problem with hibernate configuration for JBPM
              saig0

              you can use spring to inject a session factory