我是PLAY框架的新手。我一直收到这个错误。我似乎没有发现代码有任何问题。请帮帮我。
CONF / META-INF / persistence.xml中:
<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_2_0.xsd"
version="2.0">
<persistence-unit name="defaultPersistenceUnit" transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<non-jta-data-source>DefaultDS</non-jta-data-source>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.MySQLInnoDBDialect"/>
</properties>
</persistence-unit>
</persistence>
我的application.conf:
db.default.driver=org.h2.Driver
db.default.url="jdbc:h2:mem:play"
db.default.jndiName=DefaultDS
jpa.default=defaultPersistenceUnit
ebean.default="model.*" // cuz my folder is model and not models.
我对实体经理的呼吁:
EntityManagerFactory emf = Persistence.createEntityManagerFactory("defaultPersistenceUnit");
请帮帮我!