Hello, I’m trying the JPA from the MyEclipse 5.5M2, and I’ve found some problems, like this kind off error, and what I’ve to do to fix this. Is only a test
Here is my XML :
<?xml version=”1.0″ encoding=”UTF-8″?>
<persistence 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” version=”1.0″>
<persistence-unit name=”persistence1″ transaction-type=”RESOURCE_LOCAL”>
<provider>mysql.toplink.essentials.PersistenceProvider</provider>
<class>entity.Login</class>
<class>entity.Client1</class>
<properties>
<property name = “toplink.jdbc.driver” value = “com.mysql.jdbc.Driver”/>
<property name = “toplink.jdbc.url” value = “jdbc:mysql://127.0.0.1:3306/client”/>
<property name = “toplink.jdbc.user” value = “root”/>
<property name = “toplink.jdbc.password” value = “test”/>
</properties>
</persistence-unit>
</persistence>
Part of client program client :
// Create EntityManagerFactory for persistent unit named “pu1”
// to be used in this test
emf = Persistence.createEntityManagerFactory(“persistence1”);
// Persist all entities
createTransactionalEntityManager();
System.out.println(“Inserting Customer and Orders… ” + testInsert());
closeTransactionalEntityManager();
.
.
.