ServletContainerInitializers from jboss-deployment-structure.xml module dependencies are not invoked
Environment
- JBoss Enterprise Application Platform (EAP) 6.4.6
Issue
- If a module includes a ServletContainerInitializer, that ServletContainerInitializer is not invoked for any applications that include the module in its jboss-deployment-structure.xml module dependencies.
Resolution
- Apply the 6.4.7 CP to acquire a fix
- Another options is to provide the module as a global module instead, then the SCI will be found:
<subsystem xmlns="urn:jboss:domain:ee:1.1">
<global-modules>
<module name="modulename" slot="main"/>
</global-modules>
- Also, the SCI is also successfully invoked if the SCI providing jar is included in the app via an overlay so this is another alternative solution, for example add a deployment-overlay like so:
deployment-overlay add --name=SCIoverlay \
--content=/WEB-INF/lib/SCIjarname.jar=/path/to/your/SCIjarname.jar
--deployments=warname.war \
--redeploy-affected
Root Cause
- This content is not included.BZ-1297877
- Content from issues.jboss.org is not included.JBEAP-2744
- Content from issues.jboss.org is not included.WFLY-5962
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.