cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sergey Beryozkin <sberyoz...@gmail.com>
Subject Re: local transport -- confused -- anyone seen anything like it?
Date Fri, 04 Sep 2015 13:22:18 GMT
Perhaps a client has to be closed between tests when running local 
transport tests ? Or may be the tests are run in parallel with a single 
client shared ? If yes then make sure WebClient is created with a 
threadSafe flag - one of create methods takes it or you can set it on 
JAXRSClientFactoryBean when before creating a client

Sergey
On 04/09/15 14:12, Benson Margulies wrote:
> I tried the experiment of switching to HTTP, and received:
>
> javax.ws.rs.ProcessingException: java.net.SocketException:
> SocketException invoking http://localhost:62475/raas/entitiesfoo/bar:
> Invalid argument
> at org.apache.cxf.jaxrs.client.AbstractClient.checkClientException(AbstractClient.java:569)
> at org.apache.cxf.jaxrs.client.AbstractClient.preProcessResult(AbstractClient.java:551)
> at org.apache.cxf.jaxrs.client.WebClient.doResponse(WebClient.java:1142)
> at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1092)
> at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:894)
> at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:865)
> at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:428)
> at org.apache.cxf.jaxrs.client.WebClient.post(WebClient.java:458)
> at com.basistech.ws.frontend.service.RaasRsServiceTestCommon.testWebAppExceptionWrapping(RaasRsServiceTestCommon.java:126)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
> Caused by: java.net.SocketException: SocketException invoking
> http://localhost:62475/raas/entitiesfoo/bar: Invalid argument
> at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> at java.lang.reflect.Constructor.newInstance(Constructor.java:408)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1359)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1343)
> at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:652)
> 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.jaxrs.client.AbstractClient.doRunInterceptorChain(AbstractClient.java:636)
> at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1091)
> ... 10 more
> Caused by: java.net.SocketException: Invalid argument
> at java.net.SocketInputStream.socketRead0(Native Method)
> at java.net.SocketInputStream.read(SocketInputStream.java:150)
> at java.net.SocketInputStream.read(SocketInputStream.java:121)
> at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
> at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
> at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
> at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480)
> at org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.getResponseCode(URLConnectionHTTPConduit.java:276)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1559)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1532)
> at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1330)
> ... 16 more
>
> Followed by:
>
> java(20387,0x10d7c1000) malloc: *** error for object 0x100000002:
> pointer being freed was not allocated
> *** set a breakpoint in malloc_error_break to debug
>
> I've got no JNI.
>
>
>
> On Fri, Sep 4, 2015 at 8:26 AM, Benson Margulies <benson@basistech.com> wrote:
>> I've got a family of tests that have just developed a pathology.
>>
>> @Before creates a service on the local transport and a WebClient set
>> to talk to it.
>>
>> @After shuts it down.
>>
>> I can run any single test as many times as I like, all is well.
>>
>> If I use IntelliJ or maven-surefire to run the whole bag, a few will
>> fail with symptoms indicating that the wrong request ended up at the
>> service; one from a prior or different test case.
>>
>> The failure moves around from test to test from run to run.
>>
>> I've seen this with 3.1.1 and 3.1.2.
>>
>> We do have DIRECT_DISPATCH turned on.
>>
>> This whole thing was working in the middle of yesterday, and I seem to
>> have, well, breathed on it. I certainly changed the timing by
>> eliminating a lot of noisy logged backtraces.


-- 
Sergey Beryozkin

Talend Community Coders
http://coders.talend.com/

Mime
View raw message