You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Bozhong Lin <bl...@iona.com> on 2007/06/11 09:06:39 UTC

PolicyFeatureTest failure

I have seem following test failure a few times now, but the build still 
said successful. Could someone take a look and see if this is a real issue?

Thanks,
Bo

Running org.apache.cxf.ws.policy.PolicyInterceptorsTest
Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.251 sec
Running org.apache.cxf.ws.policy.spring.PolicyFeatureTest
java.net.SocketException: Permission denied
        at sun.nio.ch.Net.bind(Native Method)
        at 
sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
        at 
org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:209)
        at 
org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:252)
        at 
org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:294)
        at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.jetty.Server.doStart(Server.java:221)
        at 
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at 
org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:170)
        at 
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:143)
        at 
org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:47)
        at 
org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:158)
        at 
org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:576)
        at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:121)
        at 
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:95)
        at 
org.apache.cxf.ws.policy.spring.PolicyFeatureTest.testServerFactoryWith2007Xml(PolicyFeatureTest.java:90)
        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.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
        at 
org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
        at 
org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
        at 
org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66)
        at 
org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
        at 
org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42)
        at 
org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
        at 
org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
        at 
org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62)
        at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138)
        at 
org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125)
        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
        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.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290)
        at 
org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818)
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 49.226 sec
Running org.apache.cxf.ws.policy.PolicyTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 3, Time elapsed: 0.012 sec
Running org.apache.cxf.ws.policy.attachment.reference.ReferenceResolverTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.078 sec
Running org.apache.cxf.ws.policy.PolicyEngineTest

Re: PolicyFeatureTest failure

Posted by Freeman Fang <fr...@iona.com>.
Get it. :-)

Thanks very much

Freeman

Willem Jiang wrote:
> Hi Freeman ,
>
> You asked a good question.
> I just have a deep look of the the code, the test call the 
> ServerFactoryBean.setStart(false) , so the server will not call 
> server.start().
> Unfortunately,  I  just  found that  CXF alwasy calls the 
> ServerFactoryBean.setStart(true) when the 
> Configuration.configureBean("***", sf) is called.
> It looks like Configuration will setup the default value of the 
> ServerFactoryBean even we call the setStart(false) first.
>
> So the ServerFactoryBean will try to start the server and listen to 
> the 80 port.
>
> I moved the sf.setStart(false) after the c.configureBean("***",sf), 
> and the PolicyFeatureTest will not start the server again. And this 
> also reduce the PolicyFeatureTest  test time from 54.123 sec to 9 
> seconds.  :P
>
>
> Cheers,
>
> Willem.
>
>
> Freeman Fang wrote:
>> Hi Williem,
>> Quick question.
>>
>> We have several test case in PolicyFeatureTest, none of them specify 
>> listening http port, but  why only testServerFactoryWith2007Xml get 
>> this exception?
>>
>> Thanks very much
>>
>> Freeman
>>
>> Willem Jiang wrote:
>>> Hi ,
>>>
>>> The java.net.SocketException: Permission denied  is coming form the 
>>> Service publish address with http://localhost/test which CXF will 
>>> call Jetty to listen to the 80 port.
>>> In Linux , you can't listen to the port number less then 1024 if you 
>>> login as normal user.
>>> In Windows, you will not get this error, because you could listen to 
>>> 80 port.
>>> I just went through the test case , the PolicyFeatureTest just 
>>> checks the configuration init the Feature rightly, it have nothing 
>>> to test about the transports.So the Error is not in the key check path.
>>>
>>> Anyway, I just added the port number in the publish address, and 
>>> also do some clean up work in the bus, the exception should not 
>>> appear again :).
>>>
>>> Cheers,
>>> Willem.
>>>
>>> James Mao wrote:
>>>> I got this on windows platform
>>>>
>>>> Running org.apache.cxf.ws.policy.spring.PolicyFeatureTest
>>>> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
>>>> 54.123 sec
>>>>
>>>> But on RHEL 3.0, i got java.net.BindException: Address already in 
>>>> use, and the test passed with successful.
>>>>
>>>> James
>>>>
>>>>> I have seem following test failure a few times now, but the build 
>>>>> still said successful. Could someone take a look and see if this 
>>>>> is a real issue?
>>>>>
>>>>> Thanks,
>>>>> Bo
>>>>>
>>>>> Running org.apache.cxf.ws.policy.PolicyInterceptorsTest
>>>>> Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
>>>>> 0.251 sec
>>>>> Running org.apache.cxf.ws.policy.spring.PolicyFeatureTest
>>>>> java.net.SocketException: Permission denied
>>>>>        at sun.nio.ch.Net.bind(Native Method)
>>>>>        at 
>>>>> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119) 
>>>>>
>>>>>        at 
>>>>> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
>>>>>        at 
>>>>> org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:209) 
>>>>>
>>>>>        at 
>>>>> org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:252) 
>>>>>
>>>>>        at 
>>>>> org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:294) 
>>>>>
>>>>>        at 
>>>>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) 
>>>>>
>>>>>        at org.mortbay.jetty.Server.doStart(Server.java:221)
>>>>>        at 
>>>>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) 
>>>>>
>>>>>        at 
>>>>> org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:170) 
>>>>>
>>>>>        at 
>>>>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:143) 
>>>>>
>>>>>        at 
>>>>> org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:47) 
>>>>>
>>>>>        at 
>>>>> org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:158) 
>>>>>
>>>>>        at 
>>>>> org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:576) 
>>>>>
>>>>>        at 
>>>>> org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:121)
>>>>>        at 
>>>>> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:95) 
>>>>>
>>>>>        at 
>>>>> org.apache.cxf.ws.policy.spring.PolicyFeatureTest.testServerFactoryWith2007Xml(PolicyFeatureTest.java:90) 
>>>>>
>>>>>        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.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99) 
>>>>>
>>>>>        at 
>>>>> org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81) 
>>>>>
>>>>>        at 
>>>>> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) 
>>>>>
>>>>>        at 
>>>>> org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75) 
>>>>>
>>>>>        at 
>>>>> org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45) 
>>>>>
>>>>>        at 
>>>>> org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66) 
>>>>>
>>>>>        at 
>>>>> org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35) 
>>>>>
>>>>>        at 
>>>>> org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42) 
>>>>>
>>>>>        at 
>>>>> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) 
>>>>>
>>>>>        at 
>>>>> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52) 
>>>>>
>>>>>        at 
>>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) 
>>>>>
>>>>>        at 
>>>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138) 
>>>>>
>>>>>        at 
>>>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125) 
>>>>>
>>>>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
>>>>>        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.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290) 
>>>>>
>>>>>        at 
>>>>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818) 
>>>>>
>>>>> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
>>>>> 49.226 sec
>>>>> Running org.apache.cxf.ws.policy.PolicyTest
>>>>> Tests run: 4, Failures: 0, Errors: 0, Skipped: 3, Time elapsed: 
>>>>> 0.012 sec
>>>>> Running 
>>>>> org.apache.cxf.ws.policy.attachment.reference.ReferenceResolverTest
>>>>> Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
>>>>> 0.078 sec
>>>>> Running org.apache.cxf.ws.policy.PolicyEngineTest
>>>>>
>>>>
>>>>
>>>
>>
>>
>
>

