What causes No persistence providers available error while deploying JPA based bundles on fuse fabric ?
Issue
- While deploying camel jpa for java persistence the following error is observed during deploying the bundles.
ERROR org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testService' defined in URL [bundle://139.0:0/META-INF/spring/camelContext.xml]: Cannot resolve reference to bean 'entityManagerFactory' while setting bean property 'entityManagerFactory'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in URL [bundle://139.0:0/META-INF/spring/springJPA.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: No persistence providers available for "test-persistence-unit" after trying the following discovered implementations: NONE
.
.
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in URL [bundle://294.0:0/META-INF/spring/springJPA.xml]: Invocation of init method failed; nested exception is javax.persistence.PersistenceException: No persistence providers available for "carrierInfo" after trying the following discovered implementations: NONE
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1512)[100:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)[100:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)[100:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)[100:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)[100:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)[100:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)[100:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:320)[100:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
... 17 more
Caused by: javax.persistence.PersistenceException: No persistence providers available for "testPersistenceUnit" after trying the following discovered implementations: NONE
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:182)[362:org.apache.geronimo.specs.geronimo-jpa_2.0_spec:1.1]
at org.springframework.orm.jpa.LocalEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalEntityManagerFactoryBean.java:92)[377:org.apache.servicemix.bundles.spring-orm:3.2.8.RELEASE_1]
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:310)[377:org.apache.servicemix.bundles.spring-orm:3.2.8.RELEASE_1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1571)[100:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1509)[100:org.apache.servicemix.bundles.spring-beans:3.2.8.RELEASE_1]
- Following maven dependency is being used as part of the project:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jpa</artifactId>
<version>2.12.0.redhat-610379</version>
<scope>compile</scope>
</dependency>
Environment
- Red Hat JBoss Fuse
- 6.1.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
