I have a problem with running a web project with JPA. Netbeans shows the message:
The module has not been deployed. See the server log for details.
I'm using Glassfish as a server, it shows following error message:
Grave: Exception lors du déploiement de l'application [delegation_anomalie] : org.xml.sax.SAXParseException; lineNumber: 6; columnNumber: 122; Fichier de descripteur de déploiement META-INF/persistence.xml dans l'archive [classes]. cvc-complex-type.2.1 : L'élément 'property' ne doit comporter aucun enfant ([children]) de type caractère ou élément d'information, car le type de contenu du type est vide.
Which means that element proprety
should have no children.
Here is my persistence.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.0" 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">
<persistence-unit name="delegation_anomaliePU" transaction-type="RESOURCE_LOCAL">
<class>dbclass.web.Profile</class>
<properties>
<property name="javax.persistence.jdbc.url" value="jdbc:postgresql://localhost:5432/delegation_anomalie"> </property>
<property name="javax.persistence.jdbc.driver" value="org.postgresql.Driver"></property>
<property name="javax.persistence.jdbc.user" value="sde"> </property>
<property name="javax.persistence.jdbc.password" value="1234"> </property>
</properties>
</persistence-unit>
</persistence>
How is this caused and how can I solve it?