You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Danielius Jurna (JIRA)" <ji...@apache.org> on 2012/10/16 08:03:03 UTC

[jira] [Comment Edited] (CXF-4529) PermGen Leak for CXFAuthenticator (WS Client Configuration)

    [ https://issues.apache.org/jira/browse/CXF-4529?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13476776#comment-13476776 ] 

Danielius Jurna edited comment on CXF-4529 at 10/16/12 6:02 AM:
----------------------------------------------------------------

This is defenitely a classloader leak. CXFAuthenticator is loaded by webapp classloader and reference of this object is set to java system class, which is loaded by system classloader. So when application is unloaded, webapp classloader cannot be garbage collected, because CXFAuthenticator is referenced from java.net.Authenticator. This creates PermGen leak.
This issue must be reopened.
                
      was (Author: jurna):
    This is defenitely a classloader leak. CXFAuthenticator is loaded by webapp classloader and reference of this object is set to java system class, which is loaded by system classloader. So when application is unloaded, webapp classloadee cannot be garbage collected, because CXFAuthenticator is referenced from java.net.Authenticator. This creates PermGen leak.
This issue must be reopened.
                  
> PermGen Leak for CXFAuthenticator (WS Client Configuration)
> -----------------------------------------------------------
>
>                 Key: CXF-4529
>                 URL: https://issues.apache.org/jira/browse/CXF-4529
>             Project: CXF
>          Issue Type: Bug
>          Components: Configuration, JAX-WS Runtime
>    Affects Versions: 2.6.1
>         Environment: Apache Tomcat 7, Windows 7 32bit
>            Reporter: Holger Sunke
>            Assignee: Freeman Fang
>              Labels: leak, permgen
>
> Hello,
> seemes to me there is a memory leak with the CXFAuthenticator. There is a static reference to it in java.net.Authenticator.theAuthenticator .
> This prevents the GC from collecting the WebappClassLoader on hot undeployment.
> I helped myself by doing 
> java.net.Authenticator.setDefault(null);
> on contextDestroy().
> Our web application uses CXF as a jasWS client configured with Spring 3.0.5.

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