Announcement Announcement Module
Collapse
No announcement yet.
Initialization of Connection Provider fails Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Initialization of Connection Provider fails

    HI,
    I am using the Spring 1.2.2 DAO with Hibernate 3.0.1. When I try to persist one object into one of the tables I get the following error.
    I just wanted to see if the following error looks familiar to anyone:


    --------------INITIALIZING APPLICATION--------------
    (xml.XmlBeanDefinitionReader 150 ) Loading XML bean definitions from class path resource [applicationContext.xml]
    (support.ClassPathXmlApplicationContext 90 ) Bean factory for application context [org.springframework.context.support.ClassPathXmlAp plicationContext;hashCode=12460888]: org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [CmsDataSource,CmsSessionFactory,MessageFormatDaoIm pl]; root of BeanFactory hierarchy
    (support.ClassPathXmlApplicationContext 289 ) 3 beans defined in application context [org.springframework.context.support.ClassPathXmlAp plicationContext;hashCode=12460888]
    (core.CollectionFactory 61 ) JDK 1.4+ collections available
    (core.CollectionFactory 66 ) Commons Collections 3.x available
    (support.ClassPathXmlApplicationContext 422 ) Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMess ageSource@124bbbf]
    (support.ClassPathXmlApplicationContext 444 ) Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicatio nEventMulticaster@1e0bc08]
    (support.DefaultListableBeanFactory 261 ) Pre-instantiating singletons in factory [org.springframework.beans.factory.support.DefaultL istableBeanFactory defining beans [CmsDataSource,CmsSessionFactory,MessageFormatDaoIm pl]; root of BeanFactory hierarchy]
    (support.DefaultListableBeanFactory 222 ) Creating shared instance of singleton bean 'CmsDataSource'
    (support.DefaultListableBeanFactory 222 ) Creating shared instance of singleton bean 'CmsSessionFactory'
    (cfg.Environment 464 ) Hibernate 3.0.5
    (cfg.Environment 477 ) hibernate.properties not found
    (cfg.Environment 510 ) using CGLIB reflection optimizer
    (cfg.Environment 540 ) using JDK 1.4 java.sql.Timestamp handling
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsArea -> TBL_CMS_AREA
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsBay -> TBL_CMS_BAY
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsBayLocation -> TBL_CMS_BAYLOCATION
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsCoil -> TBL_CMS_COIL
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsContainer -> TBL_CMS_CONTAINER
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsConveyor -> TBL_CMS_CONVEYOR
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsCrane -> TBL_CMS_CRANE
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsDispatch -> TBL_CMS_DISPATCH
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsDispatchLocation -> TBL_CMS_DISPATCHLOCATION
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsKressCarrier -> TBL_CMS_KRESSCARRIER
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsLorry -> TBL_CMS_LORRY
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsMessage -> TBL_CMS_MESSAGE
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsMessageError -> TBL_CMS_MESSAGE_ERROR
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsMessageFormat -> TBL_CMS_MESSAGEFORMAT
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsMoveLog -> TBL_CMS_MOVELOG
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsPallet -> TBL_CMS_PALLET
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsRake -> TBL_CMS_RAKE
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsRam -> TBL_CMS_RAM
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsSlab -> TBL_CMS_SLAB
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsWagon -> TBL_CMS_WAGON
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.CmsZone -> TBL_CMS_ZONE
    (cfg.HbmBinder 260 ) Mapping class: com.vai.cms.domains.MessageLog -> TBL_MESSAGE_LOG
    (hibernate3.LocalSessionFactoryBean 693 ) Building new Hibernate SessionFactory
    (cfg.Configuration 875 ) processing extends queue
    (cfg.Configuration 879 ) processing collection mappings
    (cfg.Configuration 888 ) processing association property references
    (cfg.Configuration 917 ) processing foreign key constraints
    (connection.ConnectionProviderFactory 53 ) Initializing connection provider: org.springframework.orm.hibernate3.LocalDataSource ConnectionProvider
    (support.DefaultListableBeanFactory 550 ) Destroying singletons in factory {org.springframework.beans.factory.support.Default ListableBeanFactory defining beans [CmsDataSource,CmsSessionFactory,MessageFormatDaoIm pl]; root of BeanFactory hierarchy}
    Exception in thread "main" java.lang.ExceptionInInitializerError
    at com.vai.cms.utils.DaoTest.run(DaoTest.java:26)
    at com.vai.cms.utils.DaoTest.main(DaoTest.java:10)
    Caused by: org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'CmsSessionFactory' defined in class path resource [applicationContext.xml]: Initialization of bean failed; nested exception is java.lang.AbstractMethodError: COM.ibm.db2.jdbc.net.DB2DatabaseMetaData.getDataba seMajorVersion()I
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:365)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:226)
    at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:147)
    at org.springframework.beans.factory.support.DefaultL istableBeanFactory.preInstantiateSingletons(Defaul tListableBeanFactory.java:270)
    at org.springframework.context.support.AbstractApplic ationContext.refresh(AbstractApplicationContext.ja va:312)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:80)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:65)
    at org.springframework.context.support.ClassPathXmlAp plicationContext.<init>(ClassPathXmlApplicationCon text.java:56)
    at com.vai.cms.daos.CmsDaoFactory.<clinit>(CmsDaoFact ory.java:16)
    ... 2 more
    Caused by: java.lang.AbstractMethodError: COM.ibm.db2.jdbc.net.DB2DatabaseMetaData.getDataba seMajorVersion()I
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.hibernate.cfg.SettingsFactory.getDatabaseMajor Version(SettingsFactory.java:289)
    at org.hibernate.cfg.SettingsFactory.buildSettings(Se ttingsFactory.java:76)
    at org.hibernate.cfg.Configuration.buildSettings(Conf iguration.java:1463)
    at org.hibernate.cfg.Configuration.buildSessionFactor y(Configuration.java:1004)
    at org.springframework.orm.hibernate3.LocalSessionFac toryBean.newSessionFactory(LocalSessionFactoryBean .java:769)
    at org.springframework.orm.hibernate3.LocalSessionFac toryBean.afterPropertiesSet(LocalSessionFactoryBea n.java:695)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.invokeInitMethods(Abstr actAutowireCapableBeanFactory.java:966)
    at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:358)
    ... 10 more


    If anyone has any idea about why this error is showing up please advice.
    Thanks in advance.

  • #2
    Hibernate is calling the JDBC 3.0 method "getDatabaseMajorVersion()". Your JDBC driver is probably a JDBC 2.0 driver that does not support/implement this method. I'd suggest checking the Hibernate forums for a solution to this issue - I have seen this pop up before with an Oracle driver.

    Comment


    • #3
      Make sure that you're using the latest Hibernate 3.0.5 build, as available from the Hibernate website. There have been early 3.0.5 builds which always called that method, which apparently has been fixed in later 3.0.5 builds (without changing the version number). Spring 1.2.3 still ships with such an early Hibernate 3.0.5 build; Spring 1.2.4 will ship the latest one.

      Juergen

      Comment

      Working...
      X