users@glassfish.java.net

Persistence.xml

From: <glassfish_at_javadesktop.org>
Date: Thu, 04 Feb 2010 08:44:16 PST

I'm using eclipse (IDE), glassfish and mysql database. I'm having all sorts of problems trying to connect to a datasource. I'm using Mysql connector 5.1.11 to attempt to connect to the database. I'm trying to use the entity manager in Entity Beans using JPA (EJB 3.0 specs), My error is that the class path com.mysql.jdbc.jdbc2.optional.mydqlDataSource is not found. As you know, Glassfish uses Oracle Toplink. My persistence.xml is below

<persistence xmlns="http://java.sun.com/xml/nx/persistence" version="1.0">
<persistence-unit name="test" transaction-type="JTA">
<provider>oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider</provider>
<jta-data-source>mysql</jta-data-source>
<properties>
<property name="toplink.target-database" value="oracle.toplink.essentials.platform.database.MySQL4Platform"/>
<property name="toplink.jdbc.driver" value="com.mysql.djbc.Driver"/>
<property name="toplink.jdbc.url" value="jdbc:mysql://localhost:3306/ILLogin"/>
</properties>
</persistence-unit>
</persistence>
[Message sent by forum member 'ug_tannic' (daniel.crain_at_us.army.mil)]

http://forums.java.net/jive/thread.jspa?messageID=384821