Uploaded image for project: 'Application Server 3  4  5 and 6'
  1. Application Server 3 4 5 and 6
  2. JBAS-4193

Validation requirement should come from the model factory

    XMLWordPrintable

Details

    Description

      A regression relative to how we parse application.xml without validation jbossas4.2 and earlier is showing up in placeholder application.xml deployments like:

      <!DOCTYPE application PUBLIC
      "-//Sun Microsystems, Inc.//DTD J2EE Application 1.3//EN"
      "http://java.sun.com/dtd/application_1_3.dtd">

      <application>
      <display-name>Resource Loading Ear</display-name>
      </application>

      This fails because this dtd requires at least one module as well:

      Caused by: org.jboss.xb.binding.JBossXBException: Failed to parse source: vfsfil
      e:/C:/home/svn/JBossHead/jboss-head/testsuite/output/lib/unpacked/loadingresourc
      e2.ear/META-INF/application.xml@7,15
      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser.parse(SaxJBossXBPars
      er.java:173)
      at org.jboss.xb.binding.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java
      :180)
      at org.jboss.deployers.plugins.deployers.helpers.ObjectModelFactoryDeplo
      yer.parse(ObjectModelFactoryDeployer.java:83)
      ... 70 more
      Caused by: org.xml.sax.SAXException: The content of element type "application" i
      s incomplete, it must match "(icon?,display-name,description?,module+,security-r
      ole*)". @ vfsfile:/C:/home/svn/JBossHead/jboss-head/testsuite/output/lib/unpacke
      d/loadingresource2.ear/META-INF/application.xml[7,15]
      at org.jboss.xb.binding.parser.sax.SaxJBossXBParser$MetaDataErrorHandler
      .error(SaxJBossXBParser.java:406)
      at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown S

      To allow for similar behavior, we need to allow the ObjectModelFactory used by the deployer to indicate whether validation is needed.

      Attachments

        Activity

          People

            olubyans@redhat.com Alexey Loubyansky
            starksm64 Scott Stark (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: