cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrea Smyth <andrea.sm...@iona.com>
Subject Re: system test sometimes hang
Date Wed, 06 Sep 2006 12:50:33 GMT
I have removed the EndpointTest and Proxytest as they are superseded now 
by the ClientServerTest.
System tests still fail though because the ProviderClientServerTest's 
server fails to start up with:

java.lang.NullPointerException
    at 
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.setServiceClass(JaxWsServiceFactoryBean.java:144)
    at org.apache.cxf.jaxws.EndpointImpl.<init>(EndpointImpl.java:71)
    at 
org.apache.cxf.jaxws.spi.ProviderImpl.createEndpoint(ProviderImpl.java:57)
    at 
org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:66)
    at javax.xml.ws.Endpoint.publish(Endpoint.java:156)
    at 
org.apache.cxf.systest.provider.ProviderClientServerTest$Server.run(ProviderClientServerTest.java:43)
    at 
org.apache.cxf.testutil.common.AbstractTestServerBase.start(AbstractTestServerBase.java:61)
    at 
org.apache.cxf.systest.provider.ProviderClientServerTest$Server.main(ProviderClientServerTest.java:73)
server startup failed (not a log message)
Have disabled this test for now.

Andrea.

Jiang Ning wrote:

> Hi
>
> I went through the trunk system test and found out there some thing 
> missing about the bus.shutdown().
> The endpoint would no be shutdown when the bus.shutdown was called.
> When the ProxyTest run, it will attempt to connect the unshutdown 
> port. It could be the reason why the ProxyTest could be hanged.
>
> Cheers,
> Willem.
>
> Freeman Fang wrote:
>
>> Hi all,
>>
>> When I build cxf code I checked out from apache, system test 
>> sometimes hang at ProxyTest
>>
>> When it hang, the exception is
>>
>> java.net.ConnectException: Connection refused
>>        at 
>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>>        at 
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)

>>
>>        at 
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)

>>
>>        at 
>> java.lang.reflect.Constructor.newInstance(Constructor.java:494)
>>        at 
>> sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:1202) 
>>
>>        at java.security.AccessController.doPrivileged(Native Method)
>>        at 
>> sun.net.www.protocol.http.HttpURLConnection.getChainedException(HttpURLConnection.java:1196)

>>
>>        at 
>> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:885)

>>
>>        at 
>> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
>>        at 
>> org.apache.cxf.transports.http.HTTPConduit.getResponseCode(HTTPConduit.java:315)

>>
>>        at 
>> org.apache.cxf.transports.http.HTTPConduit.access$200(HTTPConduit.java:44) 
>>
>>        at 
>> org.apache.cxf.transports.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:399)

>>
>>        at 
>> org.apache.cxf.transports.http.HTTPConduit$WrappedOutputStream.doClose(HTTPConduit.java:386)

>>
>>        at 
>> org.apache.cxf.messaging.AbstractCachedOutputStream.close(AbstractCachedOutputStream.java:48)

>>
>>        at 
>> org.apache.cxf.transports.http.HTTPConduit.close(HTTPConduit.java:196)
>>        at 
>> org.apache.cxf.interceptors.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:32)

>>
>>        at 
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:112)

>>
>>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:116)
>>        at 
>> org.apache.cxf.jaxws.EndpointInvocationHandler.invoke(EndpointInvocationHandler.java:57)

>>
>>        at $Proxy30.sayHi(Unknown Source)
>>        at 
>> org.apache.cxf.jaxws.ProxyTest.testCreatePort(ProxyTest.java:31)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>>
>>        at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>>
>>        at java.lang.reflect.Method.invoke(Method.java:585)
>>        at junit.framework.TestCase.runTest(TestCase.java:154)
>>        at junit.framework.TestCase.runBare(TestCase.java:127)
>>        at junit.framework.TestResult$1.protect(TestResult.java:106)
>>        at junit.framework.TestResult.runProtected(TestResult.java:124)
>>   at junit.framework.TestResult.run(TestResult.java:109)
>>        at junit.framework.TestCase.run(TestCase.java:118)
>>        at junit.framework.TestSuite.runTest(TestSuite.java:208)
>>        at junit.framework.TestSuite.run(TestSuite.java:203)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>>
>>        at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>>
>>        at java.lang.reflect.Method.invoke(Method.java:585)
>>        at 
>> org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:242)

>>
>>        at 
>> org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBattery.java:216) 
>>
>>        at 
>> org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:215)
>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:163)
>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:87)
>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:63)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>>
>>        at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>>
>>        at java.lang.reflect.Method.invoke(Method.java:585)
>>        at 
>> org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:785)
>> Caused by: java.net.ConnectException: Connection refused
>>        at java.net.PlainSocketImpl.socketConnect(Native Method)
>>        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>>        at 
>> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>>        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>>        at java.net.Socket.connect(Socket.java:507)
>>        at sun.net.NetworkClient.doConnect(NetworkClient.java:152)
>>        at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
>>        at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
>>        at 
>> sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:676)
>>        at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:554)
>>        at 
>> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:936)

>>
>>        at 
>> sun.net.www.protocol.http.HttpURLConnection.getHeaderFields(HttpURLConnection.java:1888)

>>
>>        at 
>> org.apache.cxf.transports.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:398)

