Hello
I tried to set the show_sql attribute of hibernate in to different ways.
1. via the hibernate.properties
Code:<?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"> <hibernate-configuration> <session-factory> <property name="show_sql">true</property> <property name="dialect">org.hibernate.dialect.Oracle9Dialect</property> </session-factory> </hibernate-configuration>
2. via the Spring config file
Unfortunately the log file tells me in both situationsCode:<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="hibernateProperties"> <props> <prop key="hibernate.show_sql">true</prop> </props> </property> <property name="dataSource"> <ref bean="dataSource"/> </property> <property name="mappingDirectoryLocations"> <list> <value>classpath:/com/praemed/database/data</value> </list> </property> </bean>
and no SQL Code is displayed, but he has no problems with the dialect attribute.Code:2005-06-21 09:40:17,271 INFO [org.hibernate.cfg.SettingsFactory] - JDBC driver: Oracle JDBC driver, version: 9.2.0.1.0 2005-06-21 09:40:17,301 INFO [org.hibernate.dialect.Dialect] - Using dialect: org.hibernate.dialect.Oracle9Dialect 2005-06-21 09:40:17,311 INFO [org.hibernate.transaction.TransactionFactoryFactory] - Using default transaction strategy (direct JDBC transactions) 2005-06-21 09:40:17,311 INFO [org.hibernate.transaction.TransactionManagerLookupFactory] - No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended) 2005-06-21 09:40:17,311 INFO [org.hibernate.cfg.SettingsFactory] - Automatic flush during beforeCompletion(): disabled 2005-06-21 09:40:17,311 INFO [org.hibernate.cfg.SettingsFactory] - Automatic session close at end of transaction: disabled 2005-06-21 09:40:17,311 INFO [org.hibernate.cfg.SettingsFactory] - JDBC batch size: 15 2005-06-21 09:40:17,311 INFO [org.hibernate.cfg.SettingsFactory] - JDBC batch updates for versioned data: disabled 2005-06-21 09:40:17,321 INFO [org.hibernate.cfg.SettingsFactory] - Scrollable result sets: enabled 2005-06-21 09:40:17,321 INFO [org.hibernate.cfg.SettingsFactory] - JDBC3 getGeneratedKeys(): disabled 2005-06-21 09:40:17,321 INFO [org.hibernate.cfg.SettingsFactory] - Connection release mode: null 2005-06-21 09:40:17,321 INFO [org.hibernate.cfg.SettingsFactory] - Default batch fetch size: 1 2005-06-21 09:40:17,321 INFO [org.hibernate.cfg.SettingsFactory] - Generate SQL with comments: disabled
TIA
Best regards
Johan


Reply With Quote