NPE when using bootstrap or system class loader
-----------------------------------------------

         Key: JGRP-34
         URL: http://jira.jboss.com/jira/browse/JGRP-34
     Project: JGroups
        Type: Bug
 Environment: Sybase Application Server 4
    Reporter: Kristoffer Olson
 Assigned to: Bela Ban 


NPE when using bootstrap or system class loader
Some classes assumes that classes are not loaded from
bootstrap or system class loader, e.g.
org.jgroups.conf.ClassConfigurator (line 43):

getClass().getClassLoader().loadClass("javax.xml.parsers.DocumentBuilderFactory");

getClass().getClassLoader() can return null if the
class is loaded using system class loader or bootstrap
class
loader(http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Class.html#getClassLoader()).

Searching for .getClassLoader() in the source code for
2.2.7 produced the following results:

org\jgroups\blocks\MethodCall.java(298):
parameter=Class.forName(name, false, cl.getClassLoader());

org\jgroups\conf\ClassConfigurator.java(43):
getClass().getClassLoader().loadClass("javax.xml.parsers.DocumentBuilderFactory");

org\jgroups\conf\ClassConfigurator.java(117): return
ClassConfigurator.class.getClassLoader().loadClass(clazzname);

org\jgroups\conf\ClassMap.java(50): return
getClass().getClassLoader().loadClass(getClassName());

org\jgroups\conf\ClassPathEntityResolver.java(50):
InputStream stream =
getClass().getClassLoader().getResourceAsStream(url);

org\jgroups\conf\MagicNumberReader.java(43):
InputStream
stream=getClass().getClassLoader().getResourceAsStream(mMagicNumberFile);

org\jgroups\stack\Configurator.java(575):
loader=this.getClass().getClassLoader();

org\jgroups\stack\Configurator.java(585):
loader=this.getClass().getClassLoader();

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.jboss.com/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to