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

ASF GitHub Bot commented on CXF-6940:
-------------------------------------

GitHub user dhpatel27 opened a pull request:

    https://github.com/apache/cxf/pull/143

    CXF-6940

    To Fix the Bug CXF-6940

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/apache/cxf master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cxf/pull/143.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #143
    
----
commit 519a67dfa240471bb585929f263cd85051a9eb06
Author: Jim Ma <e...@apache.org>
Date:   2016-03-25T05:31:31Z

    [CXF-6843]:http 406 not acceptable should be returned if query parameter 
value can't be converted

commit a05d75086453fa18ca4f4733f7cc8819693c786b
Author: Sergey Beryozkin <sberyoz...@gmail.com>
Date:   2016-03-26T12:49:21Z

    Revert "[CXF-6843]:http 406 not acceptable should be returned if query 
parameter value can't be converted"
    
    This reverts commit 519a67dfa240471bb585929f263cd85051a9eb06.

commit 19c1279dc270766474f9284e7d33a460de8f3699
Author: Sergey Beryozkin <sberyoz...@gmail.com>
Date:   2016-03-26T13:14:23Z

    [CXF-6842] Minor update to make sure the response Content-Type is set on 
the exchange

commit b34ec6ea11bda11a6072574d30df36b4c72eb581
Author: Francesco Chicchiriccò <ilgro...@apache.org>
Date:   2016-03-29T10:35:37Z

    [CXF-6845] More non-null checks

commit 1afeea8bdc0ef96df1d52ea343957dc396723f8c
Author: Colm O hEigeartaigh <cohei...@apache.org>
Date:   2016-03-29T13:35:31Z

    Updating dependencies as per 3.1

commit 84e775b1961577f6e2470dda19a03a49eabb4ac0
Author: Jim Ma <e...@apache.org>
Date:   2016-03-30T07:42:13Z

    [CXF-6850]:javax.ws.rs.core.Request implementation doesn't match 
Accept-Encoding: * for any encoding value

commit 444b61678c4b7006febca511a81415965c8fc53c
Author: Jim Ma <e...@apache.org>
Date:   2016-03-30T07:48:32Z

    Minor update to fix checkstyle

commit 30158d39a699d01f9d7344dd9cd15dd98e683bc5
Author: Jim Ma <e...@apache.org>
Date:   2016-03-30T12:57:24Z

    [CXF-6853]:Support encoded value in @ApplicationPath

commit e4de8e215d4be63cb54a591eed0e457674fd31d3
Author: Sergey Beryozkin <sberyoz...@gmail.com>
Date:   2016-03-30T14:16:09Z

    [CXF-6853] Reverting HttpUtils change, adding a test

commit d226c07d4db15fa9244a2f011df801839a880f68
Author: Akitoshi Yoshida <a...@apache.org>
Date:   2016-03-30T14:38:10Z

    forgot to sync atmosphere's version in samples

commit ebce4a65b15a1a99f18c1ea0111affafc447ce7e
Author: Akitoshi Yoshida <a...@apache.org>
Date:   2016-03-30T15:11:34Z

    use jetty9 in samples/jax_rs/websocket by default

commit 76d474cd081a72a8647c0bcddcaa27b11890f619
Author: Sergey Beryozkin <sberyoz...@gmail.com>
Date:   2016-03-30T16:14:19Z

    Pushing some of the code to AbstractOAuthProvider

commit 204926e5944a3d558e36d328621dfffe262338aa
Author: Sergey Beryozkin <sberyoz...@gmail.com>
Date:   2016-03-31T15:43:02Z

    Restoring setClients convinience methdod

commit 6e0c7ece8cce0835642599d05431240637e74e42
Author: Sergey Beryozkin <sberyoz...@gmail.com>
Date:   2016-03-31T16:50:32Z

    [CXF-6849] making sure the annotated method is preferred

commit 80cda2d0a1079329827c179e14c639e00b6687c2
Author: Sergey Beryozkin <sberyoz...@gmail.com>
Date:   2016-03-31T17:57:55Z

    [CXF-6849] Adding a test

commit 281b4e9d959035b8f86c206e92a3baee70cc9ec0
Author: Colm O hEigeartaigh <cohei...@apache.org>
Date:   2016-04-01T10:48:15Z

    Updating KEYS file

