module defined in jboss-deployment-structure.xml with fails to parse when annotations=true in JBoss EAP 7

Solution Verified - Updated -

Issue

  • We have an EAR application with subdeployment Jars under root of EAR listed as modules under application.xml and a Jar with annotations that contained under the root folder of the EAR and we have it listed under the jboss-deployment-structure.xml as an inline module. We created the jandex and set annotations=true as per the documentation [1]

The deployment fails with missing dependencies when annotations=true is set :

10:42:56,061 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "application-exception-using-dynamic-module.ear")]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.deployment.subunit.\"application-exception-using-dynamic-module.ear\".\"application-exception-ejb.jar\".PARSE is missing [jboss.module.service.\"deployment.application-exception-api\".main]"]}

[1] https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.0/html/development_guide/class_loading_and_modules#add_an_explicit_module_dependency_to_a_deployment

  • The jboss-deployment-structure.xml file looks like:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
  <sub-deployment name="application-exception-ejb.jar">
    <dependencies>
       <module name="deployment.application-exception-api" annotations="true"/>
    </dependencies>
  </sub-deployment>
  <module name="deployment.application-exception-jds.ear.application-exception-api.jar">
    <resources>
     <resource-root path="application-exception-api.jar"/>
    </resources>
  </module>
</jboss-deployment-structure>
  • the application.xml file looks like:
<?xml version="1.0" encoding="UTF-8"?>
<application 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/application_6.xsd"
  version="6">
    <module>
        <ejb>application-exception-ejb.jar</ejb>
    </module>
</application>
  • the ear-subdeployments-isolated property is set to true under the EE subsystem in standalone*.xml/domain.xml

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content