OSGI WAB problem with persistence.xml [message #652694] |
Sat, 05 February 2011 08:40  |
Eclipse User |
|
|
|
Hello, I'm having some problem with EclipseLink. I'm using GlassFish v3.1 and I'm trying to use EclipseLink for my persistence layer. I followed all tutorials available on the Eclipse wiki without luck. My persistence.xml file cannot be parsed and I receive this error while trying to create the EntityManagerFactory:
Quote: | org.eclipse.persistence.exceptions.PersistenceUnitLoadingExc eption Exception Description: An exception was thrown while processing persistence.xml from URL: bundle://307.1:1/
|
The full stack trace can be found here: dinoz.mobi/stack.txt
Here is my persistence.xml located in /WEB-INF/classes/META-INF/:
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
<persistence-unit name="generic">
<class>com.generic.domain.Service</class>
<properties>
<!-- Embedded MySQL Login -->
<property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306"/>
<!-- TODO: replace with connection pool -->
<property name="javax.persistence.jdbc.userid" value="root"/>
<property name="javax.persistence.jdbc.password" value=""/>
<property name="eclipselink.target-database" value="MySQL"/>
<property name="eclipselink.jdbc.read-connections.min" value="1"/>
<property name="eclipselink.jdbc.write-connections.min" value="1"/>
<property name="eclipselink.jdbc.batch-writing" value="JDBC"/>
<!-- Logging Settings -->
<property name="eclipselink.logging.level" value="FINE" />
<property name="eclipselink.logging.thread" value="false" />
<property name="eclipselink.logging.session" value="false" />
<property name="eclipselink.logging.exceptions" value="true" />
<property name="eclipselink.logging.timestamp" value="false"/>
</properties>
</persistence-unit>
</persistence>
I'm using the EclipseLink bundle that are available in GlassFish v3.1
Here is the structure of my WAB:
Quote: |
- META-INF/MANIFEST.MF
- WEB-INF/web.xml
- WEB-INF/classes/com/...
- WEB-INF/classes/META-INF/persistence.xml
|
Bundle-ClassPath: WEB-INF/classes
I can find the persistence.xml under WEB-INF/classes/META-INF/
I added this line to my MANIFEST.MF:
Quote: | JPA-PersistenceUnits: generic
|
Thanks for your help.
--
Samuel D.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04608 seconds