Announcement Announcement Module
Collapse
No announcement yet.
Migrate Spring 2.5 + Kodo to Spring 2.5 + Oracle TopLink 11g Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Migrate Spring 2.5 + Kodo to Spring 2.5 + Oracle TopLink 11g

    Hi:

    We have a web app build with Spring 2.5 and Kodo (JPA) running nowadays in Oracle WebLogic 10.3. We have got everything integrated through Spring’s applicationContext-dao.xml and persistence.xml as follows:

    > applicationContext-dao.xml

    Code:
    <bean id=”entityManagerFactory” class=”org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean”>
    
         <property name=”dataSource” ref=”dataSource” />
    
         <property name=”jpaVendorAdapter>
    
              <bean class=”org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter”>
    
    …
    > persistence.xml

    Code:
    <provider>kodo.persistence.PersistenceProvider</provider>
    …

    We want to migrate this app to Oracle WebLogic 11g and use Oracle TopLink. Therefore, we have changed these files:



    > applicationContext-dao.xml

    Code:
    <bean id=”entityManagerFactory” class=”org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean”>
    
         <property name=”dataSource” ref=”dataSource” />
    
         <property name=”jpaVendorAdapter>
    
              <bean class=”org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter”>
    
    …
    Code:
    > persistence.xml
     
    <provider>oracle.toplink.PersistenceProvider</provider>
    …
    However, when we deploy this app the appserver reports an error:

    Code:
    <16-jul-2009 08H38' CEST> <Warning> <HTTP> <BEA-101162> <User defined listener org.springframework.web.context.ContextLoaderListener failed: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in ServletContext resource [/WEB-INF/applicationContext-dao.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext-dao.xml]: Cannot create inner bean 'org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter#ff4f75' of type [org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter] while setting bean property 'jpaVendorAdapter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter#ff4f75' defined in ServletContext resource [/WEB-INF/applicationContext-dao.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: oracle/toplink/essentials/ejb/cmp3/EntityManagerFactoryProvider.
    
     
    
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0' defined in ServletContext resource [/WEB-INF/applicationContext-dao.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext-dao.xml]: Cannot create inner bean 'org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter#ff4f75' of type [org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter] while setting bean property 'jpaVendorAdapter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter#ff4f75' defined in ServletContext resource [/WEB-INF/applicationContext-dao.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: oracle/toplink/essentials/ejb/cmp3/EntityManagerFactoryProvider
    
     
    
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)
    
     
    
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    
     
    
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    
     
    
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
    
     
    
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
    
     
    
    Truncated. see log file for complete stacktrace
    
     
    
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in ServletContext resource [/WEB-INF/applicationContext-dao.xml]: Cannot create inner bean 'org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter#ff4f75' of type [org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter] while setting bean property 'jpaVendorAdapter'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter#ff4f75' defined in ServletContext resource [/WEB-INF/applicationContext-dao.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: oracle/toplink/essentials/ejb/cmp3/EntityManagerFactoryProvider
    
     
    
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
    
     
    
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:117)
    
     
    
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1245)
    
     
    
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1010)
    
     
    
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:472)
    
     
    
    Truncated. see log file for complete stacktrace
    
     
    
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter#ff4f75' defined in ServletContext resource [/WEB-INF/applicationContext-dao.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: oracle/toplink/essentials/ejb/cmp3/EntityManagerFactoryProvider
    
     
    
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:883)
    
     
    
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
    
     
    
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
    
     
    
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
    
     
    
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
    
     
    
    Truncated. see log file for complete stacktrace
    
     
    
    org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: oracle/toplink/essentials/ejb/cmp3/EntityManagerFactoryProvider
    
     
    
    at org.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:115)
    
     
    
    at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:61)
    
     
    
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:877)
    
     
    
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:839)
    
     
    
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
    …
    Could you give any advice?

    Thanks in advance,
Working...
X