1

这个标签在 eclipse kepler 和 wildfly 8.0 中不起作用,想要与 jpa 2.1 一起工作,这个标签是由 eclipse 自动生成的。

<persistence version="2.1"  
xmlns="http://xmlns.jcp.org/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence     
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">

如果我尝试使用这个标签

<?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_2_0.xsd"
             version="2.0">

一切正常。

请帮我解决这个问题。

这是错误

4

1 回答 1

0

根据这个参考:如何在persistence.xml中指定JPA 2.1?你的标签看起来不错。

您能否发布 Eclipse 为 JPA 2.1 标签提供的错误?

于 2014-04-04T21:39:57.447 回答