Joined: Mon Jun 20, 2005 2:38 am Posts: 3
|
Hey Hello!
We have serious problems with hibernate on a tomcat 5.0 server under Fedora Core 4. We've tested the config and the sources successfully under a windows xp system with tomcat 5.5. The problem is in the initiating sequence of hibernate at intantiating and configuring caches. The whole logging process crashes down after this line: net.sf.hibernate.cfg.Configuration - instantiating and configuring caches (for more see the following log files).
But there ist no log with an error or info or debug message. If we put an bad XML line in the ehcache.xml the whole progress goes on but crashes during an error while map the Object in the Database (cause Hibernate not finally configured). :-)
We dont know whats goes wrong during the cache config. Can anybody help us with this. Anny suggestions are welcome to us.
Hibernate version: 2.1.8
Hibernate Config File:
Code: <?xml version='1.0' encoding='utf-8'?> <!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN" "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"> <hibernate-configuration> <session-factory> <property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property> <property name="hibernate.connection.url">jdbc:mysql://localhost/sipuser</property> <property name="hibernate.connection.username">XXXXX</property> <property name="hibernate.connection.password">XXXXX</property> <property name="hibernate.connection.pool_size">10</property> <property name="show_sql">true</property> <property name="dialect">net.sf.hibernate.dialect.MySQLDialect</property> <property name="hibernate.dialect">net.sf.hibernate.dialect.MySQLDialect</property> <property name="hibernate.hbm2ddl.auto">update</property> <!-- Mapping files --> <mapping resource="User.hbm.xml"/> </session-factory> </hibernate-configuration>
Mapping File: Code: <?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 2.0//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping> <class name="xxx.yyy.zzz.User" table="User"> <cache usage="read-write" /> <id name="idUser" column="iduser" type="integer"> <generator class="increment"/> </id> <property name="userIP" column="userip" type="string"/> <property name="userInitial" column="userinitial" type="string"/> <property name="userFName" column="userfname" type="string"/> <property name="userLName" column="userlname" type="string"/> <property name="userCompany" column="usercompany" type="string"/> <property name="userMail" column="usermail" type="string"/> <property name="sipName" column="sipname" type="string"/> <property name="sipAddress" column="sipaddress" type="string"/> <property name="sipScreenName" column="sipscreenname" type="string"/> <property name="role" column="role" type="string"/> <property name="status" column="status" type="string"/> </class> </hibernate-mapping>
EHCache Config FileCode: <?xml version='1.0' encoding='utf-8'?> <ehcache> <diskStore path="/tmp"/> <defaultCache maxElementsInMemory="100" eternal="false" timeToIdleSeconds="120" timeToLiveSeconds="120" overflowToDisk="true" diskPersistent="false" diskExpiryThreadIntervalSeconds="120" /> <cache name="xxx.yyy.zzz.User" maxElementsInMemory="100" eternal="false" overflowToDisk="true" /> <!-- </ehcache>
Code between sessionFactory.openSession() and session.close():Simple save of an User Object. Code: session.save(aUser);
Full stack trace of any exception that occurs:
Log File on Tomcat Server Version 5.0 With SOAP 2.3.1 LogLevel: INFO
2005-06-20 08:34:26,085 [http-8080-Processor25] INFO PacketCaller.log - Initializing Hibernate! 2005-06-20 08:34:26,533 [http-8080-Processor25] INFO net.sf.hibernate.cfg.Environment - Hibernate 2.1.8 2005-06-20 08:34:26,537 [http-8080-Processor25] INFO net.sf.hibernate.cfg.Environment - hibernate.properties not found 2005-06-20 08:34:26,551 [http-8080-Processor25] INFO net.sf.hibernate.cfg.Environment - using CGLIB reflection optimizer 2005-06-20 08:34:26,556 [http-8080-Processor25] INFO net.sf.hibernate.cfg.Environment - using JDK 1.4 java.sql.Timestamp handling 2005-06-20 08:34:26,590 [http-8080-Processor25] INFO net.sf.hibernate.cfg.Configuration - configuring from resource: /hibernate.cfg.xml 2005-06-20 08:34:26,590 [http-8080-Processor25] INFO net.sf.hibernate.cfg.Configuration - Configuration resource: /hibernate.cfg.xml 2005-06-20 08:34:28,578 [http-8080-Processor25] INFO net.sf.hibernate.cfg.Configuration - Mapping resource: User.hbm.xml 2005-06-20 08:34:29,975 [http-8080-Processor25] INFO net.sf.hibernate.cfg.Binder - Mapping class: xxx.yyy.zzz.User -> User 2005-06-20 08:34:31,522 [http-8080-Processor25] INFO net.sf.hibernate.cfg.Configuration - Configured SessionFactory: null 2005-06-20 08:34:31,523 [http-8080-Processor25] INFO net.sf.hibernate.cfg.Configuration - processing one-to-many association mappings 2005-06-20 08:34:31,524 [http-8080-Processor25] INFO net.sf.hibernate.cfg.Configuration - processing one-to-one association property references 2005-06-20 08:34:31,524 [http-8080-Processor25] INFO net.sf.hibernate.cfg.Configuration - processing foreign key constraints 2005-06-20 08:34:31,803 [http-8080-Processor25] INFO net.sf.hibernate.dialect.Dialect - Using dialect: net.sf.hibernate.dialect.MySQLDialect 2005-06-20 08:34:31,902 [http-8080-Processor25] INFO net.sf.hibernate.cfg.SettingsFactory - Maximim outer join fetch depth: 2 2005-06-20 08:34:31,902 [http-8080-Processor25] INFO net.sf.hibernate.cfg.SettingsFactory - Use outer join fetching: true 2005-06-20 08:34:31,987 [http-8080-Processor25] INFO net.sf.hibernate.connection.DriverManagerConnectionProvider - Using Hibernate built-in connection pool (not for production use!) 2005-06-20 08:34:31,987 [http-8080-Processor25] INFO net.sf.hibernate.connection.DriverManagerConnectionProvider - Hibernate connection pool size: 10 2005-06-20 08:34:32,081 [http-8080-Processor25] INFO net.sf.hibernate.connection.DriverManagerConnectionProvider - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/sipuser 2005-06-20 08:34:32,082 [http-8080-Processor25] INFO net.sf.hibernate.connection.DriverManagerConnectionProvider - connection properties: {user=XXXXX, password=XXXXX} 2005-06-20 08:34:32,701 [http-8080-Processor25] INFO net.sf.hibernate.transaction.TransactionManagerLookupFactory - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) 2005-06-20 08:34:33,616 [http-8080-Processor25] INFO net.sf.hibernate.cfg.SettingsFactory - Use scrollable result sets: true 2005-06-20 08:34:33,617 [http-8080-Processor25] INFO net.sf.hibernate.cfg.SettingsFactory - Use JDBC3 getGeneratedKeys(): true 2005-06-20 08:34:33,617 [http-8080-Processor25] INFO net.sf.hibernate.cfg.SettingsFactory - Optimize cache for minimal puts: false 2005-06-20 08:34:33,617 [http-8080-Processor25] INFO net.sf.hibernate.cfg.SettingsFactory - echoing all SQL to stdout 2005-06-20 08:34:33,618 [http-8080-Processor25] INFO net.sf.hibernate.cfg.SettingsFactory - Query language substitutions: {} 2005-06-20 08:34:33,618 [http-8080-Processor25] INFO net.sf.hibernate.cfg.SettingsFactory - cache provider: net.sf.hibernate.cache.EhCacheProvider 2005-06-20 08:34:33,666 [http-8080-Processor25] INFO net.sf.hibernate.cfg.Configuration - instantiating and configuring caches
Hibernate Log Level: Debug13:30:29,814 INFO Configuration:? - processing one-to-many association mappings 13:30:30,376 INFO Configuration:? - processing one-to-one association property references 13:30:31,139 INFO Configuration:? - processing foreign key constraints 13:30:31,973 INFO Dialect:? - Using dialect: net.sf.hibernate.dialect.MySQLDialect 13:30:32,583 DEBUG SQLExceptionConverterFactory:? - Using dialect defined converter 13:30:33,783 INFO SettingsFactory:? - Maximim outer join fetch depth: 1 13:30:34,366 INFO SettingsFactory:? - Use outer join fetching: true 13:30:35,026 INFO DriverManagerConnectionProvider:? - Using Hibernate built-in connection pool (not for production use!) 13:30:35,602 INFO DriverManagerConnectionProvider:? - Hibernate connection pool size: 10 13:30:36,352 INFO DriverManagerConnectionProvider:? - using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/sipuser 13:30:36,879 INFO DriverManagerConnectionProvider:? - connection properties: {user=voipserver, password=022789} 13:30:37,738 INFO TransactionManagerLookupFactory:? - No TransactionManagerLookup configured (in JTA environment, use of process level read-write cache is not recommended) 13:30:38,314 DEBUG DriverManagerConnectionProvider:? - total checked-out connections: 0 13:30:38,670 DEBUG DriverManagerConnectionProvider:? - opening new JDBC connection 13:30:40,602 DEBUG DriverManagerConnectionProvider:? - created connection to: jdbc:mysql://localhost/sipuser, Isolation Level: 4 13:30:40,954 DEBUG DriverManagerConnectionProvider:? - returning connection to pool, pool size: 1 13:30:41,541 INFO SettingsFactory:? - Use scrollable result sets: true 13:30:42,091 INFO SettingsFactory:? - Use JDBC3 getGeneratedKeys(): true 13:30:42,671 INFO SettingsFactory:? - Optimize cache for minimal puts: false 13:30:43,244 INFO SettingsFactory:? - echoing all SQL to stdout 13:30:43,802 INFO SettingsFactory:? - Query language substitutions: {false=0, no='N', yes='Y', true=1} 13:30:44,356 INFO SettingsFactory:? - cache provider: net.sf.hibernate.cache.EhCacheProvider 13:30:44,979 INFO SettingsFactory:? - query cache factory: net.sf.hibernate.cache.StandardQueryCacheFactory 13:30:45,773 DEBUG SettingsFactory:? - Wrap result sets enabled? : false 13:30:46,137 INFO Configuration:? - instantiating and configuring caches
Debug level Hibernate log excerpt: Debug
There ist no error or somthing else in the hibernate nor the Tomcat log.
Name and version of the database you are using: MySQL 4.1.11
The generated SQL (show_sql=true):
_________________ MfG
Yves Schumann
|
|