Uploaded image for project: 'JBoss Metadata'
  1. JBoss Metadata
  2. JBMETA-395

jboss-app:moduleType should use jee:moduleType as a base

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 12.0.0.Final
    • None
    • ear
    • None

      While attempting to make a simple ear with a war and a service inside, we run into several validation errors continuously. The following xml, for example, fails to validate:

      <?xml version="1.1" encoding="UTF-8"?>
      <jboss-app version="6" xmlns="http://www.jboss.com/xml/ns/javaee"
      	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      	xmlns:jbee="http://www.jboss.com/xml/ns/javaee"
      	xmlns:jee="http://java.sun.com/xml/ns/javaee"
      	xsi:schemaLocation="
            http://www.jboss.com/xml/ns/javaee
            http://www.jboss.org/schema/jbossas/jboss-app_7_0.xsd">
            <jee:display-name>Test</jee:display-name>
            <jee:module>
            	<jee:web>
      	      	<jee:web-uri>myweb.war</jee:web-uri>
      	      	<jee:context-root>SomeRoot</jee:context-root>
            	</jee:web>
            	<jbee:service>bundled.sar</jbee:service>
            </jee:module>
            <jbee:distinct-name>MyDistinct</jbee:distinct-name>
      </jboss-app>
      

      The error is: cvc-complex-type.2.4.a: Invalid content was found starting with element 'jbee:service'. One of '

      {"http:// java.sun.com/xml/ns/javaee":alt-dd}

      ' is expected.

      Basically, a jbee:service does not belong inside a jee:module. However, trying to declare jbee:module rather than jee:module fails because: cvc-complex-type.2.4.a: Invalid content was found starting with element 'jbee:module'. One of '

      {"http:// java.sun.com/xml/ns/javaee":display-name, "http://java.sun.com/xml/ns/javaee":icon, "http://java.sun.com/ xml/ns/javaee":initialize-in-order, "http://java.sun.com/xml/ns/javaee":module}

      ' is expected.

      In short, jbee:moduleType should probably be using jee:moduleType as a base.

              Unassigned Unassigned
              rob.stryker Rob Stryker (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: