You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Richard Hill <ri...@su3analytics.com> on 2010/10/20 15:22:48 UTC

Tapestry 5.1 and openJPA

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: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5.1 and openJPA

Posted by Richard Hill <ri...@su3analytics.com>.
Hi Josh,

Yes, after posting I figured my problem was probably not
tapestry-specific.

Will do, cheers.



-----Original Message-----
From: Josh Canfield <jo...@gmail.com>
Reply-to: "Tapestry users" <us...@tapestry.apache.org>
To: Tapestry users <us...@tapestry.apache.org>, rich@su3analytics.com
Subject: Re: Tapestry 5.1 and openJPA
Date: Wed, 20 Oct 2010 09:31:35 -0700

It sounds like your problem is more directly related to either spring
or open jpa. While you might find someone on this list with experience
in those technologies you might have more luck if you run it by
someone with spring/openjpa...


Josh

On Wed, Oct 20, 2010 at 6:22 AM, Richard Hill <ri...@su3analytics.com> wrote:
>
> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Tapestry 5.1 and openJPA

Posted by Josh Canfield <jo...@gmail.com>.
It sounds like your problem is more directly related to either spring
or open jpa. While you might find someone on this list with experience
in those technologies you might have more luck if you run it by
someone with spring/openjpa...


Josh

On Wed, Oct 20, 2010 at 6:22 AM, Richard Hill <ri...@su3analytics.com> wrote:
>
> 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: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org