cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Petr Nídl (JIRA) <j...@apache.org>
Subject [jira] [Commented] (CXF-4529) PermGen Leak for CXFAuthenticator (WS Client Configuration)
Date Fri, 16 Nov 2012 07:42:12 GMT

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

Petr Nídl commented on CXF-4529:
--------------------------------

And there is another problem related to this one. When you have two (or more) applications
deployed to application server, each of them using CXFAuthenticator, and you stop one of them,
the alive one will fail to proceed with authentication task because the still registered CXFAuthenticator
fails to load its necessary classes because is classloader is already marked as stopped. On
Tomcat this looks like this:
{code}
Nov 15, 2012 9:24:19 PM org.apache.catalina.loader.WebappClassLoader loadClass
INFO: Illegal access: this web application instance has been stopped already.  Could not load
org.apache.cxf.message.MessageImpl.  The eventual following stack trace is caused by an error
thrown for debugging purposes as well as to attempt to terminate the thread which caused the
illegal access, and has no functional impact.
java.lang.IllegalStateException

	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1597)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1556)
	at org.apache.cxf.endpoint.ClientImpl.getConduit(ClientImpl.java:835)
	at org.apache.cxf.endpoint.ClientImpl.destroy(ClientImpl.java:206)
	at org.apache.cxf.frontend.ClientProxy.finalize(ClientProxy.java:94)
	at java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
	at java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
	at java.lang.ref.Finalizer.access$100(Finalizer.java:14)
	at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
{code}
But I suppose that this problem really is unresolvable and the solution is to use Commons
HTTPClient for HTTP Conduit (CXF-291)
                
> 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

Mime
View raw message