Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-19759

[GSS](7.3.z) NullPointerException due to JSFDependencyProcessor adding null ModuleIdentifer

    Details

    • Type: Bug
    • Status: Pull Request Sent (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 7.3.1.GA
    • Fix Version/s: 7.3.5.GA
    • Component/s: JSF
    • Labels:
      None
    • Target Release:
    • Steps to Reproduce:
      Hide

      1) Set the default-jsf-impl-slot to something that does not exist
      <subsystem xmlns="urn:jboss:domain:jsf:1.1" default-jsf-impl-slot="myfaces-2.2.0"/>
      2) there is an unknown variable as to what else is required to cause the NPE, with just step 1 I get a message that the slot is not valid, but some how the customer was getting NPE.

      Show
      1) Set the default-jsf-impl-slot to something that does not exist <subsystem xmlns="urn:jboss:domain:jsf:1.1" default-jsf-impl-slot="myfaces-2.2.0"/> 2) there is an unknown variable as to what else is required to cause the NPE, with just step 1 I get a message that the slot is not valid, but some how the customer was getting NPE.

      Description

      Caused by: java.lang.NullPointerException
        at org.jboss.modules.DependencySpec.createModuleDependencySpec(DependencySpec.java:637) [jboss-modules.jar:1.8.9.Final-redhat-00001]
        at org.jboss.modules.DependencySpec.createModuleDependencySpec(DependencySpec.java:593) [jboss-modules.jar:1.8.9.Final-redhat-00001]
        at org.jboss.as.server.deployment.module.ModuleSpecProcessor.createDependencies(ModuleSpecProcessor.java:346) [wildfly-server-6.0.27.Final-redhat-00001.jar:6.0.27.Final-redhat-00001]
        at org.jboss.as.server.deployment.module.ModuleSpecProcessor.createModuleService(ModuleSpecProcessor.java:236) [wildfly-server-6.0.27.Final-redhat-00001.jar:6.0.27.Final-redhat-00001]
        at org.jboss.as.server.deployment.module.ModuleSpecProcessor.deployModuleSpec(ModuleSpecProcessor.java:130) [wildfly-server-6.0.27.Final-redhat-00001.jar:6.0.27.Final-redhat-00001]
        at org.jboss.as.server.deployment.module.ModuleSpecProcessor.deploy(ModuleSpecProcessor.java:82) [wildfly-server-6.0.27.Final-redhat-00001.jar:6.0.27.Final-redhat-00001]
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:144) [wildfly-server-6.0.27.Final-redhat-00001.jar:6.0.27.Final-redhat-00001]
        ... 8 more
       

       

      We are trying to figure out what causes it, it seems to be a misconfiguration when adding an alternative JSF API that JSFDependencyProcessor can end up creating a ModuleDependency where the ModuleIdentifier is null, which is not valid.  There are is valid checks in moduleIdFactory , once we figure out how to reproduce it, we should add another check and not allow it to create an invalid ModuleDependency as it will fail later on and there it requires byteman to locate the processor that created the invalid dependency.

       

       22 package org.jboss.as.jsf.deployment;
      
       54 public class JSFDependencyProcessor implements DeploymentUnitProcessor {
      
      110     private void addJSFAPI(String jsfVersion, ModuleSpecification moduleSpecification, ModuleLoader moduleLoader) {
      111         if (jsfVersion.equals(JsfVersionMarker.WAR_BUNDLES_JSF_IMPL)) return;
      112 
      113         ModuleIdentifier jsfModule = moduleIdFactory.getApiModId(jsfVersion);
      114         ModuleDependency jsfAPI = new ModuleDependency(moduleLoader, jsfModule, false, false, false, false);
      115         moduleSpecification.addSystemDependency(jsfAPI);
      116     } 

       

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  mshikalw Moulali Shikalwadi
                  Reporter:
                  bmaxwell Brad Maxwell
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  4 Start watching this issue

                  Dates

                  • Created:
                    Updated: