Hi All,

I'm using openJPA directly (no hibernate), and am having a problem with 
defining a persistence provider. 
When I request a page with an injected Dao I get the following exception:

org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'entityManagerFactory' defined in ServletContext 
resource [/WEB-INF/beans.xml]
....
Caused by: javax.persistence.PersistenceException: No Persistence provider for 
EntityManager named sitedelta
        at 
javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:84)

I am not sure that my persistence.xml is being picked up. It's in 
WebContent/META-INF/persistence.xml. 
Is this the correct place?


Details:

In my beans.xml I have included:

<bean id="entityManagerFactory"
class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean">
        <property name="persistenceUnitName" value="sitedelta" />
</bean>

<bean id="deltaRunDao"
class="com.su3analytics.sitedelta.dao.DeltaRunDao" /> 


In my persistence.xml I have:

<persistence-unit name="sitedelta" transaction-type="RESOURCE_LOCAL">
<provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
<class>com.su3analytics.sitedelta.model.DeltaRun</class>
        ....

</persistence>


Thanks Richard.





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to