13 Replies Latest reply on Nov 21, 2013 8:45 AM by epok_82

    How to enable the history log using a PostgreSQL database

    epok_82

      Hi to all,

       

      I would like to know how to enable the history log feature by using a PostgreSQL database in jBPM 5.4.

      Currently, I'm running my application as a standalone one in the Eclipse environment (CTRL-F11 to run, in few words).

      I created the persistence.xml file and put it in the META-INF folder inside the src directory:

       

      <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
        <persistence version="1.0" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd" xmlns:orm="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/persistence">
        <persistence-unit name="org.jbpm.persistence.jpa">
             <provider>org.hibernate.ejb.HibernatePersistence</provider>
             <jta-data-source>jdbc/processInstanceDS</jta-data-source>
             <class>org.jbpm.process.audit.ProcessInstanceLog</class>
             <properties>
                  <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"/>
                  <property name="hibernate.max_fetch_depth" value="3"/>
                  <property name="hibernate.hbm2ddl.auto" value="update"/>
                  <property name="hibernate.show_sql" value="true"/>
                  <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup"/>
             </properties>
        </persistence-unit>
        </persistence>
      

       

      At run-time I get an error of type Could not find EntityManager, both command-scoped EM and EMF in environment are null.

      Surely, I'm forgetting something (like hbm file?).

       

      Any help?

      Thanks !!

        • 1. Re: How to enable the history log using a PostgreSQL database
          swiderski.maciej

          You would need to configure entire jBPM persistence entities to make it work properly. Here you can find an example.

           

          Could you upload complete stack trace of the error. It's quite difficult to judge based on current info.

           

          HTH

          1 of 1 people found this helpful
          • 2. Re: How to enable the history log using a PostgreSQL database
            epok_82

            Hi Maciej,

             

            this is my code:

             

            // creates the knowledge base
            KnowledgeBuilder m_kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();
            // inserts the BPMN file into the knowledge base
            m_kbuilder.add(ResourceFactory.newFileResource("test.bpmn"), ResourceType.BPMN2);
            KnowledgeBase kbase = m_kbuilder.newKnowledgeBase();
            // create the entity manager factory and register it in the environment
            EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.persistence.jpa");
            Environment env = KnowledgeBaseFactory.newEnvironment();
            env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
            // create a new knowledge session that uses JPA to store the runtime state
            StatefulKnowledgeSession ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env);
            // activates the "History Log"
            JPAWorkingMemoryDbLogger logger = new JPAWorkingMemoryDbLogger(ksession);
            // creates a new instance of the process
            ksession.startProcess("it.ssi.cofire.bpmn.testProcess");
            ksession.dispose();
            logger.dispose();
            

             

            This is my persistence.xml file content:

             

            <?xml version="1.0" encoding="UTF-8"?>
            <persistence version="2.0"
              xmlns="http://java.sun.com/xml/ns/persistence" 
              xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">
            
            
              <persistence-unit name="org.jbpm.persistence.jpa.ddl" transaction-type="JTA">
                <provider>org.hibernate.ejb.HibernatePersistence</provider>
                <mapping-file>META-INF/JBPMorm-JPA2.xml</mapping-file>
                <mapping-file>META-INF/ProcessInstanceInfoMapping-JPA2.xml</mapping-file>
            
            
                <class>org.drools.persistence.info.SessionInfo</class>
                <class>org.drools.persistence.info.WorkItemInfo</class>    
                <class>org.jbpm.process.audit.ProcessInstanceLog</class>
                <class>org.jbpm.process.audit.NodeInstanceLog</class>
                <class>org.jbpm.process.audit.VariableInstanceLog</class>
            
            
                <properties>
                  <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
                  <property name="hibernate.max_fetch_depth" value="3" />
                  <property name="hibernate.hbm2ddl.auto" value="update" />
                  <property name="hibernate.show_sql" value="false" />
                  <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup" />
                  
                  <!-- BZ 841786: AS7/EAP 6/Hib 4 uses new (sequence) generators which seem to cause problems -->      
                  <property name="hibernate.id.new_generator_mappings" value="false" />
                </properties>
            
            
              </persistence-unit>
            </persistence>
            

             

            This is the stack trace (it seems that it can't find the datasource):

             

            Exception in runnable
            javax.persistence.PersistenceException: [PersistenceUnit: org.jbpm.persistence.jpa] Unable to build EntityManagerFactory
              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
              at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126)
              at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
              at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)
              at coFire.workflow.WorkflowManager.startProcess(WorkflowManager.java:118)
              at coFire.workflow.fxmlController.StartProcessInstanceController$1.handle(StartProcessInstanceController.java:104)
              at coFire.workflow.fxmlController.StartProcessInstanceController$1.handle(StartProcessInstanceController.java:1)
              at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:69)
              at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:217)
              at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:170)
              at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:38)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:37)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
              at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:53)
              at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:28)
              at javafx.event.Event.fireEvent(Event.java:171)
              at javafx.scene.Node.fireEvent(Node.java:6863)
              at javafx.scene.control.Button.fire(Button.java:179)
              at com.sun.javafx.scene.control.behavior.ButtonBehavior.mouseReleased(ButtonBehavior.java:193)
              at com.sun.javafx.scene.control.skin.SkinBase$4.handle(SkinBase.java:336)
              at com.sun.javafx.scene.control.skin.SkinBase$4.handle(SkinBase.java:329)
              at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:64)
              at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:217)
              at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:170)
              at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:38)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:37)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)
              at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:53)
              at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:33)
              at javafx.event.Event.fireEvent(Event.java:171)
              at javafx.scene.Scene$MouseHandler.process(Scene.java:3328)
              at javafx.scene.Scene$MouseHandler.process(Scene.java:3168)
              at javafx.scene.Scene$MouseHandler.access$1900(Scene.java:3123)
              at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1563)
              at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2265)
              at com.sun.javafx.tk.quantum.EmbeddedScene$2$1.run(EmbeddedScene.java:194)
              at com.sun.javafx.tk.quantum.EmbeddedScene$2$1.run(EmbeddedScene.java:176)
              at java.security.AccessController.doPrivileged(Native Method)
              at com.sun.javafx.tk.quantum.EmbeddedScene$2.run(EmbeddedScene.java:176)
              at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:179)
              at com.sun.javafx.application.PlatformImpl$4$1.run(PlatformImpl.java:176)
              at java.security.AccessController.doPrivileged(Native Method)
              at com.sun.javafx.application.PlatformImpl$4.run(PlatformImpl.java:176)
              at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
              at com.sun.glass.ui.win.WinApplication.access$100(WinApplication.java:29)
              at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:73)
              at java.lang.Thread.run(Unknown Source)
            Caused by: org.hibernate.HibernateException: Could not find datasource
              at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:56)
              at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:124)
              at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
              at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:62)
              at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
              at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
              at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
              at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
              ... 52 more
            Caused by: javax.naming.NameNotFoundException: unable to find a bound object at name 'jdbc/jbpm-ds'
              at bitronix.tm.jndi.BitronixContext.lookup(BitronixContext.java:83)
              at javax.naming.InitialContext.lookup(Unknown Source)
              at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:52)
              ... 59 more
            

             

            Some doubts...

            I put the persistence.xml file under \src\META-INF folder, is it correct?

            I don't have the files JBPMorm-JPA2.xml and ProcessInstanceInfoMapping-JPA2.xml under META-INF folder.

             

            Thanks for your help.

            • 3. Re: How to enable the history log using a PostgreSQL database
              epok_82

              Any help?

              • 4. Re: Re: How to enable the history log using a PostgreSQL database
                swiderski.maciej

                I believe persistence.xml should look like this:

                <?xml version="1.0" encoding="UTF-8"?>  
                <persistence version="2.0"  
                  xmlns="http://java.sun.com/xml/ns/persistence"   
                  xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"  
                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  
                  xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">  
                  
                  
                  <persistence-unit name="org.jbpm.persistence.jpa.ddl" transaction-type="JTA">  
                    <provider>org.hibernate.ejb.HibernatePersistence</provider> 
                    <jta-data-source>jdbc/jbpm</jta-data-source>  
                    <mapping-file>META-INF/JBPMorm-JPA2.xml</mapping-file>  
                    <mapping-file>META-INF/ProcessInstanceInfoMapping-JPA2.xml</mapping-file>  
                  
                  
                    <class>org.drools.persistence.info.SessionInfo</class>  
                    <class>org.drools.persistence.info.WorkItemInfo</class> 
                    <class>org.jbpm.process.audit.ProcessInstanceLog</class>  
                    <class>org.jbpm.process.audit.NodeInstanceLog</class>  
                    <class>org.jbpm.process.audit.VariableInstanceLog</class>  
                  
                  
                    <properties>  
                      <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />  
                      <property name="hibernate.max_fetch_depth" value="3" />  
                      <property name="hibernate.hbm2ddl.auto" value="update" />  
                      <property name="hibernate.show_sql" value="false" />  
                      <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup" />  
                        
                      <!-- BZ 841786: AS7/EAP 6/Hib 4 uses new (sequence) generators which seem to cause problems -->        
                      <property name="hibernate.id.new_generator_mappings" value="false" />  
                    </properties>  
                  
                  
                  </persistence-unit>  
                </persistence> 
                

                important part that i added - is the actual data source definition, and the manager_lookup_class to use bitronix as I believe you're running in standalone environment not on JBoss AS. Make sure you define the and start such data source (for example using bitronix transaction manager)

                 

                the mapping files are already included in jbpm-persistence-jpa jar file so you don't need to include them in your META-INF. If you use maven then persistence.xml should be located under src/main/resources/META-INF.

                 

                Please check if you don't have jbpm-test jar on your class path as it might get int the way and tries to start its persistence unit and that might be the reason of missing data source exception as your persistence.xml did not have such declaration.

                 

                HTH

                1 of 1 people found this helpful
                • 5. Re: Re: Re: How to enable the history log using a PostgreSQL database
                  epok_82

                  Hi Maciej,

                   

                  thanks for your reply.

                  First of all, I confirm that I'm running in standalone environment (very simple Eclipse project, no JBoss AS, no Maven).


                  This is my application code:


                  public class MainClass
                  {
                    public static void main(String[] args)
                    {
                    // creates the knowledge base 
                    KnowledgeBuilder m_kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); 
                    // inserts the BPMN file into the knowledge base 
                    m_kbuilder.add(ResourceFactory.newFileResource("sample3.bpmn"), ResourceType.BPMN2); 
                    KnowledgeBase kbase = m_kbuilder.newKnowledgeBase(); 
                    // creates the data source
                    PoolingDataSource ds = new PoolingDataSource();
                    ds.setUniqueName("jdbc/jbpm");
                    ds.setClassName("bitronix.tm.resource.jdbc.lrc.LrcXADataSource");
                    ds.setMaxPoolSize(3);
                    ds.setAllowLocalTransactions(true);
                    ds.getDriverProperties().put("user", "jbpm5");
                    ds.getDriverProperties().put("password", "jbpm5");
                    ds.getDriverProperties().put("URL", "jdbc:postgresql://localhost:5432/jbpm-db");
                    ds.getDriverProperties().put("driverClassName", "org.postgresql.Driver");
                    ds.init();
                    // create the entity manager factory and register it in the environment 
                    EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.persistence.jpa"); 
                    Environment env = KnowledgeBaseFactory.newEnvironment(); 
                    env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf); 
                    // create a new knowledge session that uses JPA to store the runtime state 
                    StatefulKnowledgeSession ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env); 
                    // activates the "History Log" 
                    JPAWorkingMemoryDbLogger logger = new JPAWorkingMemoryDbLogger(ksession); 
                    // creates a new instance of the process 
                    ksession.startProcess("it.ssi.cofire.bpmn.testProcess"); 
                    ksession.dispose(); 
                    logger.dispose();
                    }
                  }
                  

                   

                  I modified the content of persistence.xml file as you shown; I put it in the same package of my MainClass, is it correct?

                  I defined and started the data source by using the PoolingDataSource class of bitronix.tm.resource.jdbc, is it correct?

                  I deleted the jbpm-test jar in my classpath.

                  Currently, I get this exception:


                  Exception in thread "main" bitronix.tm.resource.ResourceConfigurationException: cannot create JDBC datasource named jdbc/jbpm
                         at bitronix.tm.resource.jdbc.PoolingDataSource.init(PoolingDataSource.java:80)
                         at it.ssi.testPackage.MainClass.main(MainClass.java:42)
                  Caused by: bitronix.tm.utils.PropertyException: no writeable property 'URL' in class 'bitronix.tm.resource.jdbc.lrc.LrcXADataSource'
                         at bitronix.tm.utils.PropertyUtils.getSetter(PropertyUtils.java:318)
                         at bitronix.tm.utils.PropertyUtils.setDirectProperty(PropertyUtils.java:217)
                         at bitronix.tm.utils.PropertyUtils.setProperty(PropertyUtils.java:83)
                         at bitronix.tm.resource.common.XAPool.createXAFactory(XAPool.java:314)
                         at bitronix.tm.resource.common.XAPool.<init>(XAPool.java:63)
                         at bitronix.tm.resource.jdbc.PoolingDataSource.buildXAPool(PoolingDataSource.java:89)
                         at bitronix.tm.resource.jdbc.PoolingDataSource.init(PoolingDataSource.java:76)
                    ... 1 more

                   

                  Any help?

                  Thanks

                  • 6. Re: How to enable the history log using a PostgreSQL database
                    swiderski.maciej

                    looks like there must be different properties given when bootstrapping pooling data source from bitronix:

                                    <property name="driverProperties">         

                                            <props>

                                                    <prop key="serverName">localhost</prop>

                                                    <prop key="databaseName">jbpm</prop>

                                                    <prop key="portNumber">5432</prop>

                                                    <prop key="user">postgres</prop>

                                                    <prop key="password">postgres</prop>

                                            </props>

                                    </property>

                    this are just example values from some config I used, but please check with bitronix documentation or some examples available on the net regarding bitronix and postgres.

                     

                    HTH

                    • 7. Re: Re: How to enable the history log using a PostgreSQL database
                      epok_82

                      Hi Maciej,

                       

                      big steps towards the solution

                      This is my updated application code with the correct use of bitronix.tm.resource.jdbc.PoolingDataSource class (I used postgresql-9.2-1002.jdbc4.jar JAR file):

                       

                      public class MainClass  
                      {  
                        public static void main(String[] args)  
                        {
                        // creates the knowledge base   
                        KnowledgeBuilder m_kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder();   
                        // inserts the BPMN file into the knowledge base   
                        m_kbuilder.add(ResourceFactory.newFileResource("sample3.bpmn"), ResourceType.BPMN2);
                        KnowledgeBase kbase = m_kbuilder.newKnowledgeBase();
                        // creates the data source
                        PoolingDataSource ds = new PoolingDataSource();
                        ds.setUniqueName("jdbc/jbpm-ds");
                        ds.setClassName("org.postgresql.xa.PGXADataSource");
                        ds.setMaxPoolSize(5);
                        ds.setAllowLocalTransactions(true);
                        ds.getDriverProperties().put("databaseName", "jbpm-db");
                        ds.getDriverProperties().put("user", "xxxx");
                        ds.getDriverProperties().put("password", "xxxx");
                        ds.getDriverProperties().put("serverName", "127.0.0.1");
                        ds.getDriverProperties().put("portNumber", "5432");
                        ds.init();
                        // create the entity manager factory and register it in the environment   
                        EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.persistence.jpa");   
                        Environment env = KnowledgeBaseFactory.newEnvironment();   
                        env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);   
                        // create a new knowledge session that uses JPA to store the runtime state   
                        StatefulKnowledgeSession ksession = JPAKnowledgeService.newStatefulKnowledgeSession(kbase, null, env);   
                        // activates the "History Log"   
                        JPAWorkingMemoryDbLogger logger = new JPAWorkingMemoryDbLogger(ksession);   
                        // creates a new instance of the process   
                        ksession.startProcess("it.ssi.cofire.bpmn.testProcess");   
                        ksession.dispose();   
                        logger.dispose();  
                        }  
                      }
                      

                       

                      A subset of tables have been created in the database but I get SQL errors like "ERROR: syntax error at or near "generated".

                      It seems the keyword "generated" is not recognized by PostgreSQL (I tried manually to use it in the SQL console and I get the same error).

                       

                      My doubt is that jBPM doesn't see my persistence.xml file. As I said in a previous post, I put it in the same default package of MainClass:

                      Is it correct?

                      persi.jpg

                      This is the complete errors log:

                       

                      0    15/11 15:52:04,834[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table Attachment (id bigint generated by default as identity, accessType integer, attachedAt timestamp, attachmentContentId bigint not null, contentType varchar(255), name varchar(255), attachment_size integer, attachedBy_id varchar(255), TaskData_Attachments_Id bigint, primary key (id))
                      3    15/11 15:52:04,837[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 36
                      4    15/11 15:52:04,838[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table BooleanExpression (id bigint generated by default as identity, expression clob, type varchar(255), Escalation_Constraints_Id bigint, primary key (id))
                      4    15/11 15:52:04,838[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 43
                      5    15/11 15:52:04,839[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table Content (id bigint generated by default as identity, content blob, primary key (id))
                      5    15/11 15:52:04,839[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 33
                      5    15/11 15:52:04,839[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table Deadline (id bigint generated by default as identity, deadline_date timestamp, escalated smallint, Deadlines_StartDeadLine_Id bigint, Deadlines_EndDeadLine_Id bigint, primary key (id))
                      5    15/11 15:52:04,839[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 34
                      6    15/11 15:52:04,840[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table Escalation (id bigint generated by default as identity, name varchar(255), Deadline_Escalation_Id bigint, primary key (id))
                      6    15/11 15:52:04,840[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 36
                      6    15/11 15:52:04,840[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table I18NText (id bigint generated by default as identity, language varchar(255), shortText varchar(255), text clob, Task_Subjects_Id bigint, Task_Names_Id bigint, Task_Descriptions_Id bigint, Reassignment_Documentation_Id bigint, Notification_Subjects_Id bigint, Notification_Names_Id bigint, Notification_Documentation_Id bigint, Notification_Descriptions_Id bigint, Deadline_Documentation_Id bigint, primary key (id))
                      7    15/11 15:52:04,841[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 34
                      7    15/11 15:52:04,841[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table NodeInstanceLog (id bigint generated by default as identity, log_date timestamp, nodeId varchar(255), nodeInstanceId varchar(255), nodeName varchar(255), processId varchar(255), processInstanceId bigint not null, type integer not null, primary key (id))
                      7    15/11 15:52:04,841[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 41
                      8    15/11 15:52:04,842[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table Notification (DTYPE varchar(31) not null, id bigint generated by default as identity, priority integer not null, Escalation_Notifications_Id bigint, primary key (id))
                      8    15/11 15:52:04,842[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 66
                      10   15/11 15:52:04,844[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table ProcessInstanceInfo (InstanceId bigint generated by default as identity, OPTLOCK integer, processId varchar(255), startDate timestamp, lastReadDate timestamp, lastModificationDate timestamp, state integer not null, processInstanceByteArray blob, primary key (InstanceId))
                      10   15/11 15:52:04,844[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 53
                      10   15/11 15:52:04,844[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table ProcessInstanceLog (id bigint generated by default as identity, end_date timestamp, outcome varchar(255), parentProcessInstanceId bigint, processId varchar(255), processInstanceId bigint not null, start_date timestamp, status integer, primary key (id))
                      10   15/11 15:52:04,844[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 44
                      11   15/11 15:52:04,845[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table Reassignment (id bigint generated by default as identity, Escalation_Reassignments_Id bigint, primary key (id))
                      11   15/11 15:52:04,845[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 38
                      11   15/11 15:52:04,845[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table SessionInfo (id integer generated by default as identity, lastModificationDate timestamp, rulesByteArray blob, startDate timestamp, OPTLOCK integer, primary key (id))
                      11   15/11 15:52:04,845[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 38
                      12   15/11 15:52:04,846[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table SubTasksStrategy (DTYPE varchar(100) not null, id bigint generated by default as identity, name varchar(255), Task_Id bigint, primary key (id))
                      12   15/11 15:52:04,846[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 71
                      13   15/11 15:52:04,847[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table Task (id bigint generated by default as identity, archived smallint, allowedToDelegate varchar(255), priority integer not null, activationTime timestamp, completedOn timestamp, createdOn timestamp, documentAccessType integer, documentContentId bigint not null, documentType varchar(255), expirationTime timestamp, faultAccessType integer, faultContentId bigint not null, faultName varchar(255), faultType varchar(255), outputAccessType integer, outputContentId bigint not null, outputType varchar(255), parentId bigint not null, previousStatus integer, processId varchar(255), processInstanceId bigint not null, processSessionId integer not null, skipable boolean not null, status varchar(255), workItemId bigint not null, OPTLOCK integer, taskInitiator_id varchar(255), actualOwner_id varchar(255), createdBy_id varchar(255), primary key (id))
                      13   15/11 15:52:04,847[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 30
                      13   15/11 15:52:04,847[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table VariableInstanceLog (id bigint generated by default as identity, log_date timestamp, processId varchar(255), processInstanceId bigint not null, value varchar(255), variableId varchar(255), variableInstanceId varchar(255), primary key (id))
                      13   15/11 15:52:04,847[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 45
                      14   15/11 15:52:04,848[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table WorkItemInfo (workItemId bigint generated by default as identity, creationDate timestamp, name varchar(255), processInstanceId bigint not null, state bigint not null, OPTLOCK integer, workItemByteArray blob, primary key (workItemId))
                      14   15/11 15:52:04,848[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 46
                      15   15/11 15:52:04,849[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table email_header (id bigint generated by default as identity, body clob, fromAddress varchar(255), language varchar(255), replyToAddress varchar(255), subject varchar(255), primary key (id))
                      15   15/11 15:52:04,849[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 38
                      15   15/11 15:52:04,849[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: create table task_comment (id bigint generated by default as identity, addedAt timestamp, text clob, addedBy_id varchar(255), TaskData_Comments_Id bigint, primary key (id))
                      15   15/11 15:52:04,849[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: syntax error at or near "generated"
                        Position: 38
                      16   15/11 15:52:04,850[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table Attachment add constraint FK1C935438EF5F064 foreign key (attachedBy_id) references OrganizationalEntity
                      16   15/11 15:52:04,850[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "attachment" does not exist
                      17   15/11 15:52:04,851[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table Attachment add constraint FK1C93543F21826D9 foreign key (TaskData_Attachments_Id) references Task
                      17   15/11 15:52:04,851[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "attachment" does not exist
                      17   15/11 15:52:04,851[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table BooleanExpression add constraint FKE3D208C0AFB75F7D foreign key (Escalation_Constraints_Id) references Escalation
                      17   15/11 15:52:04,851[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "booleanexpression" does not exist
                      18   15/11 15:52:04,852[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table Deadline add constraint FK21DF3E78684BACA3 foreign key (Deadlines_StartDeadLine_Id) references Task
                      18   15/11 15:52:04,852[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "deadline" does not exist
                      18   15/11 15:52:04,852[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table Deadline add constraint FK21DF3E7827ABEB8A foreign key (Deadlines_EndDeadLine_Id) references Task
                      18   15/11 15:52:04,852[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "deadline" does not exist
                      19   15/11 15:52:04,853[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table Delegation_delegates add constraint FK47485D5736B2F154 foreign key (task_id) references Task
                      19   15/11 15:52:04,853[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "task" does not exist
                      20   15/11 15:52:04,854[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table Escalation add constraint FK67B2C6B5C7A04C70 foreign key (Deadline_Escalation_Id) references Deadline
                      20   15/11 15:52:04,854[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "escalation" does not exist
                      20   15/11 15:52:04,854[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table EventTypes add constraint FKB0E5621F7665489A foreign key (InstanceId) references ProcessInstanceInfo
                      20   15/11 15:52:04,854[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "processinstanceinfo" does not exist
                      21   15/11 15:52:04,855[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table I18NText add constraint FK2349686B2162DFB4 foreign key (Notification_Descriptions_Id) references Notification
                      21   15/11 15:52:04,855[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "i18ntext" does not exist
                      21   15/11 15:52:04,855[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table I18NText add constraint FK2349686BD488CEEB foreign key (Notification_Names_Id) references Notification
                      21   15/11 15:52:04,855[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "i18ntext" does not exist
                      22   15/11 15:52:04,856[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table I18NText add constraint FK2349686B5EEBB6D9 foreign key (Reassignment_Documentation_Id) references Reassignment
                      22   15/11 15:52:04,856[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "i18ntext" does not exist
                      22   15/11 15:52:04,856[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table I18NText add constraint FK2349686B3330F6D9 foreign key (Deadline_Documentation_Id) references Deadline
                      22   15/11 15:52:04,856[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "i18ntext" does not exist
                      23   15/11 15:52:04,857[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table I18NText add constraint FK2349686B8046A239 foreign key (Notification_Documentation_Id) references Notification
                      23   15/11 15:52:04,857[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "i18ntext" does not exist
                      23   15/11 15:52:04,857[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table I18NText add constraint FK2349686B69B21EE8 foreign key (Task_Descriptions_Id) references Task
                      23   15/11 15:52:04,857[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "i18ntext" does not exist
                      24   15/11 15:52:04,858[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table I18NText add constraint FK2349686BB2FA6B18 foreign key (Task_Subjects_Id) references Task
                      24   15/11 15:52:04,858[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "i18ntext" does not exist
                      24   15/11 15:52:04,858[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table I18NText add constraint FK2349686B98B62B foreign key (Task_Names_Id) references Task
                      24   15/11 15:52:04,858[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "i18ntext" does not exist
                      25   15/11 15:52:04,859[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table I18NText add constraint FK2349686BF952CEE4 foreign key (Notification_Subjects_Id) references Notification
                      25   15/11 15:52:04,859[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "i18ntext" does not exist
                      25   15/11 15:52:04,859[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table Notification add constraint FK2D45DD0B3E0890B foreign key (Escalation_Notifications_Id) references Escalation
                      25   15/11 15:52:04,859[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "notification" does not exist
                      26   15/11 15:52:04,860[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table Notification_BAs add constraint FK2DD68EE09C76EABA foreign key (task_id) references Notification
                      26   15/11 15:52:04,860[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "notification" does not exist
                      27   15/11 15:52:04,861[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table Notification_Recipients add constraint FK98FD214E9C76EABA foreign key (task_id) references Notification
                      27   15/11 15:52:04,861[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "notification" does not exist
                      27   15/11 15:52:04,861[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table Notification_email_header add constraint FKF30FE3441F7B912A foreign key (emailHeaders_id) references email_header
                      27   15/11 15:52:04,861[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "email_header" does not exist
                      28   15/11 15:52:04,862[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table Notification_email_header add constraint FKF30FE34430BE501C foreign key (Notification_id) references Notification
                      28   15/11 15:52:04,862[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "notification" does not exist
                      29   15/11 15:52:04,863[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table PeopleAssignments_BAs add constraint FK9D8CF4EC36B2F154 foreign key (task_id) references Task
                      29   15/11 15:52:04,863[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "task" does not exist
                      29   15/11 15:52:04,863[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table PeopleAssignments_ExclOwners add constraint FKC77B97E436B2F154 foreign key (task_id) references Task
                      29   15/11 15:52:04,863[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "task" does not exist
                      30   15/11 15:52:04,864[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table PeopleAssignments_PotOwners add constraint FK1EE418D36B2F154 foreign key (task_id) references Task
                      30   15/11 15:52:04,864[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "task" does not exist
                      31   15/11 15:52:04,865[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table PeopleAssignments_Recipients add constraint FKC6F615C236B2F154 foreign key (task_id) references Task
                      31   15/11 15:52:04,865[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "task" does not exist
                      31   15/11 15:52:04,865[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table PeopleAssignments_Stakeholders add constraint FK482F79D536B2F154 foreign key (task_id) references Task
                      31   15/11 15:52:04,865[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "task" does not exist
                      32   15/11 15:52:04,866[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table Reassignment add constraint FK724D0560A5C17EE0 foreign key (Escalation_Reassignments_Id) references Escalation
                      32   15/11 15:52:04,866[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "reassignment" does not exist
                      33   15/11 15:52:04,867[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table Reassignment_potentialOwners add constraint FK90B59CFFE17E130F foreign key (task_id) references Reassignment
                      33   15/11 15:52:04,867[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "reassignment" does not exist
                      33   15/11 15:52:04,867[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table SubTasksStrategy add constraint FKDE5DF2E136B2F154 foreign key (Task_Id) references Task
                      33   15/11 15:52:04,867[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "subtasksstrategy" does not exist
                      34   15/11 15:52:04,868[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table Task add constraint FK27A9A59E619A0 foreign key (createdBy_id) references OrganizationalEntity
                      34   15/11 15:52:04,868[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "task" does not exist
                      35   15/11 15:52:04,869[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table Task add constraint FK27A9A56CE1EF3A foreign key (actualOwner_id) references OrganizationalEntity
                      35   15/11 15:52:04,869[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "task" does not exist
                      35   15/11 15:52:04,869[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table Task add constraint FK27A9A5F213F8B5 foreign key (taskInitiator_id) references OrganizationalEntity
                      35   15/11 15:52:04,869[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "task" does not exist
                      36   15/11 15:52:04,870[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table task_comment add constraint FK61F475A5B35E68F5 foreign key (TaskData_Comments_Id) references Task
                      36   15/11 15:52:04,870[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "task_comment" does not exist
                      36   15/11 15:52:04,870[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - Unsuccessful: alter table task_comment add constraint FK61F475A52FF04688 foreign key (addedBy_id) references OrganizationalEntity
                      36   15/11 15:52:04,870[main] ERROR tool.hbm2ddl.SchemaUpdate.execute  - ERROR: relation "task_comment" does not exist
                      1112 15/11 15:52:05,946[main] ERROR hibernate.util.JDBCExceptionReporter.logExceptions  - ERROR: relation "sessioninfo" does not exist
                        Position: 13
                      1114 15/11 15:52:05,948[main] ERROR drools.persistence.SingleSessionCommandService.rollbackTransaction  - Could not commit session
                      javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not insert: [org.drools.persistence.info.SessionInfo]
                        at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)
                        at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:226)
                        at org.drools.persistence.jpa.JpaPersistenceContext.persist(JpaPersistenceContext.java:24)
                        at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:153)
                        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
                        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
                        at java.lang.reflect.Constructor.newInstance(Unknown Source)
                        at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:128)
                        at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:66)
                        at org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:122)
                        at MainClass.main(MainClass.java:44)
                      Caused by: org.hibernate.exception.SQLGrammarException: could not insert: [org.drools.persistence.info.SessionInfo]
                        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
                        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
                        at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:64)
                        at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2176)
                        at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2656)
                        at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:71)
                        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
                        at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:321)
                        at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)
                        at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:130)
                        at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49)
                        at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154)
                        at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110)
                        at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:61)
                        at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:646)
                        at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:620)
                        at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:624)
                        at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:220)
                        ... 10 more
                      Caused by: org.postgresql.util.PSQLException: ERROR: relation "sessioninfo" does not exist
                        Position: 13
                        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
                        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
                        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
                        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
                        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
                        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                        at java.lang.reflect.Method.invoke(Unknown Source)
                        at org.postgresql.ds.jdbc23.AbstractJdbc23PooledConnection$StatementHandler.invoke(AbstractJdbc23PooledConnection.java:453)
                        at com.sun.proxy.$Proxy32.executeUpdate(Unknown Source)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                        at java.lang.reflect.Method.invoke(Unknown Source)
                        at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:63)
                        at com.sun.proxy.$Proxy33.executeUpdate(Unknown Source)
                        at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:94)
                        at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:57)
                        ... 25 more
                      Exception in thread "main" java.lang.IllegalStateException: java.lang.reflect.InvocationTargetException
                        at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:142)
                        at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.newStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:66)
                        at org.drools.persistence.jpa.JPAKnowledgeService.newStatefulKnowledgeSession(JPAKnowledgeService.java:122)
                        at MainClass.main(MainClass.java:44)
                      Caused by: java.lang.reflect.InvocationTargetException
                        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                        at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
                        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
                        at java.lang.reflect.Constructor.newInstance(Unknown Source)
                        at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:128)
                        ... 3 more
                      Caused by: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not insert: [org.drools.persistence.info.SessionInfo]
                        at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)
                        at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:226)
                        at org.drools.persistence.jpa.JpaPersistenceContext.persist(JpaPersistenceContext.java:24)
                        at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:153)
                        ... 8 more
                      Caused by: org.hibernate.exception.SQLGrammarException: could not insert: [org.drools.persistence.info.SessionInfo]
                        at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
                        at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
                        at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:64)
                        at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2176)
                        at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2656)
                        at org.hibernate.action.EntityIdentityInsertAction.execute(EntityIdentityInsertAction.java:71)
                        at org.hibernate.engine.ActionQueue.execute(ActionQueue.java:279)
                        at org.hibernate.event.def.AbstractSaveEventListener.performSaveOrReplicate(AbstractSaveEventListener.java:321)
                        at org.hibernate.event.def.AbstractSaveEventListener.performSave(AbstractSaveEventListener.java:204)
                        at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:130)
                        at org.hibernate.ejb.event.EJB3PersistEventListener.saveWithGeneratedId(EJB3PersistEventListener.java:49)
                        at org.hibernate.event.def.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:154)
                        at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:110)
                        at org.hibernate.event.def.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:61)
                        at org.hibernate.impl.SessionImpl.firePersist(SessionImpl.java:646)
                        at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:620)
                        at org.hibernate.impl.SessionImpl.persist(SessionImpl.java:624)
                        at org.hibernate.ejb.AbstractEntityManagerImpl.persist(AbstractEntityManagerImpl.java:220)
                        ... 10 more
                      Caused by: org.postgresql.util.PSQLException: ERROR: relation "sessioninfo" does not exist
                        Position: 13
                        at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
                        at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
                        at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
                        at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
                        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
                        at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                        at java.lang.reflect.Method.invoke(Unknown Source)
                        at org.postgresql.ds.jdbc23.AbstractJdbc23PooledConnection$StatementHandler.invoke(AbstractJdbc23PooledConnection.java:453)
                        at com.sun.proxy.$Proxy32.executeUpdate(Unknown Source)
                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                        at java.lang.reflect.Method.invoke(Unknown Source)
                        at bitronix.tm.resource.jdbc.BaseProxyHandlerClass.invoke(BaseProxyHandlerClass.java:63)
                        at com.sun.proxy.$Proxy33.executeUpdate(Unknown Source)
                        at org.hibernate.id.IdentityGenerator$GetGeneratedKeysDelegate.executeAndExtract(IdentityGenerator.java:94)
                        at org.hibernate.id.insert.AbstractReturningDelegate.performInsert(AbstractReturningDelegate.java:57)
                        ... 25 more
                      
                      • 8. Re: How to enable the history log using a PostgreSQL database
                        swiderski.maciej

                        persistence.xml must be inside META-INF directory to be loaded properly.

                         

                        HTH

                        • 9. Re: Re: How to enable the history log using a PostgreSQL database
                          epok_82

                          OK, I put the persistence.xml file in the META-INF folder of my project:

                          Untitled.jpg

                          I run the project and I get these warnings:

                          log4j:WARN No appenders could be found for logger (bitronix.tm.resource.jdbc.PoolingDataSource).
                          log4j:WARN Please initialize the log4j system properly.
                          log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
                          

                           

                          The program is blocked on the statement:

                          EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.persistence.jpa");
                          

                           

                          After a couple of minutes, I get:

                          Exception in thread "main" javax.persistence.PersistenceException: [PersistenceUnit: org.jbpm.persistence.jpa] Error while reading JPA XML file: META-INF/JBPMorm-JPA2.xml
                            at org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:909)
                            at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:758)
                            at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:191)
                            at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:253)
                            at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:125)
                            at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
                            at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)
                            at MainClass.main(MainClass.java:41)
                          Caused by: org.hibernate.InvalidMappingException: Could not parse mapping document from resource META-INF/JBPMorm-JPA2.xml
                            at org.hibernate.cfg.Configuration.addResource(Configuration.java:616)
                            at org.hibernate.cfg.AnnotationConfiguration.addResource(AnnotationConfiguration.java:957)
                            at org.hibernate.ejb.Ejb3Configuration.addClassesToSessionFactory(Ejb3Configuration.java:896)
                            ... 7 more
                          Caused by: org.hibernate.MappingException: invalid mapping
                            at org.hibernate.cfg.AnnotationConfiguration.addInputStream(AnnotationConfiguration.java:777)
                            at org.hibernate.cfg.AnnotationConfiguration.addInputStream(AnnotationConfiguration.java:64)
                            at org.hibernate.cfg.Configuration.addResource(Configuration.java:613)
                            ... 9 more
                          Caused by: org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 32; cvc-complex-type.3.1: Value '2.0' of attribute 'version' of element 'entity-mappings' is not valid with respect to the corresponding attribute use. Attribute 'version' has a fixed value of '1.0'.
                            at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
                            at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processOneAttribute(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.processAttributes(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl$NSContentDriver.scanRootElementHook(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
                            at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
                            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
                            at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
                            at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
                            at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
                            at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
                            at org.dom4j.io.SAXReader.read(SAXReader.java:465)
                            at org.hibernate.cfg.AnnotationConfiguration.addInputStream(AnnotationConfiguration.java:773)
                            ... 11 more
                          

                           

                          Thanks for any help

                          • 10. Re: How to enable the history log using a PostgreSQL database
                            swiderski.maciej

                            looks like you're using JPA 2 (as defined in persistence.xml) but use hibernate version 3.x on your classpath. Change either version of hibernate to be 4.x or downgrade persistence.xml to version 1.0 including names of mapping files.

                             

                            HTH

                            • 11. Re: Re: How to enable the history log using a PostgreSQL database
                              epok_82

                              Thanks for your tips.

                              I tried to upgrade Hibernate to 4.2.7 and history logs works in my Eclipse standalone project but unfortunately in the "official" project I can't do this because there's "legacy" code that use Hibernate 3.

                               

                              Therefore, I tried second solution (downgrade persistence.xml to 1.0) but I get this error log:

                              log4j:WARN No appenders could be found for logger (bitronix.tm.resource.jdbc.PoolingDataSource).
                              log4j:WARN Please initialize the log4j system properly.
                              log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
                              Exception in thread "main" javax.persistence.PersistenceException: [PersistenceUnit: org.jbpm.persistence.jpa] Unable to build EntityManagerFactory
                                at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:677)
                                at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:126)
                                at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
                                at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:34)
                                at MainClass.main(MainClass.java:41)
                              Caused by: org.hibernate.HibernateException: Could not find datasource
                                at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:79)
                                at org.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:137)
                                at org.hibernate.ejb.InjectionSettingsFactory.createConnectionProvider(InjectionSettingsFactory.java:29)
                                at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:89)
                                at org.hibernate.cfg.Configuration.buildSettingsInternal(Configuration.java:2119)
                                at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2115)
                                at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1339)
                                at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:867)
                                at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:669)
                                ... 4 more
                              Caused by: javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file:  java.naming.factory.initial
                                at javax.naming.spi.NamingManager.getInitialContext(Unknown Source)
                                at javax.naming.InitialContext.getDefaultInitCtx(Unknown Source)
                                at javax.naming.InitialContext.getURLOrDefaultInitCtx(Unknown Source)
                                at javax.naming.InitialContext.lookup(Unknown Source)
                                at org.hibernate.connection.DatasourceConnectionProvider.configure(DatasourceConnectionProvider.java:75)
                                ... 12 more
                              

                               

                              I'm not sure about the content of these files...

                              Can you help me? Thanks a lot

                               

                              persistence.xml

                              <?xml version="1.0" encoding="UTF-8"?>    
                              <persistence version="1.0"
                                xmlns="http://java.sun.com/xml/ns/persistence"
                                xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
                                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
                                http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
                                http://java.sun.com/xml/ns/persistence/orm
                                http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">
                              
                              
                                <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">    
                                  <provider>org.hibernate.ejb.HibernatePersistence</provider>   
                                  <jta-data-source>jdbc/jbpm-ds</jta-data-source>    
                                  <mapping-file>META-INF/JBPMorm.xml</mapping-file>    
                                  <mapping-file>META-INF/ProcessInstanceInfoMapping.xml</mapping-file>    
                              
                              
                                  <class>org.drools.persistence.info.SessionInfo</class>    
                                  <class>org.drools.persistence.info.WorkItemInfo</class>   
                                  <class>org.jbpm.process.audit.ProcessInstanceLog</class>    
                                  <class>org.jbpm.process.audit.NodeInstanceLog</class>    
                                  <class>org.jbpm.process.audit.VariableInstanceLog</class>    
                              
                              
                                  <properties>    
                                    <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />    
                                    <property name="hibernate.max_fetch_depth" value="3" />    
                                    <property name="hibernate.hbm2ddl.auto" value="update" />    
                                    <property name="hibernate.show_sql" value="false" />    
                                    <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup" />    
                              
                              
                                    <!-- BZ 841786: AS7/EAP 6/Hib 4 uses new (sequence) generators which seem to cause problems -->          
                                    <property name="hibernate.id.new_generator_mappings" value="false" />    
                                  </properties>    
                              
                              
                                </persistence-unit>    
                              </persistence>
                              
                              
                              
                              
                              
                              <!-- BZ 841786: AS7/EAP 6/Hib 4 uses new (sequence) generators which seem to cause problems -->          
                                    <property name="hibernate.id.new_generator_mappings" value="false" />    
                                  </properties>    
                              
                              
                                </persistence-unit>    
                              </persistence>
                              
                              

                               

                              ProcessInstanceInfoMapping.xml

                              <?xml version="1.0" encoding="UTF-8"?>
                              <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
                                      "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
                              <hibernate-mapping package="org.jbpm.persistence.processinstance">
                              
                              
                                  <!-- access="field" for fields that have no setter methods -->
                                  <class name="ProcessInstanceInfo" table="ProcessInstanceInfo">
                                  
                                      <id name="processInstanceId" type="long" column="InstanceId">
                                          <generator class="native" />
                                      </id>
                                      
                                      <version name="version" type="integer" unsaved-value="null" access="field">
                                        <column name="OPTLOCK" not-null="false" />
                                      </version>
                                      
                                      <property name="processId" access="field" />
                                      <property name="startDate" type="timestamp" access="field" />
                                      <property name="lastReadDate" type="timestamp"  access="field" />
                                      <property name="lastModificationDate" type="timestamp" access="field" />
                                      <property name="state" type="integer" not-null="true" access="field" />
                                     
                                     <property name="processInstanceByteArray" type="org.hibernate.type.PrimitiveByteArrayBlobType" 
                                          column="processInstanceByteArray" access="field" length="2147483647" />
                              
                              
                                      <set name="eventTypes" table="EventTypes" access="field" >
                                          <key column="InstanceId"/>
                                          <element column="element" type="string"/>
                                      </set>
                                  
                                      <!-- NOT mapping [processInstance] field because field is transient -->    
                                      <!-- NOT mapping [env] field because field is transient -->    
                                      
                                  </class>
                              
                              
                              </hibernate-mapping>
                              
                              
                              
                              
                              
                              
                              
                              
                              • 12. Re: How to enable the history log using a PostgreSQL database
                                swiderski.maciej

                                the error means there is no jndi configured properly and thus it cannot look up the data source. You should have jndi.properties file in on the class path

                                 

                                HTH

                                • 13. Re: Re: How to enable the history log using a PostgreSQL database
                                  epok_82

                                  Many many many many thanks Maciej, it works !!

                                   

                                  jndi.properties

                                  java.naming.factory.initial=bitronix.tm.jndi.BitronixInitialContextFactory
                                  

                                   

                                  persistence.xml

                                  <?xml version="1.0" encoding="UTF-8"?>
                                  <persistence version="1.0"
                                     xmlns="http://java.sun.com/xml/ns/persistence"
                                     xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
                                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                                     xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
                                     http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
                                     http://java.sun.com/xml/ns/persistence/orm
                                     http://java.sun.com/xml/ns/persistence/orm_2_0.xsd">
                                  
                                  
                                     <persistence-unit name="org.jbpm.persistence.jpa" transaction-type="JTA">
                                        <provider>org.hibernate.ejb.HibernatePersistence</provider>
                                        <jta-data-source>jdbc/jbpm-ds</jta-data-source>
                                        <mapping-file>META-INF/JBPMorm.xml</mapping-file>
                                        <mapping-file>META-INF/ProcessInstanceInfo.hbm.xml</mapping-file>
                                  
                                  
                                        <class>org.drools.persistence.info.SessionInfo</class>
                                        <class>org.drools.persistence.info.WorkItemInfo</class>
                                        <class>org.jbpm.process.audit.ProcessInstanceLog</class>
                                        <class>org.jbpm.process.audit.NodeInstanceLog</class>
                                        <class>org.jbpm.process.audit.VariableInstanceLog</class>
                                  
                                  
                                        <properties>
                                              <property name="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect" />
                                              <property name="hibernate.max_fetch_depth" value="3" />
                                              <property name="hibernate.hbm2ddl.auto" value="update" />
                                              <property name="hibernate.show_sql" value="false" />
                                              <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.BTMTransactionManagerLookup" />
                                              <!-- BZ 841786: AS7/EAP 6/Hib 4 uses new (sequence) generators which seem to cause problems -->
                                              <property name="hibernate.id.new_generator_mappings" value="false" />
                                        </properties>
                                  
                                  
                                     </persistence-unit>
                                  
                                  
                                  
                                  
                                  
                                  
                                  
                                  
                                  </persistence>