Re: PolicyFeatureTest failure

Posted by Willem Jiang <ni...@iona.com>.
Hi Freeman ,

You asked a good question.
I just have a deep look of the the code, the test call the 
ServerFactoryBean.setStart(false) , so the server will not call 
server.start().
Unfortunately,  I  just  found that  CXF alwasy calls the 
ServerFactoryBean.setStart(true) when the 
Configuration.configureBean("***", sf) is called.
It looks like Configuration will setup the default value of the 
ServerFactoryBean even we call the setStart(false) first.

So the ServerFactoryBean will try to start the server and listen to the 
80 port.

I moved the sf.setStart(false) after the c.configureBean("***",sf), and 
the PolicyFeatureTest will not start the server again. 
And this also reduce the PolicyFeatureTest  test time from 54.123 sec to 
9 seconds.  :P


Cheers,

Willem.


Freeman Fang wrote:
> Hi Williem,
> Quick question.
>
> We have several test case in PolicyFeatureTest, none of them specify 
> listening http port, but  why only testServerFactoryWith2007Xml get 
> this exception?
>
> Thanks very much
>
> Freeman
>
> Willem Jiang wrote:
>> Hi ,
>>
>> The java.net.SocketException: Permission denied  is coming form the 
>> Service publish address with http://localhost/test which CXF will 
>> call Jetty to listen to the 80 port.
>> In Linux , you can't listen to the port number less then 1024 if you 
>> login as normal user.
>> In Windows, you will not get this error, because you could listen to 
>> 80 port.
>> I just went through the test case , the PolicyFeatureTest just checks 
>> the configuration init the Feature rightly, it have nothing to test 
>> about the transports.So the Error is not in the key check path.
>>
>> Anyway, I just added the port number in the publish address, and also 
>> do some clean up work in the bus, the exception should not appear 
>> again :).
>>
>> Cheers,
>> Willem.
>>
>> James Mao wrote:
>>> I got this on windows platform
>>>
>>> Running org.apache.cxf.ws.policy.spring.PolicyFeatureTest
>>> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
>>> 54.123 sec
>>>
>>> But on RHEL 3.0, i got java.net.BindException: Address already in 
>>> use, and the test passed with successful.
>>>
>>> James
>>>
>>>> I have seem following test failure a few times now, but the build 
>>>> still said successful. Could someone take a look and see if this is 
>>>> a real issue?
>>>>
>>>> Thanks,
>>>> Bo
>>>>
>>>> Running org.apache.cxf.ws.policy.PolicyInterceptorsTest
>>>> Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
>>>> 0.251 sec
>>>> Running org.apache.cxf.ws.policy.spring.PolicyFeatureTest
>>>> java.net.SocketException: Permission denied
>>>>        at sun.nio.ch.Net.bind(Native Method)
>>>>        at 
>>>> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119) 
>>>>
>>>>        at 
>>>> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
>>>>        at 
>>>> org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:209) 
>>>>
>>>>        at 
>>>> org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:252) 
>>>>
>>>>        at 
>>>> org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:294) 
>>>>
>>>>        at 
>>>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) 
>>>>
>>>>        at org.mortbay.jetty.Server.doStart(Server.java:221)
>>>>        at 
>>>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) 
>>>>
>>>>        at 
>>>> org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:170) 
>>>>
>>>>        at 
>>>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:143) 
>>>>
>>>>        at 
>>>> org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:47) 
>>>>
>>>>        at 
>>>> org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:158) 
>>>>
>>>>        at 
>>>> org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:576) 
>>>>
>>>>        at 
>>>> org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:121)
>>>>        at 
>>>> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:95) 
>>>>
>>>>        at 
>>>> org.apache.cxf.ws.policy.spring.PolicyFeatureTest.testServerFactoryWith2007Xml(PolicyFeatureTest.java:90) 
>>>>
>>>>        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.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99) 
>>>>
>>>>        at 
>>>> org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81) 
>>>>
>>>>        at 
>>>> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) 
>>>>
>>>>        at 
>>>> org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75) 
>>>>
>>>>        at 
>>>> org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45) 
>>>>
>>>>        at 
>>>> org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66) 
>>>>
>>>>        at 
>>>> org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35) 
>>>>
>>>>        at 
>>>> org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42) 
>>>>
>>>>        at 
>>>> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) 
>>>>
>>>>        at 
>>>> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52) 
>>>>
>>>>        at 
>>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) 
>>>>
>>>>        at 
>>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138) 
>>>>
>>>>        at 
>>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125) 
>>>>
>>>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
>>>>        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.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290) 
>>>>
>>>>        at 
>>>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818) 
>>>>
>>>> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
>>>> 49.226 sec
>>>> Running org.apache.cxf.ws.policy.PolicyTest
>>>> Tests run: 4, Failures: 0, Errors: 0, Skipped: 3, Time elapsed: 
>>>> 0.012 sec
>>>> Running 
>>>> org.apache.cxf.ws.policy.attachment.reference.ReferenceResolverTest
>>>> Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
>>>> 0.078 sec
>>>> Running org.apache.cxf.ws.policy.PolicyEngineTest
>>>>
>>>
>>>
>>
>
>



