Announcement Announcement Module

Spring Dynamic Modules forum decommissioned in favor of Eclipse Gemini Blueprint

With the official first release of Eclipse Gemini Blueprint shipped, the migration of the Spring Dynamic Modules code base to the Eclipse Foundation, as part of the Gemini project, has been completed.

As such, this forum has been decommissioned in favour of the Eclipse Gemini forums.
See more
See less
HIbernate/JPA OSGi integration test problem Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • HIbernate/JPA OSGi integration test problem

    I'm unit testing a hibernate/jpa Spring DM bundle. I'm able to successfully "UNIT" test the bundle. But I'm running into some issues when I try to "Integration Test" the same bundle inside an Equinox embedded container.

    I'm running the Unit test by overriding the <CODE>AbstractConfigurableBundleCreatorTests</CODE> class.

    for the overridden method :
    protected String[] getTestBundlesNames() {
    return new String [] {
    "com.hcsc.itf.osgi.sample.person, com.hcsc.itf.osgi.sample.person.datasource, 1.0.0",
    "com.hcsc.itf.osgi.sample.person, com.hcsc.itf.osgi.sample.person.domain, 1.0.0",
    "com.hcsc.itf.osgi.sample.person, com.hcsc.itf.osgi.sample.person.dao, 1.0.0",
    "com.hcsc.itf.osgi.sample.person, com.hcsc.itf.osgi.sample.person.hibdao, 1.0.0",

    "javax.persistence, com.springsource.javax.persistence, 2.0.0",
    "org.springframework, org.springframework.transaction, 3.0.2.RELEASE",
    "org.springframework, org.springframework.jdbc, 3.0.2.RELEASE",
    "org.springframework, org.springframework.orm, 3.0.2.RELEASE",

    "org.hibernate,, 3.4.0.GA",
    "org.hibernate,, 3.4.0.GA",
    "org.hibernate,, 3.3.2.GA",


    When I run the test I'm getting the following exception:

    org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'entityManagerFactory' defined in URL [bundleentry://23.fwk3317565/META-INF/spring/bundle-contex.xml]: Cannot resolve reference to bean 'hibernateJpaVendorAdaptor' while setting bean property 'jpaVendorAdapter'; nested exception is org.springframework.beans.factory.BeanCreationExce ption: Error creating bean with name 'hibernateJpaVendorAdaptor' defined in URL [bundleentry://23.fwk3317565/META-INF/spring/bundle-contex.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationExcepti on: Could not instantiate bean class [org.springframework.orm.jpa.vendor.HibernateJpaVen dorAdapter]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/ejb/HibernatePersistence
    at nitionValueResolver.resolveReference(BeanDefinitio
    at nitionValueResolver.resolveValueIfNecessary(BeanDe
    at AutowireCapableBeanFactory.applyPropertyValues(Abs


    But the missing class is part of the bundles I'm including in the testcase! I have been stuck on this issue for more than a day! Any help will be appreciated.

    Thanks in advance!