6 Replies Latest reply on Jul 18, 2006 1:33 AM by David Hosier

    Transactions fail due to confiuration of Persistence

    kazam Newbie

      Hi there,
      I have recently shifted my JBPM database to oracle 10g successfully but now persistence of processes is not working.
      I believe the reason is the following, I have configured an jbpm-ds.xml file in the deploy directory but below HiLo points to DefaultDS where there is no such source. I have tried to locate the configuration file making this pointer but to no avail.

      --- MBeans waiting for other MBeans ---
      ObjectName: jboss:service=KeyGeneratorFactory,type=HiLo
       State: CONFIGURED
       I Depend On:
       jboss:service=TransactionManager
       jboss.jca:name=DefaultDS,service=DataSourceBinding
      
      --- MBEANS THAT ARE THE ROOT CAUSE OF THE PROBLEM ---
      ObjectName: jboss.jca:name=DefaultDS,service=DataSourceBinding
       State: NOTYETINSTALLED
       Depends On Me:
       jboss:service=KeyGeneratorFactory,type=HiLo
      



      Please, provide some help.
      Thanks, Kazam.

        • 1. Re: Transactions fail due to confiuration of Persistence
          kazam Newbie

          I couldn't find the file configuring HiLo so, I changed all references to jbpmDS to DefaultDS.
          Now, however, I am getting the error of missing table HILOSEQUENCES

          Problem starting service jboss:service=KeyGeneratorFactory, type=HiLo
          java.sql.SQLException : ORA-00942:table or view does not exist
          


          Thanks, Kazam.

          • 2. Re: Transactions fail due to confiuration of Persistence
            kazam Newbie

            I tried to create the table directly into the schema, but the reply is still table or view doesn't exist.

            I think the entry for hilo configuration is not pointing to correct schema.

            If someone knows how to configure hiLo please, respond.
            Thanks, Kazam.

            • 3. Re: Transactions fail due to confiuration of Persistence
              falazar Novice

              Im not sure about the hilo part, but for oracle, we created and used teh OracleDS instead:

              Making the JBPM Web Application use our Oracle DataSource

              The first is ${JBOSS_HOME}/server/jbpm/deploy/jbpm.sar/META-INF/jboss-service.xml, which is used to control what DataSource the JBPM web application uses for its discrete JDBC activity.

              We want this file to look like this:

              <?xml version="1.0" encoding="UTF-8"?>
              <server>
               <mbean code="org.jbpm.db.jmx.JbpmService"
               name="jboss.jbpm:name=DefaultJbpm,service=JbpmService"
               description="Default jBPM Service">
               <attribute name="JndiName">java:/jbpm/JbpmConfiguration</attribute>
               <depends>jboss.jca:service=DataSourceBinding,name=OracleDS</depends>
               </mbean>
              </server>
              


              (this is taken from teh Oracle JBMP wiki page I sent you, which has some more instructions as well)

              • 4. Re: Transactions fail due to confiuration of Persistence
                kazam Newbie

                Hi,
                I changed the database for JBPM back to HSSQL but still same issue.
                I have found that the persistence fails only for IdentitySession.

                JbpmContext context = JbpmConfiguratoin.getInstance().createJbpmContext();
                Session session = jbpmContext.getSession();
                IdentitySession idsession = new IdentitySession(session);
                idesession.beginTransaction();
                .....
                idsessoin.saveGroup(aGroup);
                idsession.commitTransaction();
                idsessoin.close();
                finally
                {
                jbpmContext.close{}
                
                }
                

                Error
                org.jbpm.persistence.JbpmPersistenceException: coudlnt commit hibernate sessoin.
                transaction not successfully started.


                • 5. Re: Transactions fail due to confiuration of Persistence
                  kazam Newbie

                  Just wanted to add, that I can easily loadGroup() from the database using identitySession and saveGroup() without committing. But as soon as I commit, the persistence service fails.

                  Please help!
                  Thanks.

                  • 6. Re: Transactions fail due to confiuration of Persistence
                    David Hosier Novice

                    The configuration for the HiLo stuff is in deploy/uuid-key-generator.sar/META-INF/jboss-service.xml. I think that's really I'm able to add on this topic. I've been using Oracle10g with jBPM, and I left HSQL deployed for some of that junk like the HiLo, and I haven't noticed any issues with jBPM or the identity component. I'll try to look more closely as time permits, unless of course someone else comes to the rescue.