Re: PolicyFeatureTest failure

Posted by Freeman Fang <fr...@iona.com>.
Hi Williem,
Quick question.

We have several test case in PolicyFeatureTest, none of them specify 
listening http port, but  why only testServerFactoryWith2007Xml get this 
exception?

Thanks very much

Freeman

Willem Jiang wrote:
> Hi ,
>
> The java.net.SocketException: Permission denied  is coming form the 
> Service publish address with http://localhost/test which CXF will call 
> Jetty to listen to the 80 port.
> In Linux , you can't listen to the port number less then 1024 if you 
> login as normal user.
> In Windows, you will not get this error, because you could listen to 
> 80 port.
> I just went through the test case , the PolicyFeatureTest just checks 
> the configuration init the Feature rightly, it have nothing to test 
> about the transports.So the Error is not in the key check path.
>
> Anyway, I just added the port number in the publish address, and also 
> do some clean up work in the bus, the exception should not appear 
> again :).
>
> Cheers,
> Willem.
>
> James Mao wrote:
>> I got this on windows platform
>>
>> Running org.apache.cxf.ws.policy.spring.PolicyFeatureTest
>> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
>> 54.123 sec
>>
>> But on RHEL 3.0, i got java.net.BindException: Address already in 
>> use, and the test passed with successful.
>>
>> James
>>
>>> I have seem following test failure a few times now, but the build 
>>> still said successful. Could someone take a look and see if this is 
>>> a real issue?
>>>
>>> Thanks,
>>> Bo
>>>
>>> Running org.apache.cxf.ws.policy.PolicyInterceptorsTest
>>> Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
>>> 0.251 sec
>>> Running org.apache.cxf.ws.policy.spring.PolicyFeatureTest
>>> java.net.SocketException: Permission denied
>>>        at sun.nio.ch.Net.bind(Native Method)
>>>        at 
>>> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119) 
>>>
>>>        at 
>>> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
>>>        at 
>>> org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:209) 
>>>
>>>        at 
>>> org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:252)
>>>        at 
>>> org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:294) 
>>>
>>>        at 
>>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) 
>>>
>>>        at org.mortbay.jetty.Server.doStart(Server.java:221)
>>>        at 
>>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) 
>>>
>>>        at 
>>> org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:170) 
>>>
>>>        at 
>>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:143) 
>>>
>>>        at 
>>> org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:47) 
>>>
>>>        at 
>>> org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:158) 
>>>
>>>        at 
>>> org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:576) 
>>>
>>>        at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:121)
>>>        at 
>>> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:95) 
>>>
>>>        at 
>>> org.apache.cxf.ws.policy.spring.PolicyFeatureTest.testServerFactoryWith2007Xml(PolicyFeatureTest.java:90) 
>>>
>>>        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.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99) 
>>>
>>>        at 
>>> org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81) 
>>>
>>>        at 
>>> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) 
>>>
>>>        at 
>>> org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75) 
>>>
>>>        at 
>>> org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45) 
>>>
>>>        at 
>>> org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66) 
>>>
>>>        at 
>>> org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35) 
>>>
>>>        at 
>>> org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42) 
>>>
>>>        at 
>>> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) 
>>>
>>>        at 
>>> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
>>>        at 
>>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) 
>>>
>>>        at 
>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138) 
>>>
>>>        at 
>>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125) 
>>>
>>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
>>>        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.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290) 
>>>
>>>        at 
>>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818) 
>>>
>>> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
>>> 49.226 sec
>>> Running org.apache.cxf.ws.policy.PolicyTest
>>> Tests run: 4, Failures: 0, Errors: 0, Skipped: 3, Time elapsed: 
>>> 0.012 sec
>>> Running 
>>> org.apache.cxf.ws.policy.attachment.reference.ReferenceResolverTest
>>> Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
>>> 0.078 sec
>>> Running org.apache.cxf.ws.policy.PolicyEngineTest
>>>
>>
>>
>

