Forum Stats

  • 3,760,378 Users
  • 2,251,695 Discussions
  • 7,871,088 Comments

Discussions

having problem depolying app in glassfish

I wrote a simple app that enter data to DB and populate it in html
however, I can depoly it. Could you point out the error?


Publishing failed
Could not publish to the server.
java.lang.NullPointerException
Could not publish to the server.
java.lang.NullPointerException
cannot Deploy BookWeb
Deployment Error for module: BookWeb: Error occurred during deployment: Exception while deploying the app [BookWeb] : org.xml.sax.SAXParseException; lineNumber: 12; columnNumber: 15; Deployment descriptor file META-INF/persistence.xml in archive [classes]. cvc-complex-type.2.4.a: Invalid content was found starting with element 'Properties'. One of '{"http://java.sun.com/xml/ns/persistence":class, "http://java.sun.com/xml/ns/persistence":exclude-unlisted-classes, "http://java.sun.com/xml/ns/persistence":shared-cache-mode, "http://java.sun.com/xml/ns/persistence":validation-mode, "http://java.sun.com/xml/ns/persistence":properties}' is expected.. Please see server.log for more details.




<?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/xmls/ns/persistence/persistence_2_0.xsd"
version="2.0">

<persistence-unit name="chapter10PU" transaction-type="JTA">
<provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
<jta-data-source>jdbc/__OraclePool</jta-data-source>
<class>com.apress.javaee6.chapter10.Book</class>
<Properties>
<Property name="eclipselink.ddl-generation" value="create-tables"/>
<Property name="eclipselink.logging.level" value="INFO"/>
</Properties>
</persistence-unit>
</persistence>
This discussion has been closed.