>>
>>        ... 36 more
>>
>>
>> If it pass, the expected exception should be
>>
>> java.net.ConnectException: Connection refused
>>        at java.net.PlainSocketImpl.socketConnect(Native Method)
>>        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>>        at 
>> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>>        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>>        at java.net.Socket.connect(Socket.java:507)
>>        at sun.net.NetworkClient.doConnect(NetworkClient.java:152)
>>        at sun.net.www.http.HttpClient.openServer(HttpClient.java:365)
>>        at sun.net.www.http.HttpClient.openServer(HttpClient.java:477)
>>        at sun.net.www.http.HttpClient.<init>(HttpClient.java:214)
>>        at sun.net.www.http.HttpClient.New(HttpClient.java:287)
>>        at sun.net.www.http.HttpClient.New(HttpClient.java:299)
>>        at 
>> sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:792)

>>
>>        at 
>> sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:744)

>>
>>        at 
>> sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:669) 
>>
>>        at 
>> sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:836)

>>
>>        at 
>> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:895)

>>
>>        at 
>> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
>>        at 
>> org.apache.cxf.transports.http.HTTPConduit.getResponseCode(HTTPConduit.java:315)

>>
>>        at 
>> org.apache.cxf.transports.http.HTTPConduit.access$200(HTTPConduit.java:44) 
>>
>>        at 
>> org.apache.cxf.transports.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:399)

>>
>>        at 
>> org.apache.cxf.transports.http.HTTPConduit$WrappedOutputStream.doClose(HTTPConduit.java:386)

>>
>>        at 
>> org.apache.cxf.messaging.AbstractCachedOutputStream.close(AbstractCachedOutputStream.java:48)

>>
>>        at 
>> org.apache.cxf.transports.http.HTTPConduit.close(HTTPConduit.java:196)
>>        at 
>> org.apache.cxf.interceptors.MessageSenderInterceptor.handleMessage(MessageSenderInterceptor.java:32)

>>
>>        at 
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:112)

>>
>>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:116)
>>        at 
>> org.apache.cxf.jaxws.EndpointInvocationHandler.invoke(EndpointInvocationHandler.java:57)

>>
>>        at $Proxy30.sayHi(Unknown Source)
>>   at org.apache.cxf.jaxws.ProxyTest.testCreatePort(ProxyTest.java:31)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>>
>>        at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>>
>>        at java.lang.reflect.Method.invoke(Method.java:585)
>>        at junit.framework.TestCase.runTest(TestCase.java:154)
>>        at junit.framework.TestCase.runBare(TestCase.java:127)
>>        at junit.framework.TestResult$1.protect(TestResult.java:106)
>>        at junit.framework.TestResult.runProtected(TestResult.java:124)
>>        at junit.framework.TestResult.run(TestResult.java:109)
>>        at junit.framework.TestCase.run(TestCase.java:118)
>>        at junit.framework.TestSuite.runTest(TestSuite.java:208)
>>        at junit.framework.TestSuite.run(TestSuite.java:203)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>>
>>        at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>>
>>        at java.lang.reflect.Method.invoke(Method.java:585)
>>        at 
>> org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:242)

>>
>>        at 
>> org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBattery.java:216) 
>>
>>        at 
>> org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:215)
>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:163)
>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:87)
>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:63)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>>
>>        at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>>
>>        at java.lang.reflect.Method.invoke(Method.java:585)
>>        at 
>> org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:785)
>> java.lang.RuntimeException
>>        at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:120)
>>        at 
>> org.apache.cxf.jaxws.EndpointInvocationHandler.invoke(EndpointInvocationHandler.java:57)

>>
>>        at $Proxy30.sayHi(Unknown Source)
>>        at 
>> org.apache.cxf.jaxws.ProxyTest.testCreatePort(ProxyTest.java:31)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>>
>>        at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>>
>>        at java.lang.reflect.Method.invoke(Method.java:585)
>>        at junit.framework.TestCase.runTest(TestCase.java:154)
>>        at junit.framework.TestCase.runBare(TestCase.java:127)
>>        at junit.framework.TestResult$1.protect(TestResult.java:106)
>>        at junit.framework.TestResult.runProtected(TestResult.java:124)
>>        at junit.framework.TestResult.run(TestResult.java:109)
>>        at junit.framework.TestCase.run(TestCase.java:118)
>>        at junit.framework.TestSuite.runTest(TestSuite.java:208)
>>        at junit.framework.TestSuite.run(TestSuite.java:203)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>>
>>        at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>>
>>        at java.lang.reflect.Method.invoke(Method.java:585)
>>        at 
>> org.apache.maven.surefire.battery.JUnitBattery.executeJUnit(JUnitBattery.java:242)

>>
>>        at 
>> org.apache.maven.surefire.battery.JUnitBattery.execute(JUnitBattery.java:216) 
>>
>>        at 
>> org.apache.maven.surefire.Surefire.executeBattery(Surefire.java:215)
>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:163)
>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:87)
>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:63)
>>        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>        at 
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 
>>
>>        at 
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

>>
>>        at java.lang.reflect.Method.invoke(Method.java:585)
>>        at 
>> org.apache.maven.surefire.SurefireBooter.main(SurefireBooter.java:785)
>>
>>
>> I guess the problem is caused by some previous used server listening 
>> port 9000 in other test was not reclaimed when  ProxyTest run, so I 
>> will change port ProxyTest try to connect from 9000 to 7000 as work 
>> around to fix this problem. Of course we should figure out the root 
>> cause to make sure listening port would be reclaim in time.
>>
>> Thanks very much
>>
>> Freeman
>>
>
>


Mime
View raw message