commit d25ca92d11e4b273022a54210ffd2d805c22a41e
Author: Sergey Beryozkin <sberyoz...@gmail.com>
Date:   2016-04-01T16:28:04Z

    Starting working on JPA persistence support for OAuth2 model

commit 8b3b47773d493de7dbfe4fb4db51f1ba9f3dbc8b
Author: Tadayoshi Sato <sato.tadayo...@gmail.com>
Date:   2016-04-04T07:32:52Z

    Upgrade Xalan bundle to 2.7.2_3. This closes #125.

commit 3a8661b2f3156e9889dff3986461033f3f5b0f19
Author: Francesco Chicchiriccò <ilgro...@apache.org>
Date:   2016-04-04T10:57:17Z

    [CXF-6845] Partially reverting the change in MessageUtils#isOutbound due to 
test failures

commit 0b9cb3da97cba099de8e898b65008a3d959f5b21
Author: Sergey Beryozkin <sberyoz...@gmail.com>
Date:   2016-04-04T15:57:20Z

    Coninuing experimenting with OAuth2 JPA

commit 64e7c75d2176a39abfd9de40196e7c6eb02cf127
Author: Akitoshi Yoshida <a...@apache.org>
Date:   2016-04-05T08:38:42Z

    add a blueprint version of websocket sample for karaf

commit b2c10cc6c18a6e6589d258436303c46b3f682f7e
Author: Akitoshi Yoshida <a...@apache.org>
Date:   2016-04-05T08:38:42Z

    make websocket_osgi sample also work for both karaf 4.0.x

commit 4e6c5e480bd1930f3200e7ee99daa627aa16a7a5
Author: Colm O hEigeartaigh <cohei...@apache.org>
Date:   2016-04-05T10:36:33Z

    Support DigestMethod for EncryptionMethod

commit 7e5bd4cf55f503f039d72d12313c509a814ae9c1
Author: Colm O hEigeartaigh <cohei...@apache.org>
Date:   2016-04-05T11:46:26Z

    Adding a TLS test for an expired cert

commit b2e5fb6583d64deeb8a42d2eeb6935c5f33dc0c6
Author: Akitoshi Yoshida <a...@apache.org>
Date:   2016-04-05T13:45:42Z

    add node_modules in .gitignore

commit b66bb192efca493f376f09c99f06666d8630bf1c
Author: Sergey Beryozkin <sberyoz...@gmail.com>
Date:   2016-04-05T15:50:56Z

    Experimenting with saving the access tokens

commit e9fa213b9b6a4df35daaa77a7eaaf74f639e7e13
Author: Sergey Beryozkin <sberyoz...@gmail.com>
Date:   2016-04-05T15:51:21Z

    Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/cxf

commit 698a3ca50a686eb72521f2ae5f8fe919b03be37e
Author: Colm O hEigeartaigh <cohei...@apache.org>
Date:   2016-04-05T16:11:37Z

    Add support to disable inclusive prefixes with WS-SecurityPolicy

commit 1cb545acdaf0257cad6aff1445ba3ba41ce27673
Author: Akitoshi Yoshida <a...@apache.org>
Date:   2016-04-05T16:26:00Z

    intercept SSE's close for CXF-5855

commit 435a0c7dad8c4e8c15a6bf39f469cce2047fa365
Author: Akitoshi Yoshida <a...@apache.org>
Date:   2016-04-05T21:12:51Z

    replace the old method usage with the new one

----


> Bus Reference nullified pre-maturely in ClientImpl causing Exceptions while 
> processing Responses
> ------------------------------------------------------------------------------------------------
>
>                 Key: CXF-6940
>                 URL: https://issues.apache.org/jira/browse/CXF-6940
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-WS Runtime
>    Affects Versions: 3.1.4
>         Environment: IBM JDK 1.7, Apache CXF installed as resource Adapter on 
> IBM WebSphere 8.5.5.3 on RHEL 6.0
>            Reporter: Dhawalpatel
>            Priority: Critical
>
> Hi Daniel,
> Test Scenario:
> Install CXF as Resource Adapter in J2EE Container and use below code to call 
> a JAX-WS API.
> /* Lookup Resource Adapter of JCA and get COnnection*/
> CXFConnectionFactory connectionFactory = getCXFConnectionFactory(portClass);
>    CXFConnectionSpec connectionSpec = createCXFConnectionSpec(portClass, 
> serviceName, portName, webServiceDefinition);
> /* Get the Port from JCA Connection pool*/
>   connection = connectionFactory.getConnection(connectionSpec);
>        port = connection.getService(portClass);
> /* Close the JCA Connection*/
> if(connection != null)
>  connection.close();
> /*WebService call*/
> port.getAccount();
> Description: 
> When a JCA Connection pool eviction happens due to Max Connections reached 
> state, the existing on-going outgoing JAX-WS Calls errors out with below 
> exception:
> Message received on a Client that has been closed or destroyed.
>       at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>       at 
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:86)
>       at 
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:58)
>       at java.lang.reflect.Constructor.newInstance(Constructor.java:542)
>       at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1376)
>       at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1365)
>       at 
> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:56)
>       at 
> org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:215)
>       at 
> org.apache.cxf.io.AbstractWrappedOutputStream.close(AbstractWrappedOutputStream.java:77)
>       at 
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
>       at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:651)
>       at 
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>       at 
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
>       at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:520)
>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:429)
>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:330)
>       at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:283)
>       at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
>       at 
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139)
>       at com.sun.proxy.$Proxy106.inquireWirelinePaymentPlan(Unknown Source)
>       at sun.reflect.GeneratedMethodAccessor360.invoke(Unknown Source)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:56)
>       at java.lang.reflect.Method.invoke(Method.java:620)
>       at AppAdapter.executeWebService(AppAdapter.java:702)
>       
> Caused by: 
> java.lang.IllegalStateException: Message received on a Client that has been 
> closed or destroyed.
>       at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:707)
>       at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1669)
>       at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1550)
>       at 
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1347)
>       ... 26 more
> On further investigation, it seems you changed the code in ClientImpl.java as 
> per https://issues.apache.org/jira/browse/CXF-3765 and change log
> https://fisheye6.atlassian.com/changelog/cxf?cs=e0ef66391d2e7e62e63e96214eca95e292271892
> by adding the additional cleanup code in ClientImpl.java the below lines
> bus = null;
>         conduitSelector = null;
>         outFaultObserver = null;
>         outboundChainCache = null;
>         inboundChainCache = null;
>         currentRequestContext = null;
>         requestContext.clear();
>         requestContext = null;
>         responseContext.clear();
>         responseContext = null;
>         executor = null;   
> The above lines added by you for cleanup has broken the behavior of using the 
> JCA connection for getting port and closing it immediately and then using the 
> port to call the webservice. This leads to above exception when JCA Pool 
> maxes out causing an eviction on JCA Pool by below thread stack causing the 
> ClientImpl's destroy to be called and ultimately the bus obj ref getting set 
> to null by your code and ultimately this exception.
> The behavior in CXF 2.3 was perfectly fine with no such problems. This was 
> introduced by above mentioned code fix.
> org.apache.cxf.endpoint.ClientImpl.destroy(ClientImpl.java:152)
> org.apache.cxf.jca.outbound.ManagedConnectionImpl.destroy(ManagedConnectionImpl.java:121)
> com.ibm.ejs.j2c.MCWrapper.destroy(MCWrapper.java:2086)
> com.ibm.ejs.j2c.FreePool.cleanupAndDestroyMCWrapper(FreePool.java:775)
> com.ibm.ejs.j2c.PoolManager.claimVictim(PoolManager.java:5190)
> com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:3657)
> com.ibm.ejs.j2c.PoolManager.reserve(PoolManager.java:3091)
> com.ibm.ejs.j2c.ConnectionManager.allocateMCWrapper(ConnectionManager.java:1548)
> com.ibm.ejs.j2c.ConnectionManager.allocateConnection(ConnectionManager.java:1031)
> org.apache.cxf.jca.outbound.ConnectionFactoryImpl.getConnection(ConnectionFactoryImpl.java:53)
> com.sbc.cc.clarify.api.util.cxf.XCxfConnectorWebServiceInitializer.getCxfPortImpl(XCxfConnectorWebServiceInitializer.java:217)
> Please fix this behavior since its not in the alignment to the behavior 
> mentioned in JCA Spec and as per the documentation provided in CXF as well.
> Thanks



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

Reply via email to