cancel
Showing results for 
Search instead for 
Did you mean: 

Verbose JPA Configuration

jenniferritz
Champ in-the-making
Champ in-the-making
Newbie question:

We recently switched to utilizing JPA for data access within Activiti,  and our output console started getting very verbose when executing Activiti SQL.  We are using slf4j and log4j. I have tried limiting the logging level for both Activiti and Hibernate JPA and have not been able to stop the verbose chatter in the console and have noted that the console chatter does not appear to have a logging level associated with it.  Can someone point me towards information on configuring the logging to reduce the SQL chatter from Activiti with JPA?

   
     <!–  JNDI Data Source Definitions –>
   <jee:jndi-lookup id="datasource11g" jndi-name="/jdbc/orclhcadev" resource-ref="true" />

   <!– Configure the transaction manager beans –>
   <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
      <property name="entityManagerFactory" ref="entityManagerFactory" />
   </bean>

   <!–  Activiti Engine Startup Configuration –>
   <bean id="processEngineConfiguration" class="org.activiti.spring.SpringProcessEngineConfiguration">
      <property name="databaseType" value="oracle" />
      <property name="dataSource" ref="datasource11g" />
      <property name="transactionManager" ref="transactionManager" />
      <property name="jobExecutorActivate" value="false" />
      <property name="history" value="full" />
      <property name="databaseSchemaUpdate" value="true" />      
   </bean>
4 REPLIES 4

gokceng1
Champ in-the-making
Champ in-the-making
Maybe this one?

log4j.logger.org.apache.ibatis.level=INFO

jbarrez
Star Contributor
Star Contributor
Indeed, check the log4j.properties logging file and set to the appropriate level (eg WARN if you really want to limit the logging)

jenniferritz
Champ in-the-making
Champ in-the-making
Thanks for the quick responses.  Both of which I had tried,  but we did find the culprit.  ShowSQL was set to TRUE on the Hibernate configuration.

Setting it to false solved our issue.

<!– Configure the JPA Vendor –>
<bean id="hibernateJpaVendorAdapter" class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
  <property name="databasePlatform" value="org.hibernate.dialect.Oracle10gDialect" />
  <property name="showSql" value="true" />
  <property name="generateDdl" value="false" />
</bean>

frederikherema1
Star Contributor
Star Contributor
Nice to see your issue got solved.