I have my persistence.xml with the same name, using toplink, under META-INF directory. Then I have my code calling it with...
EntityManagerFactory factory =Persistence.createEntityManagerFactory("openjpa");
Yet, I got the following error message
2010-08-19 09:22:41,018 [main] ERROR - No Persistence provider for EntityManager named openjpa
javax.persistence.PersistenceException: No Persistence provider for EntityManager named openjpa
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:89)
at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:60)
Here is the persistence.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="openjpa" transaction-type="RESOURCE_LOCAL">
<jta-data-source>java:/DefaultDS</jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQL5Dialect"/>
<property name="hibernate.hbm2ddl.auto" value="update"/>
<property name="hibernate.connection.driver_class" value="org.gjt.mm.mysql.Driver"/>
<property name="hibernate.connection.username" value="root"/>
<property name="hibernate.connection.password" value=""/>
<property name="hibernate.connection.url" value="jdbc:mysql://localhost:3306/bookshop?useCode=true&characterEncoding=UTF-8"/>
</properties>
</persistence-unit>
</persistence>
It should have been in the classpath... Yet, I got the above error... Really appreciate any help... Thanks
分享到:
相关推荐
javax.persistence.EntityManager.class javax.persistence.EntityManagerFactory.class javax.persistence.EntityNotFoundException.class javax.persistence.EntityResult.class javax.persistence....
HIBERNATE - Relational Persistence for Idiomatic Java,还是中文的哦
从hibernate官网上 下载的HIBERNATE - Relational Persistence for Idiomatic Java.chm
SAP NetWeaver CE 7.1EHP1 Hibernate应用
The Design of a Robust Persistence Layer For Relational Databases...In this white paper I present an overview of the design of a robust persistence layer for object-oriented applications. I have ...
Apress.Java.Persistence.for.Relational.Databases
HP 存储 3PAR高可用性解决方案 Peer Persistence for VMware
All possible basic and advanced Hibernate mappings are shown in this book, with hundreds of examples in Hibernate's XML format, including Java Persistence annotations for JDK 5.0. Readers can get ...
Take the pain out of ... With this short book, you can save time and money by simply coding less while accomplishing more with the Doctrine persistence framework, a leading persistence solution for ...
object/relational mapping, EntityManager and Query interfaces, and the Java Persistence query language. It adds an API for criteria queries, a metamodel API, and support for validation.
Persistence is an important set of techniques and technologies for accessing and using data, and ensuring that data is mobile regardless of specific applications and contexts. In Java development, ...
This text provides best practices and patterns for readers who want to connect to databases using Java. It also includes coverage of various database-related APIs for Java, including JDO, JDBC ...
自从起草EJB 3.0的规范开始,无论是在客户端还是在服务器端的应用程序里,Java的类就一直有一种单一的、标准的...我们利用Hibernate的EntityManager/Annotations实现让简单的Person和Address类保持到嵌入的HSQLDB里。
Manning出版 Java Persistence With Hibernate 第二版 清晰pdf Hibernate, an open source project that is almost 15 years old. In a recent poll, Hibernate was among the top five tools used by many Java ...
Take the pain out of ... With this short book, you can save time and money by simply coding less while accomplishing more with the Doctrine persistence framework, a leading persistence solution for ...
hibernate EntityManager是围绕提供JPA编程接口的Hibernate Core的一个包装,支持JPA实体实例的生命周期,并允许你用标准的Java Persistence查询语言编写查询
persistence,persistence-api-1.0.2.jar,java,hibernate-jpa
JavaPersistence 2.2.zip JavaPersistence 2.2.zip JavaPersistence 2.2.zip JavaPersistence 2.2.zip JavaPersistence 2.2.zip
Spring Persistence with Hibernate