Re: PolicyFeatureTest failure

Posted by Willem Jiang <ni...@iona.com>.
Hi ,

The java.net.SocketException: Permission denied  is coming form the 
Service publish address with http://localhost/test which CXF will call 
Jetty to listen to the 80 port.
In Linux , you can't listen to the port number less then 1024 if you 
login as normal user.
In Windows, you will not get this error, because you could listen to 80 
port.
I just went through the test case , the PolicyFeatureTest just checks 
the configuration init the Feature rightly, it have nothing to test 
about the transports.So the Error is not in the key check path.

Anyway, I just added the port number in the publish address, and also do 
some clean up work in the bus, the exception should not appear again :).

Cheers,
Willem.

James Mao wrote:
> I got this on windows platform
>
> Running org.apache.cxf.ws.policy.spring.PolicyFeatureTest
> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 54.123 
> sec
>
> But on RHEL 3.0, i got java.net.BindException: Address already in use, 
> and the test passed with successful.
>
> James
>
>> I have seem following test failure a few times now, but the build 
>> still said successful. Could someone take a look and see if this is a 
>> real issue?
>>
>> Thanks,
>> Bo
>>
>> Running org.apache.cxf.ws.policy.PolicyInterceptorsTest
>> Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.251 
>> sec
>> Running org.apache.cxf.ws.policy.spring.PolicyFeatureTest
>> java.net.SocketException: Permission denied
>>        at sun.nio.ch.Net.bind(Native Method)
>>        at 
>> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119) 
>>
>>        at 
>> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
>>        at 
>> org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:209) 
>>
>>        at 
>> org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:252)
>>        at 
>> org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:294) 
>>
>>        at 
>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
>>        at org.mortbay.jetty.Server.doStart(Server.java:221)
>>        at 
>> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
>>        at 
>> org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:170) 
>>
>>        at 
>> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:143) 
>>
>>        at 
>> org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:47) 
>>
>>        at 
>> org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:158) 
>>
>>        at 
>> org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:576) 
>>
>>        at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:121)
>>        at 
>> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:95) 
>>
>>        at 
>> org.apache.cxf.ws.policy.spring.PolicyFeatureTest.testServerFactoryWith2007Xml(PolicyFeatureTest.java:90) 
>>
>>        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.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99) 
>>
>>        at 
>> org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81) 
>>
>>        at 
>> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) 
>>
>>        at 
>> org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75) 
>>
>>        at 
>> org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45) 
>>
>>        at 
>> org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66) 
>>
>>        at 
>> org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35) 
>>
>>        at 
>> org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42) 
>>
>>        at 
>> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) 
>>
>>        at 
>> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
>>        at 
>> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) 
>>
>>        at 
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138) 
>>
>>        at 
>> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125) 
>>
>>        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
>>        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.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290) 
>>
>>        at 
>> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818) 
>>
>> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 
>> 49.226 sec
>> Running org.apache.cxf.ws.policy.PolicyTest
>> Tests run: 4, Failures: 0, Errors: 0, Skipped: 3, Time elapsed: 0.012 
>> sec
>> Running 
>> org.apache.cxf.ws.policy.attachment.reference.ReferenceResolverTest
>> Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.078 
>> sec
>> Running org.apache.cxf.ws.policy.PolicyEngineTest
>>
>
>


Re: PolicyFeatureTest failure

Posted by James Mao <ja...@iona.com>.
I got this on windows platform

Running org.apache.cxf.ws.policy.spring.PolicyFeatureTest
Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 54.123 sec

But on RHEL 3.0, i got java.net.BindException: Address already in use, 
and the test passed with successful.

James

> I have seem following test failure a few times now, but the build 
> still said successful. Could someone take a look and see if this is a 
> real issue?
>
> Thanks,
> Bo
>
> Running org.apache.cxf.ws.policy.PolicyInterceptorsTest
> Tests run: 8, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.251 sec
> Running org.apache.cxf.ws.policy.spring.PolicyFeatureTest
> java.net.SocketException: Permission denied
>        at sun.nio.ch.Net.bind(Native Method)
>        at 
> sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:119)
>        at 
> sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:59)
>        at 
> org.mortbay.jetty.nio.SelectChannelConnector.open(SelectChannelConnector.java:209) 
>
>        at 
> org.mortbay.jetty.AbstractConnector.doStart(AbstractConnector.java:252)
>        at 
> org.mortbay.jetty.nio.SelectChannelConnector.doStart(SelectChannelConnector.java:294) 
>
>        at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
>        at org.mortbay.jetty.Server.doStart(Server.java:221)
>        at 
> org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
>        at 
> org.apache.cxf.transport.http_jetty.JettyHTTPServerEngine.addServant(JettyHTTPServerEngine.java:170) 
>
>        at 
> org.apache.cxf.transport.http_jetty.JettyHTTPDestination.activate(JettyHTTPDestination.java:143) 
>
>        at 
> org.apache.cxf.transport.AbstractObservable.setMessageObserver(AbstractObservable.java:47) 
>
>        at 
> org.apache.cxf.binding.AbstractBindingFactory.addListener(AbstractBindingFactory.java:158) 
>
>        at 
> org.apache.cxf.binding.soap.SoapBindingFactory.addListener(SoapBindingFactory.java:576) 
>
>        at org.apache.cxf.endpoint.ServerImpl.start(ServerImpl.java:121)
>        at 
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:95) 
>
>        at 
> org.apache.cxf.ws.policy.spring.PolicyFeatureTest.testServerFactoryWith2007Xml(PolicyFeatureTest.java:90) 
>
>        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.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99) 
>
>        at 
> org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81) 
>
>        at 
> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) 
>
>        at 
> org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75) 
>
>        at 
> org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
>        at 
> org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:66) 
>
>        at 
> org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35) 
>
>        at 
> org.junit.internal.runners.TestClassRunner$1.runUnprotected(TestClassRunner.java:42) 
>
>        at 
> org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34) 
>
>        at 
> org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
>        at 
> org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) 
>
>        at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:138) 
>
>        at 
> org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:125) 
>
>        at org.apache.maven.surefire.Surefire.run(Surefire.java:132)
>        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.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:290) 
>
>        at 
> org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:818) 
>
> Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 49.226 
> sec
> Running org.apache.cxf.ws.policy.PolicyTest
> Tests run: 4, Failures: 0, Errors: 0, Skipped: 3, Time elapsed: 0.012 sec
> Running 
> org.apache.cxf.ws.policy.attachment.reference.ReferenceResolverTest
> Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.078 sec
> Running org.apache.cxf.ws.policy.PolicyEngineTest
>