2 Replies Latest reply on Apr 1, 2010 4:37 AM by tejjbpm

    JBPM Hibernate logging

    tejjbpm

      Hi All,

       

      I have implemented JBPM successfully on Apache Tomcat 6.0.20. But I have an annoying problem with the hibernate logs.

       

      The following lines are written to the my Apache log files repeatedly even when the system is not in use( but the Apache is still running).

      Can anybody suggest how to turn off logging or reduce it to write only INFO messages.

       

      My hibernate.cfg file looks like this. Can I add some line here or where is the log4j.properties file which these uses.Thanks a lot for your help.

      --------------------------------

       

      <hibernate-configuration>

      <session-factory>


      <property name="hibernate.dialect">org.hibernate.dialect.MySQLInnoDBDialect</property>

       

      <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>

          <property name="hibernate.connection.url">jdbc:mysql://localhost/project</property>

          <property name="hibernate.connection.username">root</property>

          <property name="hibernate.connection.password">root</property>

        <!--

      <property name="connection.datasource">java:comp/env/jdbc/hsbc</property>

      <property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>

      <property name="jta.UserTransaction">java:comp/UserTransaction</property> -->


          <property name="hibernate.format_sql">true</property>

         

          <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>


      <mapping resource="jbpm.repository.hbm.xml" />

      <mapping resource="jbpm.execution.hbm.xml" />

      <mapping resource="jbpm.history.hbm.xml" />

      <mapping resource="jbpm.task.hbm.xml" />

      <mapping resource="jbpm.identity.hbm.xml" />


      </session-factory>

      </hibernate-configuration>

       

      LOG FILE

      --------------

       

      2010-03-31 13:36:47,399 [DispatcherThread] DEBUG (Log4jLog.java:60) - ----- beginning hibernate tx 13474557 --------------------------------------------------------
      2010-03-31 13:36:47,399 [DispatcherThread] DEBUG (Log4jLog.java:60) - ----- committing hibernate tx 23728357 -------------------------------------------------------
      2010-03-31 13:36:47,399 [DispatcherThread] DEBUG (Log4jLog.java:60) - ----- beginning hibernate tx 3151278 --------------------------------------------------------
      2010-03-31 13:36:47,399 [DispatcherThread] DEBUG (Log4jLog.java:60) - ----- committing hibernate tx 29278373 -------------------------------------------------------
      2010-03-31 13:36:47,915 [DispatcherThread] DEBUG (Log4jLog.java:60) - ----- beginning hibernate tx 24882950 --------------------------------------------------------
      2010-03-31 13:36:47,915 [DispatcherThread] DEBUG (Log4jLog.java:60) - ----- committing hibernate tx 28170956 -------------------------------------------------------
      2010-03-31 13:36:47,915 [DispatcherThread] DEBUG (Log4jLog.java:60) - ----- beginning hibernate tx 27296167 --------------------------------------------------------
      2010-03-31 13:36:47,915 [DispatcherThread] DEBUG (Log4jLog.java:60) - ----- committing hibernate tx 30551235 -----------------------
        • 1. Re: JBPM Hibernate logging
          swiderski.maciej

          look for logging.properties on your classpath. It is part of jBPM distribution but it is difficult to tell exactly where it on your environment setup.

          Here you can find some information about logging: http://docs.jboss.com/jbpm/v4/devguide/html_single/#softwarelogging

           

          As you will see in dev guide you can use log4j.

           

          HTH

          Maciej

          1 of 1 people found this helpful
          • 2. Re: JBPM Hibernate logging
            tejjbpm

            Hi Maciej,

             

            Thanks very much for the reply and the link. I found some useful information on the link and now I have a better understanding of were to log for what logs.

             

            I have fixed this issue by placing a commons-logging.properties file and log4j.properties file in my project classpath. There already was one logging.properties in my Apache conf folder but that was not able to disable hibernate logging.

             

            After placing the above two files with appropriate properties I was able to achieve what I wanted.

             

            Cheers