Hi,
Do your PU (Persistence Unit) names match (e.g. "default" in your
persistence.xml and when you call
createEntityManagerFactory("default", properties)) ?
Note: If you are using Eclipse it will automatically copy the files
(e.g. persistence.xml and log4j.xml) in the src\META-INF directory to
the war\WEB-INFO\classes\META-INF directory.
This post may also help:
-> http://uptick.com.au/content/working-gwt-jpa-hibernate-and-hsqldb
Cheers
Rob
http://code.google.com/p/gwt-cx/
On Apr 22, 4:19 am, "Mr.S" <[email protected]> wrote:
> I am trying to get eclipselink working with GWT's requestfactory. I
> keep getting the following error:
>
> Caused by: java.lang.RuntimeException: Server Error: No Persistence
> provider for EntityManager named default
>
> Reading around the web, it seems that persistence.xml must live in WEB-
> INF/classes/META-INF/. I tried creating a folder under src/META-INF
> and placing persistence.xml in it, but it does not get included in war/
> WEB-INF/classes/ when I build the project in eclipse. Any suggestions?
> I am using GWT 2.3, EclipseLink 2.3, and eclipse 3.7. How can I get
> eclipse to include persistence.xml into the right location?
>
> persistence.xml
>
> <?xml version="1.0" encoding="UTF-8" ?> <persistence
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://java.sun.com/xml/ns/persistencehttp://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
> version="2.0" xmlns="http://java.sun.com/xml/ns/persistence">
>
> <persistence-unit name="default" transaction-type="RESOURCE_LOCAL">
> <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
>
> <class>com.manning.gwtia.ch08.v2.server.Contact</class>
>
> <properties>
> <property name="javax.persistence.jdbc.driver"
> value="org.postgresql.Driver" />
> <property name="javax.persistence.jdbc.url"
> value="jdbc:postgresql://localhost:5432/example" />
> <property name="javax.persistence.jdbc.user" value="" />
> <property name="javax.persistence.jdbc.password" value="" />
>
> <!-- EclipseLink should create the database schema
> automatically -->
> <property name="eclipselink.ddl-generation" value="create-
> tables" />
> <property name="eclipselink.ddl-generation.output-mode"
> value="database" />
> </properties>
>
> </persistence-unit>
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.