Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-14274

Validation Issues With jboss-ejb3.xml

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not a Bug
    • Icon: Major Major
    • None
    • 18.0.1.Final
    • EJB
    • None
    • Hide

      1.  Create a jboss-ejb3.xml file in an ejb project.

      2. Add the text 

      <?xml version="1.1" encoding="UTF-8"?>
      <jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee"
                     xmlns="http://java.sun.com/xml/ns/javaee"
                     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                     xmlns:s="urn:security:1.1"
                     xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd http://java.sun.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-spec-2_0.xsd"
                     version="3.1"
                     impl-version="2.0">
          <enterprise-beans>
              <message-driven>
                  <ejb-name>ReplyingMDB</ejb-name>
                  <ejb-class>org.jboss.as.test.integration.ejb.mdb.messagedestination.ReplyingMDB</ejb-class>
                  <activation-config>
                      <activation-config-property>
                          <activation-config-property-name>destination</activation-config-property-name>
                          <activation-config-property-value>java:jboss/mdbtest/messageDestinationQueue
                          </activation-config-property-value>
                      </activation-config-property>
                  </activation-config>
              </message-driven>
          </enterprise-beans>
          <assembly-descriptor>
              <s:security>
                  <ejb-name>DDMyDomainSFSB</ejb-name>
                  <s:security-domain>myDomain</s:security-domain>
                  <s:run-as-principal>myPrincipal</s:run-as-principal>
              </s:security>
          </assembly-descriptor>
      </jboss:ejb-jar>

      3.  Build and verify the project. The <s:security> tag will fail validation.

      Show
      1.  Create a jboss-ejb3.xml file in an ejb project. 2. Add the text  <?xml version="1.1" encoding="UTF-8"?> <jboss:ejb-jar xmlns:jboss="http://www.jboss.com/xml/ns/javaee" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:s="urn:security:1.1" xsi:schemaLocation="http://www.jboss.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-2_0.xsd http://java.sun.com/xml/ns/javaee http://www.jboss.org/j2ee/schema/jboss-ejb3-spec-2_0.xsd" version="3.1" impl-version="2.0"> <enterprise-beans> <message-driven> <ejb-name>ReplyingMDB</ejb-name> <ejb-class>org.jboss.as.test.integration.ejb.mdb.messagedestination.ReplyingMDB</ejb-class> <activation-config> <activation-config-property> <activation-config-property-name>destination</activation-config-property-name> <activation-config-property-value>java:jboss/mdbtest/messageDestinationQueue </activation-config-property-value> </activation-config-property> </activation-config> </message-driven> </enterprise-beans> <assembly-descriptor> <s:security> <ejb-name>DDMyDomainSFSB</ejb-name> <s:security-domain>myDomain</s:security-domain> <s:run-as-principal>myPrincipal</s:run-as-principal> </s:security> </assembly-descriptor> </jboss:ejb-jar> 3.  Build and verify the project. The <s:security> tag will fail validation.
    • Undefined
    • ---
    • ---

      When attempting to add a <s:security> section to the <assembly-descriptor> of jboss-ejb3.xml I get the following error:

      Invalid element name: - security One of the following is expected: - security-role - method-permission - container-transaction - interceptor-binding - message-destination - exclude-list - application-exception - assembly-descriptor-entry Error indicated by: {urn:security:1.1} with code:

       I copied and pasted the exact text given in the example here: https://docs.wildfly.org/18/Developer_Guide.html#jboss-ejb3 so I'm not quite sure what the issue is. I found several bugs that seemed to describe the same behaviour, but they were all marked as fixed. See: https://issues.redhat.com/browse/JBIDE-18316 and https://bugzilla.redhat.com/show_bug.cgi?id=1302544 for examples.

       

       Is there something wrong with the given documentation or is there still a bug in the schemas?

       

      Environment:

      Eclipse Photon (4.17)

      Jboss Tools plugin

      Wildfly 18.0.1 Final

              cfang@redhat.com Cheng Fang
              pbtura Patrick Buchheit (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: