[JBoss JIRA] (JBWS-4146) Intermittent NPE in jbossws-cxf-client unit tests with IBM JDK
by Jim Ma (Jira)
[ https://issues.redhat.com/browse/JBWS-4146?page=com.atlassian.jira.plugin... ]
Jim Ma updated JBWS-4146:
-------------------------
Fix Version/s: jbossws-cxf-5.4.1.Final
(was: jbossws-cxf-5.4.0.Final)
> Intermittent NPE in jbossws-cxf-client unit tests with IBM JDK
> --------------------------------------------------------------
>
> Key: JBWS-4146
> URL: https://issues.redhat.com/browse/JBWS-4146
> Project: JBoss Web Services
> Issue Type: Bug
> Components: jbossws-cxf
> Affects Versions: jbossws-cxf-5.2.3.Final
> Environment: IBM JDK
> Reporter: Jan Blizňák
> Priority: Major
> Fix For: jbossws-cxf-5.4.1.Final
>
>
> An intermittent NPE is thrown during building project on IBM JDK, might be specific issue with different JDK vendor but might be also revealing the bug in client code.
> When the situation occurs the exception is thrown in arbitrary call of org.apache.cxf.endpoint.Client#getEndpoint
> {code:java}
> ERROR!
> 15:43:15 java.lang.NullPointerException
> 15:43:15 at org.jboss.wsf.stack.cxf.client.configuration.CXFClientConfigurerTest.testAddInterceptorsThroughSetConfigProperties(CXFClientConfigurerTest.java:524)
> {code}
> Reproducibility ~ <5%
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 10 months
[JBoss JIRA] (JBWS-4088) Remove org.apache.cxf.staxutils.W3CDOMStreamWriter from context to prevent memory leak in CXF
by Jim Ma (Jira)
[ https://issues.redhat.com/browse/JBWS-4088?page=com.atlassian.jira.plugin... ]
Jim Ma updated JBWS-4088:
-------------------------
Fix Version/s: jbossws-cxf-5.4.1.Final
> Remove org.apache.cxf.staxutils.W3CDOMStreamWriter from context to prevent memory leak in CXF
> ---------------------------------------------------------------------------------------------
>
> Key: JBWS-4088
> URL: https://issues.redhat.com/browse/JBWS-4088
> Project: JBoss Web Services
> Issue Type: Enhancement
> Reporter: David Boeren
> Priority: Minor
> Fix For: jbossws-cxf-5.4.1.Final
>
>
> I think the explanation comes from the way the response context is kept within the ClientImpl. The ClientImpl has the following:
> protected Map<Thread, Map<String, Object>> responseContext = Collections.synchronizedMap(new WeakHashMap<Thread, Map<String, Object>>());
> and the getResponseContext() is implemented this way:
> public Map<String, Object> getResponseContext() {
> if (!responseContext.containsKey(Thread.currentThread())) {
> responseContext.put(Thread.currentThread(), new HashMap<String, Object>());
> }
> return responseContext.get(Thread.currentThread());
> }
> Now, in the customer case, I believe the threads that serve as keys to the weak hashmap are never GCed (perhaps because they simply come from a thread pool that reuses them) and I don't see the response context being explicitly cleaned up in cxf except when the clientimpl is destroyed (which does not happen often in customer case as the clients are pooled).
> I would suggest to try explicitly cleaning up the response message context contents.
> The customer has successfully done this using this on their client side:
> dispatcher.getResponseContext().remove("org.apache.cxf.staxutils.W3CDOMStreamWriter");
> Is it possible to have this fix added to JBossWS as an enhancement? Full details are on the case link.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 10 months
[JBoss JIRA] (JBWS-4088) Remove org.apache.cxf.staxutils.W3CDOMStreamWriter from context to prevent memory leak in CXF
by Jim Ma (Jira)
[ https://issues.redhat.com/browse/JBWS-4088?page=com.atlassian.jira.plugin... ]
Jim Ma updated JBWS-4088:
-------------------------
Fix Version/s: (was: jbossws-cxf-5.4.0.Final)
> Remove org.apache.cxf.staxutils.W3CDOMStreamWriter from context to prevent memory leak in CXF
> ---------------------------------------------------------------------------------------------
>
> Key: JBWS-4088
> URL: https://issues.redhat.com/browse/JBWS-4088
> Project: JBoss Web Services
> Issue Type: Enhancement
> Reporter: David Boeren
> Priority: Minor
> Fix For: jbossws-cxf-5.4.1.Final
>
>
> I think the explanation comes from the way the response context is kept within the ClientImpl. The ClientImpl has the following:
> protected Map<Thread, Map<String, Object>> responseContext = Collections.synchronizedMap(new WeakHashMap<Thread, Map<String, Object>>());
> and the getResponseContext() is implemented this way:
> public Map<String, Object> getResponseContext() {
> if (!responseContext.containsKey(Thread.currentThread())) {
> responseContext.put(Thread.currentThread(), new HashMap<String, Object>());
> }
> return responseContext.get(Thread.currentThread());
> }
> Now, in the customer case, I believe the threads that serve as keys to the weak hashmap are never GCed (perhaps because they simply come from a thread pool that reuses them) and I don't see the response context being explicitly cleaned up in cxf except when the clientimpl is destroyed (which does not happen often in customer case as the clients are pooled).
> I would suggest to try explicitly cleaning up the response message context contents.
> The customer has successfully done this using this on their client side:
> dispatcher.getResponseContext().remove("org.apache.cxf.staxutils.W3CDOMStreamWriter");
> Is it possible to have this fix added to JBossWS as an enhancement? Full details are on the case link.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
4 years, 10 months