Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-2550

Deploying web application using web.xml version 2.5 and older prints errors in log

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 7.0.0.ER5
    • None
    • Undertow
    • None

      Deploying web application containing web.xml using version 2.5 including schema definition [1] prints errors to log [2].

      Note this works with EAP 6. Marking as blocker as all deployments working with EAP 6 (which don't use internal APIs) should also work with EAP7 [EAP7-251] and old version of web-app should be also supported per http://download.oracle.com/otndocs/jcp/servlet-3_1-fr-eval-spec/index.html and it worked

      [1]

      <web-app xmlns="http://java.sun.com/xml/ns/javaee"
      	      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      	      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 
      	      http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
      	      version="2.5">
      </web-app>
      

      [2]

      12:55:14,936 WARN  [org.jboss.metadata.parser.util.XMLResourceResolver] (MSC service thread 1-3) Cannot load publicId from resource: web-app_2_5.xsd
      12:55:16,041 ERROR [org.jboss.metadata.parser.util.XMLSchemaValidator] (MSC service thread 1-3) Cannot get schema for location: http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd: org.xml.sax.SAXParseException; systemId: http://java.sun.com/xml/ns/javaee/javaee_5.xsd; lineNumber: 83; columnNumber: 38; sch-props-correct.2: A schema cannot contain two global components with the same name; this schema contains two occurrences of 'http://java.sun.com/xml/ns/javaee,descriptionGroup'.
      	at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:201)
      	at org.apache.xerces.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:132)
      	at org.apache.xerces.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:394)
      	at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:4093)
      	at org.apache.xerces.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:4088)
      	at org.apache.xerces.impl.xs.traversers.XSDHandler.checkForDuplicateNames(XSDHandler.java:3746)
      	at org.apache.xerces.impl.xs.traversers.XSDHandler.buildGlobalNameRegistries(XSDHandler.java:1315)
      	at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:610)
      	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:580)
      	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:547)
      	at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(XMLSchemaLoader.java:513)
      	at org.apache.xerces.jaxp.validation.XMLSchemaFactory.newSchema(XMLSchemaFactory.java:233)
      	at javax.xml.validation.SchemaFactory.newSchema(SchemaFactory.java:638)
      	at __redirected.__SchemaFactory.newSchema(__SchemaFactory.java:167)
      	at org.jboss.metadata.parser.util.XMLSchemaValidator.getSchemaForLocation(XMLSchemaValidator.java:117)
      	at org.jboss.metadata.parser.util.XMLSchemaValidator.validate(XMLSchemaValidator.java:85)
      	at org.wildfly.extension.undertow.deployment.WebParsingDeploymentProcessor.deploy(WebParsingDeploymentProcessor.java:104)
      	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
      	at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      
      12:55:16,042 WARN  [org.jboss.metadata.parser.util.XMLSchemaValidator] (MSC service thread 1-3) Cannot get schema for location: http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd
      

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              rhatlapa@redhat.com Radim Hatlapatka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: