[jboss-jira] [JBoss JIRA] Updated: (JBAS-3265) Problem with empty classname in classloader

Dimitris Andreadis (JIRA) jira-events at jboss.com
Tue Jul 25 17:21:11 EDT 2006


     [ http://jira.jboss.com/jira/browse/JBAS-3265?page=all ]

Dimitris Andreadis updated JBAS-3265:
-------------------------------------

    Fix Version/s: JBossAS-4.0.6.CR1
                       (was: JBossAS-4.0.5.CR1)

> Problem with empty classname in classloader
> -------------------------------------------
>
>                 Key: JBAS-3265
>                 URL: http://jira.jboss.com/jira/browse/JBAS-3265
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: JMX
>    Affects Versions: JBossAS-4.0.4.GA
>            Reporter: Adrian Brock
>         Assigned To: Scott M Stark
>             Fix For: JBossAS-4.0.6.CR1
>
>
> The RepositoryClassLoader doesn't handle empty classnames correctly.
> It eventually breaks when it tries to do the array name handling here:
>             // If this is an array class, use Class.forName to resolve it
>             if( name.charAt(0) == '[' )
>             {
>                result = Class.forName(name, true, this);
>                removeFromClassBlackList(name);
>                return result;
>             }
> 17:04:42,858 ERROR [STDERR] java.lang.StringIndexOutOfBoundsException: String index out of range: 0
> 17:04:42,860 ERROR [STDERR]     at java.lang.String.charAt(String.java:444)
> 17:04:42,861 ERROR [STDERR]     at org.jboss.mx.loading.RepositoryClassLoader.loadClassLocally(RepositoryClassLoader.java:169)
> 17:04:42,862 ERROR [STDERR]     at org.jboss.mx.loading.UnifiedLoaderRepository3.loadClassFromClassLoader(UnifiedLoaderRepository3.java:263)
> 17:04:42,862 ERROR [STDERR]     at org.jboss.mx.loading.LoadMgr3.beginLoadTask(LoadMgr3.java:270)
> 17:04:42,864 ERROR [STDERR]     at org.jboss.mx.loading.RepositoryClassLoader.loadClassImpl(RepositoryClassLoader.java:475)
> 17:04:42,865 ERROR [STDERR]     at org.jboss.mx.loading.RepositoryClassLoader.loadClass(RepositoryClassLoader.java:377)
> 17:04:42,865 ERROR [STDERR]     at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
> The classloader should just reject a null or empty ("") classname in loadClass()
> with a meaningful error message.
> I suspect the null is handled by the cache since the cache is a Concurrent HashMap
> which won't accept null as a key.

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list