Jpa org.xml.sax.SAXParseException;行号:10;栏目编号:18;cvc复杂类型.2.4.a:发现以元素';属性';

Jpa org.xml.sax.SAXParseException;行号:10;栏目编号:18;cvc复杂类型.2.4.a:发现以元素';属性';,jpa,xml-validation,persistence.xml,Jpa,Xml Validation,Persistence.xml,我做了以下教程 我越来越 原因:org.xml.sax.saxpasseeption;行号:10;栏目编号:18;cvc复杂类型.2.4.a:发现以元素“properties”开头的内容无效。应为“{”“:property}”之一 指向my presistence.xml,如下所示: <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.1" xmlns="http://xmlns.jcp.org/

我做了以下教程

我越来越

原因:org.xml.sax.saxpasseeption;行号:10;栏目编号:18;cvc复杂类型.2.4.a:发现以元素“properties”开头的内容无效。应为“{”“:property}”之一

指向my presistence.xml,如下所示:

<?xml version="1.0" encoding="UTF-8"?>
<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">
 <persistence-unit name="loginTestPU" transaction-type="RESOURCE_LOCAL">
  <class>entities.User</class>
  <properties>   
    <property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/p?zeroDateTimeBehavior=convertToNull"/>
    <property name="javax.persistence.jdbc.driver" value="com.mysql.jdbc.Driver"/>
    <property name="javax.persistence.jdbc.user" value="User"/>
    <property name="javax.persistence.jdbc.password" value="p"/>
    <properties/>
    </persistence-unit>
    </persistence>

实体。用户
预计会有什么样的财产

同样在视频中使用了Eclipse_JPA库,我安装了netbeans 8.1,它没有这个库,我使用了EclipseLink(JPA2.1)。这是我的实现与视频上的实现之间的唯一区别。

使用
代替

不过是
的缩写,但是如果您想在
之间添加一些东西,而您在您的案例中尝试这样做,则不能使用
使用
代替


不过是
的缩写,但是如果您想在
之间添加一些东西,而您在您的案例中尝试这样做,那么您不能使用

使用
来代替“Ok now I'm getting different error”(现在我得到了不同的错误),也就是说,“”是由netbeans自动生成的,正斜杠有什么区别属性之前还是之后?
不过是
的缩写,但是如果您想在
之间添加一些东西,而您在您的案例中所做的事情,您不能使用
好的,我可以接受您对这个问题的回答,我只需要做一个回答。感谢您的帮助使用
来代替“Ok now I'm Get different error is Ok now I'm now the now the Ok the now the”是netbeans自动生成的“”,属性前后的正斜杠有什么区别?
不过是
的缩写,但是如果您想在您的案例中所做的
之间添加一些内容你不能使用
好的,我可以接受你对这个问题的回答,我只是做个回答。谢谢你的帮助