1
votes

My application was JEE3 and i migrated to JEE7, so i changed my web.xml 's namespace from "http://java.sun.com/xml/ns/javaee" to "http://xmlns.jcp.org/xml/ns/javaee", and i was using the following library to treat my web.xml : com.sun.java.xml.ns.javaee.FilterType com.sun.java.xml.ns.javaee.WebAppDocument com.sun.java.xml.ns.javaee.WebAppType

After migrating, i got the following error: org.apache.xmlbeans.XmlException: C:\Users\WorkspacePhoton\transfer-parent\transfer-web\src\main\webapp\WEB-INF\web.xml:0: error: The document is not a web-app@http://java.sun.com/xml/ns/javaee: document element namespace mismatch expected "http://java.sun.com/xml/ns/javaee" got "http://xmlns.jcp.org/xml/ns/javaee"

because the WebAppDocument.Factory.parse(webXmlFile) treat only web.xml with namespace java.sun.com/xml/ns/javaee.

So my question is there any other library i can use to treat my web.xml and get my WebAppType from web.xml?

1

1 Answers

0
votes

the solution was to upgrade the version of jar modelapp from 3.0 to 3.1 because Jee 7 uses modelapp 3.1