[jboss-jira] [JBoss JIRA] (JBWEB-293) NPE if method getClassLoader() returns null to represent the bootstrap class loader
Chao Wang (JIRA)
issues at jboss.org
Wed Mar 26 07:59:13 EDT 2014
[ https://issues.jboss.org/browse/JBWEB-293?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Chao Wang resolved JBWEB-293.
-----------------------------
Resolution: Done
> NPE if method getClassLoader() returns null to represent the bootstrap class loader
> -----------------------------------------------------------------------------------
>
> Key: JBWEB-293
> URL: https://issues.jboss.org/browse/JBWEB-293
> Project: JBoss Web
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: JBossWeb-2.1.14.GA
> Reporter: Chao Wang
> Assignee: Chao Wang
> Attachments: JBWEB-293.patch
>
>
> from the scenario in [JBPAPP-11027|https://issues.jboss.org/browse/JBPAPP-11027] , and java code in java/javax/el/BeanELResolver.java :
> {code:title=BeanELResolver.java|borderStyle=solid}
> 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();
> }
> }
> {code}
> 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
> {noformat}
> cache content:
> class org.jboss.on.embedded.bean.ResourceListItem=javax.el.BeanELResolver$BeanProperties at 36d4423d,
> class org.jboss.on.embedded.ui.NavigationAction_$$_javassist_seam_9=javax.el.BeanELResolver$BeanProperties at 2948ceea,
> class org.jboss.on.embedded.ui.ResourceAction_$$_javassist_seam_12=javax.el.BeanELResolver$BeanProperties at 6b0879d2,
> class org.jboss.on.embedded.ui.nav.SubCategoryTreeNode=javax.el.BeanELResolver$BeanProperties at 797600e3,
> class org.jboss.on.embedded.ui.nav.PlatformResourceTreeNode=javax.el.BeanELResolver$BeanProperties at 32347561,
> class java.lang.Class=javax.el.BeanELResolver$BeanProperties at 12064d07,
> class org.jboss.on.embedded.ui.nav.SingletonResourceTypeTreeNode=javax.el.BeanELResolver$BeanProperties at 5bab0fcf,
> class org.jboss.on.embedded.ui.nav.ResourceTreeNode=javax.el.BeanELResolver$BeanProperties at 3b9b0e0d,
> class org.jboss.on.embedded.ui.nav.NonSingletonResourceTypeTreeNode=javax.el.BeanELResolver$BeanProperties at 40b7960d,
> class org.rhq.core.domain.measurement.MeasurementDefinition=javax.el.BeanELResolver$BeanProperties at 54dc50ac,
> class org.rhq.core.domain.resource.Resource=javax.el.BeanELResolver$BeanProperties at 4c3477ba,
> class org.rhq.core.domain.measurement.MeasurementDataTrait=javax.el.BeanELResolver$BeanProperties at 8a07b6c,
> class org.jboss.seam.security.Identity=javax.el.BeanELResolver$BeanProperties at 6006f3e0,
> class org.jboss.on.embedded.bean.MeasurementDisplay=javax.el.BeanELResolver$BeanProperties at 68752860}
> {noformat}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list