[ 
http://jira.codehaus.org/browse/MNG-4273?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benjamin Bentmann closed MNG-4273.
----------------------------------

         Assignee: Benjamin Bentmann
       Resolution: Fixed
    Fix Version/s: 3.0-alpha-3

Fixed in [r802041|http://svn.apache.org/viewvc?view=rev&revision=802041] with 
the help of a new classworlds version that allows to selectively import classes 
from the parent/core realm.

> [regression] Internal utility classes of core leak into plugin realm
> --------------------------------------------------------------------
>
>                 Key: MNG-4273
>                 URL: http://jira.codehaus.org/browse/MNG-4273
>             Project: Maven 2
>          Issue Type: Bug
>          Components: Class Loading, Plugins and Lifecycle
>    Affects Versions: 3.0-alpha-2
>            Reporter: Benjamin Bentmann
>            Assignee: Benjamin Bentmann
>             Fix For: 3.0-alpha-3
>
>
> The current class loader hierarchy of 3.x looks like:
> - {{plexus.core}} as root realm with the contents of {{lib/*.jar}}
> - {{plugin: g:a:v}} as child of {{plexus.core}}
> This basically makes {{lib/*.jar}} completely available to the plugin realm, 
> including classes that we don't want/need to share with plugins because they 
> assist the implementation of the core but not the interop between core and 
> plugin.
> The current design gives rise to errors like the linkage error reported in 
> [MNGECLIPSE-1487|https://issues.sonatype.org/browse/MNGECLIPSE-1487]:
> - a plugin creates a custom URL class loader (with parent delegation) that 
> contains project dependencies, among others xercesImpl, on top of its plugin 
> realm
> - the plugin sets the new class loader as TCCL and invokes a tool that wants 
> to employ a SAX parser
> - the parser factory of the JRE will search the TCCL for a suitable SAX 
> parser and will discover xercesImpl in the TCCL
> - loading of the xerces parser triggers loading of {{XML11Configuration}} 
> from the TCCL which inherits from {{ParserConfigurationSettings}}
> - due to parent delegation, the {{ParserConfigurationSettings}} will however 
> be loaded from {{plexus.core}} which holds xercesMinimal
> - xercesMinimal provides an incompatbile version of 
> {{ParserConfigurationSettings}}, which finally crashes the plugin with a 
> linkage error

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to