You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Neeraj Vashisht (JIRA)" <ji...@apache.org> on 2015/06/03 18:08:39 UTC

[jira] [Commented] (CXF-4795) Memory leaks in CXF with spring while using WebClient APIs

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

Neeraj Vashisht commented on CXF-4795:
--------------------------------------

I am also getting similar kind of issue. Its expecting url as bean and when its not found, it throws NoSuchBeanException. I am using cxf 2.4.8 and getting "No bean named '{http://www.springframework.org/schema/beans}MessageCenterService' found in org.springframework.beans.factory.support.DefaultListableBeanFactory@1045897b". I tried using 2.5.10, but of no help. Please help me in understanding the issues and how can I avoid these url to be searched as "bean". 

> Memory leaks in CXF with spring while using WebClient APIs
> ----------------------------------------------------------
>
>                 Key: CXF-4795
>                 URL: https://issues.apache.org/jira/browse/CXF-4795
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.4.2
>            Reporter: Ajit Amitav Das
>            Assignee: Daniel Kulp
>            Priority: Critical
>             Fix For: 2.7.4, 2.6.7, 2.5.10
>
>
> Problem - We are facing a very weird memory issue while using spring (3.0.5.RELEASE) with Apache-CXF(2.4.2). We are trying to make a REST(GET) call using Apache CXF WebClient.get().Each outbound call URL is getting configured as a bean in the Spring Container. 
> Description - 
> 1.Placeholder in Spring where the URL is getting configured as a Bean 
> Class Name - AbstractBeanFactory 
> private final Set<String> alreadyCreated = Collections.synchronizedSet(new HashSet<String>()); 
> 2.Reason 
> During the WebClient.get call CXF prepares conduit to channel the message to destination. Since it is a HTTP call HTTPTransportFactory is used to create HTTP Conduit for the endpoint. 
> This is done by HTTPTransportFactory.getConduit method. 
> HTTPTransportFactory.getConduit invokes HTTPTransportFactory.configure(Object bean, String name, String extraName) 
>   
> protected void configure(Object bean, String name, String extraName) { 
>         Configurer configurer = bus.getExtension(Configurer.class); 
>         if (null != configurer) { 
>             configurer.configureBean(name, bean); 
>             if (extraName != null) { 
>                 configurer.configureBean(extraName, bean); 
>             } 
>         } 
>     } 
> name parameter value is - {http://<ip>:<port>/<application-context>/user/96BEEBE3119B4B809F35CFFAF5EA9803/detail}WebClient.http-conduit 
> extraName parameter value is - http://<ip>:<port>/<application-context>/user/96BEEBE3119B4B809F35CFFAF5EA9803/detail
> Since CXF by default uses SpringBus,the configurer class returned for bus.getExtension(Configurer.class) call is org.apache.cxf.configuration.spring.ConfigurerImpl . 
> This class ends up configuring both the above mentioned URL as bean in Spring. 
> This bean names are keep on adding to a Set instance alreadyCreated which never get garbage collected, and keep increasing the memory footprint and finally causing OutOfMemory issue. 
> My application is growing with huge memory foot print as the number of outbound calls increases, we are forced to bounce back the server in frequent intervals
> Already put this @http://cxf.547215.n5.nabble.com/memory-leaks-in-CXF-with-spring-while-using-WebClient-APIs-td5721974.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)