Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3.1.2
I'm using Hibernate in an application along with Spring and some straight JDBC. My application executes perfectly when I run it from Eclipse. As soon as I try to package it as a jar and run it on its own, I run into trouble (log file attached). I have placed all the files from the Hibernate lib folder into the same folder as my jar (see attached dir listing) -- I did go through the readme and originally tried with the minimal set and that results in the exact same log as including all the unnecessary jars.
I have not been able to get Hibernate to log any more details when running in the jar -- I'm assuming that there is more information about the exception than I'm currently getting in my log.
I'm making the assumption that since everything works from Eclipse (both as an application and my JUnit tests) that the problem is some configuration or environment problem that I don't understand. I'm a .Net developer at my day job, and this Java stuff is still a bit mysterious to me.
Thanks for any pointers to FAQs, documentation, etc. that might help.
Colin Young
Log file:
Code:
08:48:07,515 INFO XmlBeanDefinitionReader:163 - Loading XML bean definitions from class path resource [DealImporter.xml]
08:48:07,531 DEBUG XmlBeanDefinitionReader:219 - Using JAXP implementation [org.apache.xerces.jaxp.DocumentBuilderFactoryImpl@691f36]
08:48:07,625 DEBUG ResourceEntityResolver:50 - Trying to resolve XML entity with public ID [-//SPRING//DTD BEAN//EN] and system ID [http://www.springframework.org/dtd/spring-beans.dtd]
08:48:07,625 DEBUG ResourceEntityResolver:56 - Trying to locate [spring-beans.dtd] in Spring jar
08:48:07,625 DEBUG ResourceEntityResolver:64 - Found beans DTD [http://www.springframework.org/dtd/spring-beans.dtd] in classpath
08:48:07,718 DEBUG DefaultXmlBeanDefinitionParser:180 - Loading bean definitions
08:48:07,734 DEBUG DefaultXmlBeanDefinitionParser:185 - Default lazy init 'false'
08:48:07,734 DEBUG DefaultXmlBeanDefinitionParser:186 - Default autowire 'no'
08:48:07,734 DEBUG DefaultXmlBeanDefinitionParser:187 - Default dependency check 'none'
08:48:07,781 INFO CollectionFactory:66 - JDK 1.4+ collections available
08:48:07,781 DEBUG CollectionFactory:114 - Creating [java.util.LinkedHashMap]
08:48:07,796 DEBUG DefaultXmlBeanDefinitionParser:193 - Found 15 <bean> elements in class path resource [DealImporter.xml]
08:48:07,796 DEBUG XmlBeanFactory:222 - Creating shared instance of singleton bean 'IANDeals'
08:48:07,796 DEBUG XmlBeanFactory:295 - Creating instance of bean 'IANDeals' with merged definition [Root bean: class [com.travelgator.EntityUpdate.Feeds.IAN.Deals]; abstract=false; singleton=true; lazyInit=false; autowire=0; dependencyCheck=0; initMethodName=null; destroyMethodName=null; factoryMethodName=null; factoryBeanName=null; defined in class path resource [DealImporter.xml]]
08:48:07,796 DEBUG XmlBeanFactory:224 - Invoking BeanPostProcessors before instantiation of bean 'IANDeals'
08:48:07,828 DEBUG CachedIntrospectionResults:141 - Getting BeanInfo for class [com.travelgator.EntityUpdate.Feeds.IAN.Deals]
08:48:07,828 DEBUG CachedIntrospectionResults:157 - Caching PropertyDescriptors for class [com.travelgator.EntityUpdate.Feeds.IAN.Deals]
08:48:07,828 DEBUG CachedIntrospectionResults:165 - Found property 'class' of type [java.lang.Class]
08:48:07,828 DEBUG CachedIntrospectionResults:165 - Found property 'dealDao' of type [com.travelgator.EntityUpdate.Feeds.IAN.dao.DealXmlDao]
08:48:07,828 DEBUG CachedIntrospectionResults:165 - Found property 'dealTypeDao' of type [com.travelgator.EntityUpdate.dao.DealTypeDao]
08:48:07,828 DEBUG CachedIntrospectionResults:165 - Found property 'feedSchema' of type [java.lang.String]
08:48:07,828 DEBUG CachedIntrospectionResults:165 - Found property 'jdbcTemplate' of type [org.springframework.jdbc.core.JdbcTemplate]
08:48:07,828 DEBUG CachedIntrospectionResults:165 - Found property 'jdbcTemplateTG' of type [org.springframework.jdbc.core.JdbcTemplate]
08:48:07,828 DEBUG CachedIntrospectionResults:165 - Found property 'xmlScriptFile' of type [java.lang.String]
08:48:07,828 DEBUG CachedIntrospectionResults:87 - Class [com.travelgator.EntityUpdate.Feeds.IAN.Deals] is cache-safe
08:48:07,843 DEBUG BeanDefinitionValueResolver:159 - Resolving reference from property 'jdbcTemplate' in bean 'IANDeals' to bean 'jdbcTemplate'
08:48:07,843 DEBUG CollectionFactory:90 - Creating [java.util.LinkedHashSet]
08:48:07,843 DEBUG XmlBeanFactory:222 - Creating shared instance of singleton bean 'jdbcTemplate'
08:48:07,843 DEBUG XmlBeanFactory:295 - Creating instance of bean 'jdbcTemplate' with merged definition [Root bean: class [org.springframework.jdbc.core.JdbcTemplate]; abstract=false; singleton=true; lazyInit=false; autowire=0; dependencyCheck=0; initMethodName=null; destroyMethodName=null; factoryMethodName=null; factoryBeanName=null; defined in class path resource [DealImporter.xml]]
08:48:07,843 DEBUG XmlBeanFactory:224 - Invoking BeanPostProcessors before instantiation of bean 'jdbcTemplate'
08:48:07,843 DEBUG CachedIntrospectionResults:141 - Getting BeanInfo for class [org.springframework.jdbc.core.JdbcTemplate]
08:48:07,859 DEBUG CachedIntrospectionResults:157 - Caching PropertyDescriptors for class [org.springframework.jdbc.core.JdbcTemplate]
08:48:07,859 DEBUG CachedIntrospectionResults:165 - Found property 'class' of type [java.lang.Class]
08:48:07,859 DEBUG CachedIntrospectionResults:165 - Found property 'dataSource' of type [javax.sql.DataSource]
08:48:07,859 DEBUG CachedIntrospectionResults:165 - Found property 'databaseProductName' of type [java.lang.String]
08:48:07,875 DEBUG CachedIntrospectionResults:165 - Found property 'exceptionTranslator' of type [org.springframework.jdbc.support.SQLExceptionTranslator]
08:48:07,875 DEBUG CachedIntrospectionResults:165 - Found property 'fetchSize' of type [int]
08:48:07,875 DEBUG CachedIntrospectionResults:165 - Found property 'ignoreWarnings' of type [boolean]
08:48:07,875 DEBUG CachedIntrospectionResults:165 - Found property 'lazyInit' of type [boolean]
08:48:07,875 DEBUG CachedIntrospectionResults:165 - Found property 'maxRows' of type [int]
08:48:07,875 DEBUG CachedIntrospectionResults:165 - Found property 'nativeJdbcExtractor' of type [org.springframework.jdbc.support.nativejdbc.NativeJdbcExtractor]
08:48:07,875 DEBUG CachedIntrospectionResults:87 - Class [org.springframework.jdbc.core.JdbcTemplate] is cache-safe
08:48:07,875 DEBUG BeanDefinitionValueResolver:159 - Resolving reference from property 'dataSource' in bean 'jdbcTemplate' to bean 'dataSourceFeeds'
08:48:07,875 DEBUG CollectionFactory:90 - Creating [java.util.LinkedHashSet]
08:48:07,875 DEBUG XmlBeanFactory:222 - Creating shared instance of singleton bean 'dataSourceFeeds'
08:48:07,875 DEBUG XmlBeanFactory:295 - Creating instance of bean 'dataSourceFeeds' with merged definition [Root bean: class [org.springframework.jdbc.datasource.DriverManagerDataSource]; abstract=false; singleton=true; lazyInit=false; autowire=0; dependencyCheck=0; initMethodName=null; destroyMethodName=null; factoryMethodName=null; factoryBeanName=null; defined in class path resource [DealImporter.xml]]
08:48:07,875 DEBUG XmlBeanFactory:224 - Invoking BeanPostProcessors before instantiation of bean 'dataSourceFeeds'
08:48:07,875 DEBUG CachedIntrospectionResults:141 - Getting BeanInfo for class [org.springframework.jdbc.datasource.DriverManagerDataSource]
08:48:07,890 DEBUG CachedIntrospectionResults:157 - Caching PropertyDescriptors for class [org.springframework.jdbc.datasource.DriverManagerDataSource]
08:48:07,890 DEBUG CachedIntrospectionResults:165 - Found property 'class' of type [java.lang.Class]
08:48:07,890 DEBUG CachedIntrospectionResults:165 - Found property 'connection' of type [java.sql.Connection]
08:48:07,890 DEBUG CachedIntrospectionResults:165 - Found property 'connectionProperties' of type [java.util.Properties]
08:48:07,890 DEBUG CachedIntrospectionResults:165 - Found property 'driverClassName' of type [java.lang.String]
08:48:07,890 DEBUG CachedIntrospectionResults:165 - Found property 'logWriter' of type [java.io.PrintWriter]
08:48:07,906 DEBUG CachedIntrospectionResults:165 - Found property 'loginTimeout' of type [int]
08:48:07,906 DEBUG CachedIntrospectionResults:165 - Found property 'password' of type [java.lang.String]
08:48:07,906 DEBUG CachedIntrospectionResults:165 - Found property 'url' of type [java.lang.String]
08:48:07,906 DEBUG CachedIntrospectionResults:165 - Found property 'username' of type [java.lang.String]
08:48:07,906 DEBUG CachedIntrospectionResults:87 - Class [org.springframework.jdbc.datasource.DriverManagerDataSource] is cache-safe
08:48:07,906 DEBUG BeanWrapperImpl:593 - About to invoke write method [public void org.springframework.jdbc.datasource.DriverManagerDataSource.setDriverClassName(java.lang.String) throws org.springframework.jdbc.CannotGetJdbcConnectionException] on object of class [org.springframework.jdbc.datasource.DriverManagerDataSource]
08:48:07,906 INFO DriverManagerDataSource:155 - Loaded JDBC driver: com.mysql.jdbc.Driver
08:48:07,906 DEBUG BeanWrapperImpl:598 - Invoked write method [public void org.springframework.jdbc.datasource.DriverManagerDataSource.setDriverClassName(java.lang.String) throws org.springframework.jdbc.CannotGetJdbcConnectionException] with value of type [java.lang.String]
08:48:07,921 DEBUG BeanWrapperImpl:593 - About to invoke write method [public void org.springframework.jdbc.datasource.DriverManagerDataSource.setUrl(java.lang.String)] on object of class [org.springframework.jdbc.datasource.DriverManagerDataSource]
08:48:07,921 DEBUG BeanWrapperImpl:598 - Invoked write method [public void org.springframework.jdbc.datasource.DriverManagerDataSource.setUrl(java.lang.String)] with value of type [java.lang.String]
08:48:07,921 DEBUG BeanWrapperImpl:593 - About to invoke write method [public void org.springframework.jdbc.datasource.DriverManagerDataSource.setUsername(java.lang.String)] on object of class [org.springframework.jdbc.datasource.DriverManagerDataSource]
08:48:07,921 DEBUG BeanWrapperImpl:598 - Invoked write method [public void org.springframework.jdbc.datasource.DriverManagerDataSource.setUsername(java.lang.String)] with value of type [java.lang.String]
08:48:07,921 DEBUG BeanWrapperImpl:593 - About to invoke write method [public void org.springframework.jdbc.datasource.DriverManagerDataSource.setPassword(java.lang.String)] on object of class [org.springframework.jdbc.datasource.DriverManagerDataSource]
08:48:07,921 DEBUG BeanWrapperImpl:598 - Invoked write method [public void org.springframework.jdbc.datasource.DriverManagerDataSource.setPassword(java.lang.String)] with value of type [java.lang.String]
08:48:07,921 DEBUG XmlBeanFactory:243 - Invoking BeanPostProcessors before initialization of bean 'dataSourceFeeds'
08:48:07,921 DEBUG XmlBeanFactory:262 - Invoking BeanPostProcessors after initialization of bean 'dataSourceFeeds'
08:48:07,921 DEBUG BeanWrapperImpl:593 - About to invoke write method [public void org.springframework.jdbc.support.JdbcAccessor.setDataSource(javax.sql.DataSource)] on object of class [org.springframework.jdbc.core.JdbcTemplate]
08:48:07,921 DEBUG BeanWrapperImpl:598 - Invoked write method [public void org.springframework.jdbc.support.JdbcAccessor.setDataSource(javax.sql.DataSource)] with value of type [javax.sql.DataSource]
08:48:07,921 DEBUG XmlBeanFactory:243 - Invoking BeanPostProcessors before initialization of bean 'jdbcTemplate'
08:48:07,921 DEBUG XmlBeanFactory:1057 - Invoking afterPropertiesSet() on bean with name 'jdbcTemplate'
08:48:07,921 DEBUG XmlBeanFactory:262 - Invoking BeanPostProcessors after initialization of bean 'jdbcTemplate'
08:48:07,921 DEBUG BeanDefinitionValueResolver:159 - Resolving reference from property 'jdbcTemplateTG' in bean 'IANDeals' to bean 'jdbcTemplateTG'
08:48:07,921 DEBUG CollectionFactory:90 - Creating [java.util.LinkedHashSet]
08:48:07,921 DEBUG XmlBeanFactory:222 - Creating shared instance of singleton bean 'jdbcTemplateTG'
08:48:07,921 DEBUG XmlBeanFactory:295 - Creating instance of bean 'jdbcTemplateTG' with merged definition [Root bean: class [org.springframework.jdbc.core.JdbcTemplate]; abstract=false; singleton=true; lazyInit=false; autowire=0; dependencyCheck=0; initMethodName=null; destroyMethodName=null; factoryMethodName=null; factoryBeanName=null; defined in class path resource [DealImporter.xml]]
08:48:07,921 DEBUG XmlBeanFactory:224 - Invoking BeanPostProcessors before instantiation of bean 'jdbcTemplateTG'
08:48:07,921 DEBUG CachedIntrospectionResults:98 - Using cached introspection results for class [org.springframework.jdbc.core.JdbcTemplate]
08:48:07,921 DEBUG BeanDefinitionValueResolver:159 - Resolving reference from property 'dataSource' in bean 'jdbcTemplateTG' to bean 'dataSource'
08:48:07,921 DEBUG CollectionFactory:90 - Creating [java.util.LinkedHashSet]
08:48:07,921 DEBUG XmlBeanFactory:222 - Creating shared instance of singleton bean 'dataSource'
08:48:07,921 DEBUG XmlBeanFactory:295 - Creating instance of bean 'dataSource' with merged definition [Root bean: class [org.springframework.jdbc.datasource.DriverManagerDataSource]; abstract=false; singleton=true; lazyInit=false; autowire=0; dependencyCheck=0; initMethodName=null; destroyMethodName=null; factoryMethodName=null; factoryBeanName=null; defined in class path resource [DealImporter.xml]]
08:48:07,937 DEBUG XmlBeanFactory:224 - Invoking BeanPostProcessors before instantiation of bean 'dataSource'
08:48:07,937 DEBUG CachedIntrospectionResults:98 - Using cached introspection results for class [org.springframework.jdbc.datasource.DriverManagerDataSource]
08:48:07,937 DEBUG BeanWrapperImpl:593 - About to invoke write method [public void org.springframework.jdbc.datasource.DriverManagerDataSource.setDriverClassName(java.lang.String) throws org.springframework.jdbc.CannotGetJdbcConnectionException] on object of class [org.springframework.jdbc.datasource.DriverManagerDataSource]
08:48:07,937 INFO DriverManagerDataSource:155 - Loaded JDBC driver: com.mysql.jdbc.Driver
08:48:07,937 DEBUG BeanWrapperImpl:598 - Invoked write method [public void org.springframework.jdbc.datasource.DriverManagerDataSource.setDriverClassName(java.lang.String) throws org.springframework.jdbc.CannotGetJdbcConnectionException] with value of type [java.lang.String]
08:48:07,937 DEBUG BeanWrapperImpl:593 - About to invoke write method [public void org.springframework.jdbc.datasource.DriverManagerDataSource.setUrl(java.lang.String)] on object of class [org.springframework.jdbc.datasource.DriverManagerDataSource]
08:48:07,937 DEBUG BeanWrapperImpl:598 - Invoked write method [public void org.springframework.jdbc.datasource.DriverManagerDataSource.setUrl(java.lang.String)] with value of type [java.lang.String]
08:48:07,937 DEBUG BeanWrapperImpl:593 - About to invoke write method [public void org.springframework.jdbc.datasource.DriverManagerDataSource.setUsername(java.lang.String)] on object of class [org.springframework.jdbc.datasource.DriverManagerDataSource]
08:48:07,937 DEBUG BeanWrapperImpl:598 - Invoked write method [public void org.springframework.jdbc.datasource.DriverManagerDataSource.setUsername(java.lang.String)] with value of type [java.lang.String]
08:48:07,937 DEBUG BeanWrapperImpl:593 - About to invoke write method [public void org.springframework.jdbc.datasource.DriverManagerDataSource.setPassword(java.lang.String)] on object of class [org.springframework.jdbc.datasource.DriverManagerDataSource]
08:48:07,937 DEBUG BeanWrapperImpl:598 - Invoked write method [public void org.springframework.jdbc.datasource.DriverManagerDataSource.setPassword(java.lang.String)] with value of type [java.lang.String]
08:48:07,937 DEBUG XmlBeanFactory:243 - Invoking BeanPostProcessors before initialization of bean 'dataSource'
08:48:07,937 DEBUG XmlBeanFactory:262 - Invoking BeanPostProcessors after initialization of bean 'dataSource'
08:48:07,937 DEBUG BeanWrapperImpl:593 - About to invoke write method [public void org.springframework.jdbc.support.JdbcAccessor.setDataSource(javax.sql.DataSource)] on object of class [org.springframework.jdbc.core.JdbcTemplate]
08:48:07,937 DEBUG BeanWrapperImpl:598 - Invoked write method [public void org.springframework.jdbc.support.JdbcAccessor.setDataSource(javax.sql.DataSource)] with value of type [javax.sql.DataSource]
08:48:07,937 DEBUG XmlBeanFactory:243 - Invoking BeanPostProcessors before initialization of bean 'jdbcTemplateTG'
08:48:07,937 DEBUG XmlBeanFactory:1057 - Invoking afterPropertiesSet() on bean with name 'jdbcTemplateTG'
08:48:07,937 DEBUG XmlBeanFactory:262 - Invoking BeanPostProcessors after initialization of bean 'jdbcTemplateTG'
08:48:07,953 DEBUG BeanDefinitionValueResolver:159 - Resolving reference from property 'dealTypeDao' in bean 'IANDeals' to bean 'dealTypeDao'
08:48:07,953 DEBUG CollectionFactory:90 - Creating [java.util.LinkedHashSet]
08:48:07,953 DEBUG XmlBeanFactory:222 - Creating shared instance of singleton bean 'dealTypeDao'
08:48:07,953 DEBUG XmlBeanFactory:295 - Creating instance of bean 'dealTypeDao' with merged definition [Root bean: class [com.travelgator.EntityUpdate.dao.DealTypeDaoImpl]; abstract=false; singleton=true; lazyInit=false; autowire=0; dependencyCheck=0; initMethodName=null; destroyMethodName=null; factoryMethodName=null; factoryBeanName=null; defined in class path resource [DealImporter.xml]]
08:48:07,953 DEBUG XmlBeanFactory:224 - Invoking BeanPostProcessors before instantiation of bean 'dealTypeDao'
08:48:07,953 DEBUG CachedIntrospectionResults:141 - Getting BeanInfo for class [com.travelgator.EntityUpdate.dao.DealTypeDaoImpl]
08:48:07,953 DEBUG CachedIntrospectionResults:157 - Caching PropertyDescriptors for class [com.travelgator.EntityUpdate.dao.DealTypeDaoImpl]
08:48:07,953 DEBUG CachedIntrospectionResults:165 - Found property 'class' of type [java.lang.Class]
08:48:07,953 DEBUG CachedIntrospectionResults:165 - Found property 'hibernateTemplate' of type [org.springframework.orm.hibernate3.HibernateTemplate]
08:48:07,953 DEBUG CachedIntrospectionResults:165 - Found property 'sessionFactory' of type [org.hibernate.SessionFactory]
08:48:07,953 DEBUG CachedIntrospectionResults:87 - Class [com.travelgator.EntityUpdate.dao.DealTypeDaoImpl] is cache-safe
08:48:07,953 DEBUG BeanDefinitionValueResolver:159 - Resolving reference from property 'hibernateTemplate' in bean 'dealTypeDao' to bean 'hibernateTemplate'
08:48:07,953 DEBUG CollectionFactory:90 - Creating [java.util.LinkedHashSet]
08:48:07,953 DEBUG XmlBeanFactory:222 - Creating shared instance of singleton bean 'hibernateTemplate'
08:48:07,953 DEBUG XmlBeanFactory:295 - Creating instance of bean 'hibernateTemplate' with merged definition [Root bean: class [org.springframework.orm.hibernate3.HibernateTemplate]; abstract=false; singleton=true; lazyInit=false; autowire=0; dependencyCheck=0; initMethodName=null; destroyMethodName=null; factoryMethodName=null; factoryBeanName=null; defined in class path resource [DealImporter.xml]]
08:48:07,953 DEBUG XmlBeanFactory:224 - Invoking BeanPostProcessors before instantiation of bean 'hibernateTemplate'
08:48:07,968 DEBUG CachedIntrospectionResults:141 - Getting BeanInfo for class [org.springframework.orm.hibernate3.HibernateTemplate]
08:48:07,968 DEBUG CachedIntrospectionResults:157 - Caching PropertyDescriptors for class [org.springframework.orm.hibernate3.HibernateTemplate]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'allowCreate' of type [boolean]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'alwaysUseNewSession' of type [boolean]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'beanFactory' of type [org.springframework.beans.factory.BeanFactory]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'cacheQueries' of type [boolean]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'checkWriteOperations' of type [boolean]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'class' of type [java.lang.Class]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'entityInterceptor' of type [org.hibernate.Interceptor]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'entityInterceptorBeanName' of type [java.lang.String]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'exposeNativeSession' of type [boolean]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'fetchSize' of type [int]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'filterName' of type [java.lang.String]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'filterNames' of type [[Ljava.lang.String;]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'flushMode' of type [int]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'flushModeName' of type [java.lang.String]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'jdbcExceptionTranslator' of type [org.springframework.jdbc.support.SQLExceptionTranslator]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'maxResults' of type [int]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'queryCacheRegion' of type [java.lang.String]
08:48:07,984 DEBUG CachedIntrospectionResults:165 - Found property 'sessionFactory' of type [org.hibernate.SessionFactory]
08:48:07,984 DEBUG CachedIntrospectionResults:87 - Class [org.springframework.orm.hibernate3.HibernateTemplate] is cache-safe
08:48:07,984 DEBUG BeanDefinitionValueResolver:159 - Resolving reference from property 'sessionFactory' in bean 'hibernateTemplate' to bean 'sessionFactory'
08:48:07,984 DEBUG CollectionFactory:90 - Creating [java.util.LinkedHashSet]
08:48:08,000 DEBUG XmlBeanFactory:222 - Creating shared instance of singleton bean 'sessionFactory'
08:48:08,000 DEBUG XmlBeanFactory:295 - Creating instance of bean 'sessionFactory' with merged definition [Root bean: class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]; abstract=false; singleton=true; lazyInit=false; autowire=0; dependencyCheck=0; initMethodName=null; destroyMethodName=null; factoryMethodName=null; factoryBeanName=null; defined in class path resource [DealImporter.xml]]
08:48:08,000 DEBUG XmlBeanFactory:224 - Invoking BeanPostProcessors before instantiation of bean 'sessionFactory'
08:48:08,000 DEBUG CachedIntrospectionResults:141 - Getting BeanInfo for class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]
08:48:08,000 DEBUG CachedIntrospectionResults:157 - Caching PropertyDescriptors for class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'cacheableMappingLocations' of type [[Lorg.springframework.core.io.Resource;]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'class' of type [java.lang.Class]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'collectionCacheStrategies' of type [java.util.Properties]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'configLocation' of type [org.springframework.core.io.Resource]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'configuration' of type [org.hibernate.cfg.Configuration]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'configurationClass' of type [java.lang.Class]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'dataSource' of type [javax.sql.DataSource]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'entityCacheStrategies' of type [java.util.Properties]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'entityInterceptor' of type [org.hibernate.Interceptor]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'eventListeners' of type [java.util.Map]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'exposeTransactionAwareSessionFactory' of type [boolean]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'filterDefinitions' of type [[Lorg.hibernate.engine.FilterDefinition;]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'hibernateProperties' of type [java.util.Properties]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'jtaTransactionManager' of type [javax.transaction.TransactionManager]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'lobHandler' of type [org.springframework.jdbc.support.lob.LobHandler]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'mappingDirectoryLocations' of type [[Lorg.springframework.core.io.Resource;]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'mappingJarLocations' of type [[Lorg.springframework.core.io.Resource;]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'mappingLocations' of type [[Lorg.springframework.core.io.Resource;]
08:48:08,015 DEBUG CachedIntrospectionResults:165 - Found property 'mappingResources' of type [[Ljava.lang.String;]
08:48:08,031 DEBUG CachedIntrospectionResults:165 - Found property 'namingStrategy' of type [org.hibernate.cfg.NamingStrategy]
08:48:08,031 DEBUG CachedIntrospectionResults:165 - Found property 'object' of type [java.lang.Object]
08:48:08,031 DEBUG CachedIntrospectionResults:165 - Found property 'objectType' of type [java.lang.Class]
08:48:08,031 DEBUG CachedIntrospectionResults:165 - Found property 'schemaUpdate' of type [boolean]
08:48:08,031 DEBUG CachedIntrospectionResults:165 - Found property 'singleton' of type [boolean]
08:48:08,031 DEBUG CachedIntrospectionResults:165 - Found property 'typeDefinitions' of type [[Lorg.springframework.orm.hibernate3.TypeDefinitionBean;]
08:48:08,031 DEBUG CachedIntrospectionResults:165 - Found property 'useTransactionAwareDataSource' of type [boolean]
08:48:08,031 DEBUG CachedIntrospectionResults:87 - Class [org.springframework.orm.hibernate3.LocalSessionFactoryBean] is cache-safe
08:48:08,031 DEBUG BeanDefinitionValueResolver:159 - Resolving reference from property 'dataSource' in bean 'sessionFactory' to bean 'dataSource'
08:48:08,031 DEBUG XmlBeanFactory:189 - Returning cached instance of singleton bean 'dataSource'
08:48:08,031 DEBUG BeanWrapperImpl:593 - About to invoke write method [public void org.springframework.orm.hibernate3.LocalSessionFactoryBean.setDataSource(javax.sql.DataSource)] on object of class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]
08:48:08,031 DEBUG BeanWrapperImpl:598 - Invoked write method [public void org.springframework.orm.hibernate3.LocalSessionFactoryBean.setDataSource(javax.sql.DataSource)] with value of type [javax.sql.DataSource]
08:48:08,031 DEBUG BeanWrapperImpl:593 - About to invoke write method [public void org.springframework.orm.hibernate3.LocalSessionFactoryBean.setHibernateProperties(java.util.Properties)] on object of class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]
08:48:08,031 DEBUG BeanWrapperImpl:598 - Invoked write method [public void org.springframework.orm.hibernate3.LocalSessionFactoryBean.setHibernateProperties(java.util.Properties)] with value of type [java.util.Properties]
08:48:08,031 DEBUG BeanWrapperImpl:767 - Converting String to [interface org.springframework.core.io.Resource] using property editor [org.springframework.core.io.ResourceEditor@1bc82e7]
08:48:08,046 DEBUG BeanWrapperImpl:593 - About to invoke write method [public void org.springframework.orm.hibernate3.LocalSessionFactoryBean.setMappingDirectoryLocations(org.springframework.core.io.Resource[])] on object of class [org.springframework.orm.hibernate3.LocalSessionFactoryBean]
08:48:08,046 DEBUG BeanWrapperImpl:598 - Invoked write method [public void org.springframework.orm.hibernate3.LocalSessionFactoryBean.setMappingDirectoryLocations(org.springframework.core.io.Resource[])] with value of type [[Lorg.springframework.core.io.Resource;]
08:48:08,046 DEBUG XmlBeanFactory:243 - Invoking BeanPostProcessors before initialization of bean 'sessionFactory'
08:48:08,046 DEBUG XmlBeanFactory:1057 - Invoking afterPropertiesSet() on bean with name 'sessionFactory'
08:48:08,046 INFO Environment:479 - Hibernate 3.1.2
08:48:08,046 INFO Environment:479 - Hibernate 3.1.2
08:48:08,046 ERROR UpdateFromFeeds:42 - Error creating bean with name 'IANDeals' defined in class path resource [DealImporter.xml]: Can't resolve reference to bean 'dealTypeDao' while setting property 'dealTypeDao'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dealTypeDao' defined in class path resource [DealImporter.xml]: Can't resolve reference to bean 'hibernateTemplate' while setting property 'hibernateTemplate'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'hibernateTemplate' defined in class path resource [DealImporter.xml]: Can't resolve reference to bean 'sessionFactory' while setting property 'sessionFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [DealImporter.xml]: Initialization of bean failed; nested exception is org.springframework.beans.FatalBeanException: Could not instantiate class [org.hibernate.cfg.Configuration]; constructor threw exception; nested exception is java.lang.ExceptionInInitializerError: null
dir of application folder:
Code:
Volume in drive C has no label.
Volume Serial Number is 18D5-653B
Directory of C:\Temp\J2EEDevelopment\TravelGatorOutput
04/24/2006 08:29 <DIR> .
04/24/2006 08:29 <DIR> ..
01/28/2006 07:13 1,034,049 ant-1.6.5.jar
01/28/2006 07:13 5,667 ant-antlr-1.6.5.jar
01/28/2006 07:13 74,237 ant-junit-1.6.5.jar
01/28/2006 07:13 9,180 ant-launcher-1.6.5.jar
01/28/2006 07:13 6,763 ant-swing-1.6.5.jar
01/28/2006 07:13 444,689 antlr-2.7.6rc1.jar
01/28/2006 07:13 16,777 asm-attrs.jar
01/28/2006 07:13 26,360 asm.jar
01/28/2006 07:13 487,360 c3p0-0.9.0.jar
01/28/2006 07:13 282,338 cglib-2.1.3.jar
01/28/2006 07:13 142,704 cleanimports.jar
01/28/2006 07:13 175,426 commons-collections-2.1.1.jar
05/02/2005 21:26 31,774 commons-logging.jar
01/28/2006 07:13 171,071 concurrent-1.3.2.jar
01/28/2006 07:13 17,978 connector.jar
01/28/2006 07:13 313,898 dom4j-1.6.1.jar
01/28/2006 07:13 47,531 ehcache-1.1.jar
04/24/2006 08:48 28,608 EntityImport.log
04/23/2006 21:46 65 FeedImport.bat
04/24/2006 08:48 80,884 FeedImport.jar
01/28/2006 07:09 1,955,860 hibernate3.jar
03/07/2006 17:59 630,486 hsqldb.jar
01/28/2006 07:13 104,359 jaas.jar
01/28/2006 07:13 24,180 jacc-1_0-fr.jar
01/28/2006 07:13 226,877 jaxen-1.1-beta-7.jar
01/28/2006 07:13 374,582 jboss-cache.jar
01/28/2006 07:13 583,206 jboss-common.jar
01/28/2006 07:13 591,568 jboss-jmx.jar
01/28/2006 07:13 223,640 jboss-system.jar
01/28/2006 07:13 6,727 jdbc2_0-stdext.jar
01/28/2006 07:13 1,611,518 jgroups-2.2.8.jar
01/28/2006 07:13 8,812 jta.jar
01/28/2006 07:13 121,070 junit-3.8.1.jar
03/07/2006 17:56 121,070 junit.jar
01/28/2006 07:13 350,627 log4j-1.2.11.jar
12/01/2005 03:02 446,464 mysql-connector-java-3.1.12-bin.jar
01/28/2006 07:13 114,308 oscache-2.1.jar
01/28/2006 07:13 475,943 proxool-0.8.3.jar
03/07/2006 17:56 1,901,653 spring.jar
01/28/2006 07:13 30,602 swarmcache-1.0rc2.jar
01/28/2006 07:13 142,026 syndiag2.jar
01/28/2006 07:13 5,762 versioncheck.jar
01/28/2006 07:13 1,010,806 xerces-2.6.2.jar
01/28/2006 07:13 123,705 xml-apis.jar
44 File(s) 14,583,210 bytes
2 Dir(s) 8,168,660,992 bytes free
Spring configuration (incl. Hibernate setup):
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN" "http://www.springframework.org/dtd/spring-beans.dtd" >
<beans>
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="location"><value>classpath:/jdbc.properties</value></property>
</bean>
<!-- data access beans -->
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost/tg_development" />
<property name="username" value="root" />
<property name="password" value="root" />
</bean>
<bean id="dataSourceFeeds" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost/feed_loading" />
<property name="username" value="root" />
<property name="password" value="root" />
</bean>
<!-- Hibernate -->
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
<property name="dataSource">
<ref bean="dataSource" />
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.MySQL5Dialect</prop>
<prop key="hibernate.cglib.use_reflection_optimizer">false</prop>
<prop key="hibernate.show_sql">true</prop>
</props>
</property>
<!--
<property name="mappingResources">
<list>
<value>classpath:/com/travelgator/EntityUpdate/model/mapping/Deal.hbm.xml</value>
<value>classpath:/com/travelgator/EntityUpdate/model/mapping/DealType.hbm.xml</value>
</list>
</property>
-->
<property name="mappingDirectoryLocations">
<list>
<value>classpath:/com/travelgator/EntityUpdate/model/mapping/</value>
</list>
</property>
</bean>
<bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate">
<property name="sessionFactory">
<ref bean="sessionFactory" />
</property>
</bean>
<!-- Hibernate DAOs -->
<bean id="dealDao" class="com.travelgator.EntityUpdate.dao.DealDaoImpl">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate" />
</property>
</bean>
<bean id="dealTypeDao" class="com.travelgator.EntityUpdate.dao.DealTypeDaoImpl">
<property name="hibernateTemplate">
<ref bean="hibernateTemplate" />
</property>
</bean>
<!-- XML DAOs -->
<bean id="dealXmlDao" class="com.travelgator.EntityUpdate.Feeds.IAN.dao.DealXmlDaoImpl">
<property name="dateFormat" value="yyyy/MM/dd" />
</bean>
<!-- JDBC -->
<bean id="jdbcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource">
<ref bean="dataSourceFeeds" />
</property>
</bean>
<bean id="jdbcTemplateTG" class="org.springframework.jdbc.core.JdbcTemplate">
<property name="dataSource">
<ref bean="dataSource" />
</property>
</bean>
<!-- JDBC DAOs -->
<bean id="IANDeals" class="com.travelgator.EntityUpdate.Feeds.IAN.Deals">
<property name="jdbcTemplate" ref="jdbcTemplate" />
<property name="jdbcTemplateTG" ref="jdbcTemplateTG" />
<property name="dealTypeDao" ref="dealTypeDao" />
<property name="dealDao" ref="dealXmlDao" />
<property name="xmlScriptFile" value="deals.xml" />
<property name="feedSchema" value="feed_loading" />
</bean>
<!-- XML SAX entity handler beans -->
<bean id="dealSax" class="com.travelgator.EntityUpdate.Feeds.IAN.IANDealsElementHandler" singleton="false">
<property name="dao" ref="dealDao" />
<property name="dealTypeDao" ref="dealTypeDao" />
<property name="dateFormat" value="yyyy/MM/dd" />
</bean>
<bean id="xmlScriptProcessor" class="com.travelgator.EntityUpdate.ScriptProcessor.XMLScriptProcessor" singleton="false">
<property name="entityHandlers">
<map>
<entry key="deal"><ref bean="dealSax" /></entry>
</map>
</property>
</bean>
<!-- Services -->
<bean id="dealService" class="com.travelgator.EntityUpdate.service.DealServiceImpl">
<constructor-arg>
<ref bean="dealDao" />
</constructor-arg>
</bean>
<bean id="dealTypeService" class="com.travelgator.EntityUpdate.service.DealTypeServiceImpl">
<constructor-arg>
<ref bean="dealTypeDao" />
</constructor-arg>
</bean>
</beans>