java - WebSphere 8 persistence.xml syntax error (expected root element) -
Installing my web application on WebSphere application server 8 fails due to syntax error in my persistence.xml. According to my IDE, there is no error, what is the real problem?
persistence.xml:
& lt ;? XML version = "1.0" encoding = "UTF-8"? & Gt; & Lt; Persistence xmlns = "http://xmlns.jcp.org/xml/ns/persistence" version = "2.1" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schema location = "Http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_1.xsd" & gt; & Lt; Persistent-entity name = "myapp" & gt; & Lt; Provider & gt; org.hibernate.jpa.HibernatePersistenceProvider & lt; / Provider & gt; & Lt; / Persistence unit & gt; & Lt; / Persistence> Excerpt from steak trace (SystemOut.log):
1:
Reason by: com.ibm.ws.metadata . MetaDataException: CWWJP0040E: There is a syntax error on line number in PASTE.PMPAPML, module Appl-0.1.war, in the application: 6, column number: 2. 2:
by reason: org.xml.sax.SAXParseException: expected root element {http://java.sun.com/xml/ns/serstenceoverpriceistence please comment Please, if you need more information.
try it
& lt ;? Xml version = "1.0"? & Gt; & Lt; Persistence xmlns = "http://java.sun.com/xml/ns/preistence" xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" xsi: schema location = "http: / /java.sun.com/xml/ns/pressistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd "version =" 2.0 "& gt; & Lt; Persistent-entity name = "myapp" & gt; & Lt; Provider & gt; org.hibernate.jpa.HibernatePersistenceProvider & lt; / Provider & gt; & Lt; / Persistence unit & gt; & Lt; / Persistence>
Comments
Post a Comment