War deployment exception: Parser configuration exception parsing XML from Ser vletContext resource

726 views Asked by At

I try to deploy a War on jboss, but am getting exception as :

Jboss logs :

{"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"WFL YCTL0080: Failed services" => {"jboss.deployment.unit."acs-init.war".undertow-deployment" => "java.lang.RuntimeE xception: org.springframework.beans.factory.BeanDefinitionStoreException: Parser configuration exception parsing XML from Ser vletContext resource [/WEB-INF/classes/properties/acs-ws-context.xml]; nested exception is javax.xml.parsers.ParserConfigurat ionException: Unable to validate using XSD: Your JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactor yImpl@293fa923] does not support XML Schema. Are you running on Java 1.4 with Apache Crimson? Upgrade to Apache Xerces (or Ja va 1.5) for full XSD support. Caused by: java.lang.RuntimeException: org.springframework.beans.factory.BeanDefinitionStoreException: Parser configurati on exception parsing XML from ServletContext resource [/WEB-INF/classes/properties/acs-ws-context.xml]; nested exception is j avax.xml.parsers.ParserConfigurationException: Unable to validate using XSD: Your JAXP provider [com.sun.org.apache.xerces.in ternal.jaxp.DocumentBuilderFactoryImpl@293fa923] does not support XML Schema. Are you running on Java 1.4 with Apache Crimson ? Upgrade to Apache Xerces (or Java 1.5) for full XSD support. Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Parser configuration exception parsing XML fro m ServletContext resource [/WEB-INF/classes/properties/acs-ws-context.xml]; nested exception is javax.xml.parsers.ParserConfi gurationException: Unable to validate using XSD: Your JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderF actoryImpl@293fa923] does not support XML Schema. Are you running on Java 1.4 with Apache Crimson? Upgrade to Apache Xerces ( or Java 1.5) for full XSD support. Caused by: javax.xml.parsers.ParserConfigurationException: Unable to validate using XSD: Your JAXP provider [com.sun.org. apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl@293fa923] does not support XML Schema. Are you running on Java 1.4 wit h Apache Crimson? Upgrade to Apache Xerces (or Java 1.5) for full XSD support. Caused by: java.lang.IllegalArgumentException: org.apache.xerces.parsers.XML11Configuration incompatible with org.apache. xerces.xni.parser.XMLParserConfiguration"}}}}

From POM.xml :

...

    <dependency>
        <groupId>xerces</groupId>
        <artifactId>xercesImpl</artifactId>
        <version>${xercesImpl.xercesImpl.version}</version>
    </dependency>

...

When i remove the xerces dependecy from pom.xml and remove the jar from the lib the war is deployed but it doesnt work, i have this response from soap api :

     <html>
   <head>
      <title>Error</title>
   </head>
   <body>Internal Server Error</body>
</html>

I tried many solutions like adding in /jboss-eap-7.3/bin/standalone.conf jvm arguments but nothing seems to work.


if [ "x$JAVA_OPTS" = "x" ]; then
   JAVA_OPTS="-Xms4000m -Xmx4000m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=512m -Djava.net.preferIPv4Stack=true"
   JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true -Djavax.xml.parsers.DocumentBuilderFactory=com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl -Djavax.xml.parsers.SAXParserFactory=com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl"
else
...

Ps : when i replace xercesImpl-2.6.2.jar TO xercesImpl-2.6.2-jaxb-1.0.6.jar in the lib, and i add in standalone.conf this arguments the war is deploying but in soap i have an error

Argments added:

-Djavax.xml.soap.SOAPFactory=com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPFactory1_1Impl 
-Djavax.xml.soap.SOAPConnectionFactory=com.sun.xml.internal.messaging.saaj.client.p2p.HttpSOAPConnectionFactory -Djavax.xml.soap.MetaFactory=com.sun.xml.internal.messaging.saaj.soap.SAAJMetaFactoryImpl

Error in soapui :

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <soap:Fault>
         <faultcode xmlns:ns1="octo.com">ns1:8</faultcode>
         <faultstring>Problems creating SAAJ object model</faultstring>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

How can i solve this problem please ?

0

There are 0 answers