[jboss-jira] [JBoss JIRA] Closed: (JBCL-17) New ClassLoader not finding generated classes in the bootstrap classloader

Adrian Brock (JIRA) jira-events at lists.jboss.org
Wed Jul 2 05:44:31 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBCL-17?page=all ]

Adrian Brock closed JBCL-17.
----------------------------

    Resolution: Done

The logic has been changed to use loadClass() by default on parent loaders 
if they are not ClassLoaderDomains.

The referred to optimization can be reinstated by doing setUseLoadClassForParent(false)
on the ClassLoaderDomain.

> New ClassLoader not finding generated classes in the bootstrap classloader
> --------------------------------------------------------------------------
>
>                 Key: JBCL-17
>                 URL: http://jira.jboss.com/jira/browse/JBCL-17
>             Project: JBoss ClassLoader
>          Issue Type: Bug
>          Components: ClassLoader
>    Affects Versions: JBossCL.2.0.0.Beta12
>            Reporter: Adrian Brock
>         Assigned To: Adrian Brock
>             Fix For: JBossCL.2.0.0.CR1
>
>         Attachments: jboss-classloader.jar
>
>
> An optimisation in the new classloader is causing a backwards compatibility problem.
> When we load classes from the parent (bootstrap) classloader,
> we first check to see whether we can getResource() on the class file.
> This avoids excessive locking when many threads are trying to loadClass() on that classloader.
> However, if the class is a runtime generated class against that classloader getResource()
> will return null, leading to a ClassNotFoundException.
> While we've always done this optimization for JBoss ClassLoaders, it looks like we can't to do
> this non-jboss classloaders and maintain backwards compatibility.

-- 
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