Uploaded image for project: 'JBoss Web'
  1. JBoss Web
  2. JBWEB-293

NPE if method getClassLoader() returns null to represent the bootstrap class loader

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: JBossWeb-2.1.14.GA
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None

      Description

      from the scenario in JBPAPP-11027 , and java code in java/javax/el/BeanELResolver.java :

      BeanELResolver.java
              Iterator<Class<?>> iter = cache.keySet().iterator();
              while (iter.hasNext()) {
                  Class<?> key = iter.next();
                  BeanProperties bp = cache.get(key);
                  if(bp.getType().getClassLoader().equals(classloader)){
                      iter.remove();
                  }
              }
      

      Here, when key is "class java.lang.Class" and bp's type is "class java.lang.Class", method getClassLoader() returns null to represent the bootstrap class loader, then NPE as described is threw during stopping service jboss.web

      cache content:
      
      class org.jboss.on.embedded.bean.ResourceListItem=javax.el.BeanELResolver$BeanProperties@36d4423d, 
      class org.jboss.on.embedded.ui.NavigationAction_$$_javassist_seam_9=javax.el.BeanELResolver$BeanProperties@2948ceea, 
      class org.jboss.on.embedded.ui.ResourceAction_$$_javassist_seam_12=javax.el.BeanELResolver$BeanProperties@6b0879d2, 
      class org.jboss.on.embedded.ui.nav.SubCategoryTreeNode=javax.el.BeanELResolver$BeanProperties@797600e3, 
      class org.jboss.on.embedded.ui.nav.PlatformResourceTreeNode=javax.el.BeanELResolver$BeanProperties@32347561, 
      class java.lang.Class=javax.el.BeanELResolver$BeanProperties@12064d07, 
      class org.jboss.on.embedded.ui.nav.SingletonResourceTypeTreeNode=javax.el.BeanELResolver$BeanProperties@5bab0fcf, 
      class org.jboss.on.embedded.ui.nav.ResourceTreeNode=javax.el.BeanELResolver$BeanProperties@3b9b0e0d, 
      class org.jboss.on.embedded.ui.nav.NonSingletonResourceTypeTreeNode=javax.el.BeanELResolver$BeanProperties@40b7960d, 
      class org.rhq.core.domain.measurement.MeasurementDefinition=javax.el.BeanELResolver$BeanProperties@54dc50ac, 
      class org.rhq.core.domain.resource.Resource=javax.el.BeanELResolver$BeanProperties@4c3477ba, 
      class org.rhq.core.domain.measurement.MeasurementDataTrait=javax.el.BeanELResolver$BeanProperties@8a07b6c, 
      class org.jboss.seam.security.Identity=javax.el.BeanELResolver$BeanProperties@6006f3e0, 
      class org.jboss.on.embedded.bean.MeasurementDisplay=javax.el.BeanELResolver$BeanProperties@68752860}
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  soul2zimate Chao Wang
                  Reporter:
                  soul2zimate Chao Wang
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: