":persistence-unit}' is expected error when using restful webservice using netbeans

By : faraa

I am deploying a restful webservice using jersey.I am reading this tutorial and doing instructions:

but I get this error on deploying on server .

Severe: Exception while deploying the app [PlayerServer2] : org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 15; Deployment descriptor file META-INF/persistence.xml in archive [classes]. cvc-complex-type.2.4.b: The content of element 'persistence' is not complete. One of '{"":persistence-unit}' is expected.

I am using netbean 8.0.1, glassfish server 4.1, JDK 1.8.91, JPA 2.1



<persistence version="2.1" xmlns="" xmlns:xsi="" xsi:schemaLocation="">
  <persistence-unit name="PlayerServer2PU" transaction-type="JTA">
By : faraa

Please remove the empty <properties/> tag in order for the persistence.xml file to be handled correctly.

By : Apostolos

This video can help you solving your question :)
By: admin