You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tuscany.apache.org by "Simon Nash (JIRA)" <de...@tuscany.apache.org> on 2008/07/24 22:35:32 UTC

[jira] Reopened: (TUSCANY-2417) Running myapp.CallbackClientTestCase fails in Continuum build due to java.net.BindException: Address already in use:8080

     [ https://issues.apache.org/jira/browse/TUSCANY-2417?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Simon Nash reopened TUSCANY-2417:
---------------------------------

      Assignee: Simon Nash  (was: Raymond Feng)

This is a sample, and as such it should reflect best practice for users to follow.

The use of an explicit URI in the <service> <callback> element is a clear violation of best practice.  Services can be called by multiple clients, and for each callback the callback destination should be provided dynamically with the call and not configured statically on the service.  Having a fully configured callback URI in the service callback binding is incorrect, and this needs to be removed.

For now I'm reserving judgment on the client side.  I believe there is value in having the callback port automatically selected.  This sample was originally intended to show how a non-SCA client could interact with SCA and receive callbacks.  As such the callback port can't be configured by the domain.  Manual configuration of the client callback port is a possible workaround, but I'd like to leave this JIRA open for further investigation of other options.


> Running myapp.CallbackClientTestCase fails in Continuum build due to java.net.BindException: Address already in use:8080
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: TUSCANY-2417
>                 URL: https://issues.apache.org/jira/browse/TUSCANY-2417
>             Project: Tuscany
>          Issue Type: Bug
>          Components: Build System, Java SCA Samples
>    Affects Versions: Java-SCA-Next
>            Reporter: Luciano Resende
>            Assignee: Simon Nash
>            Priority: Minor
>             Fix For: Java-SCA-Next
>
>
> [INFO] [jar:jar]
> [INFO] Building jar: /home/continuum/data/working-directory/277/samples/callback-ws-service/target/sample-callback-ws-service.jar
> [INFO] [install:install]
> [INFO] Installing /home/continuum/data/working-directory/277/samples/callback-ws-service/target/sample-callback-ws-service.jar to /home/continuum/.m2/repository/org/apache/tuscany/sca/sample-callback-ws-service/1.4-SNAPSHOT/sample-callback-ws-service-1.4-SNAPSHOT.jar
> [INFO] ------------------------------------------------------------------------
> [INFO] Building Apache Tuscany SCA Callback Web Service Remote Client Sample
> [INFO]    task-segment: [clean, install]
> [INFO] ------------------------------------------------------------------------
> [INFO] [clean:clean]
> [INFO] Deleting directory /home/continuum/data/working-directory/277/samples/callback-ws-client/target
> [INFO] Deleting directory /home/continuum/data/working-directory/277/samples/callback-ws-client/target/classes
> [INFO] Deleting directory /home/continuum/data/working-directory/277/samples/callback-ws-client/target/test-classes
> [INFO] Deleting directory /home/continuum/data/working-directory/277/samples/callback-ws-client/target/site
> [INFO] [resources:resources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:compile]
> [INFO] Compiling 4 source files to /home/continuum/data/working-directory/277/samples/callback-ws-client/target/classes
> [INFO] [resources:testResources]
> [INFO] Using default encoding to copy filtered resources.
> [INFO] [compiler:testCompile]
> [INFO] Compiling 1 source file to /home/continuum/data/working-directory/277/samples/callback-ws-client/target/test-classes
> [INFO] [surefire:test]
> [INFO] Surefire report directory: /home/continuum/data/working-directory/277/samples/callback-ws-client/target/surefire-reports
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running myapp.CallbackClientTestCase
> Jun 21, 2008 8:16:38 AM org.apache.tuscany.sca.node.impl.NodeImpl &lt;init&gt;
> INFO: Creating node: jar:file:../callback-ws-service/target/sample-callback-ws-service.jar!/callbackws.composite
> Jun 21, 2008 8:16:39 AM org.apache.tuscany.sca.node.impl.NodeImpl configureNode
> INFO: Loading contribution: file:/home/continuum/data/working-directory/277/samples/callback-ws-service/target/sample-callback-ws-service.jar
> Jun 21, 2008 8:16:41 AM org.apache.tuscany.sca.node.impl.NodeImpl configureNode
> INFO: Loading composite: jar:file:../callback-ws-service/target/sample-callback-ws-service.jar!/callbackws.composite
> Jun 21, 2008 8:16:41 AM org.apache.tuscany.sca.node.impl.NodeImpl start
> INFO: Starting node: jar:file:../callback-ws-service/target/sample-callback-ws-service.jar!/callbackws.composite
> Jun 21, 2008 8:16:43 AM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
> Jun 21, 2008 8:16:43 AM org.apache.catalina.startup.ContextConfig defaultWebConfig
> INFO: No default web.xml
> Jun 21, 2008 8:16:43 AM org.apache.catalina.startup.DigesterFactory register
> WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_0.xsd
> Jun 21, 2008 8:16:43 AM org.apache.catalina.startup.DigesterFactory register
> WARNING: Could not get url for /javax/servlet/jsp/resources/jsp_2_1.xsd
> Jun 21, 2008 8:16:43 AM org.apache.catalina.startup.DigesterFactory register
> WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_1.dtd
> Jun 21, 2008 8:16:43 AM org.apache.catalina.startup.DigesterFactory register
> WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_1_2.dtd
> Jun 21, 2008 8:16:43 AM org.apache.catalina.startup.DigesterFactory register
> WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_0.xsd
> Jun 21, 2008 8:16:43 AM org.apache.catalina.startup.DigesterFactory register
> WARNING: Could not get url for /javax/servlet/jsp/resources/web-jsptaglibrary_2_1.xsd
> Jun 21, 2008 8:16:43 AM org.apache.catalina.startup.DigesterFactory register
> WARNING: Could not get url for /javax/servlet/resources/j2ee_web_services_1_1.xsd
> Jun 21, 2008 8:16:43 AM org.apache.coyote.http11.Http11Protocol init
> INFO: Initializing Coyote HTTP/1.1 on http-8086
> Jun 21, 2008 8:16:43 AM org.apache.coyote.http11.Http11Protocol start
> INFO: Starting Coyote HTTP/1.1 on http-8086
> Jun 21, 2008 8:16:43 AM org.apache.tuscany.sca.http.tomcat.TomcatServer addServletMapping
> INFO: Added Servlet mapping: http://vmbuild.apache.org:8086/MyServiceComponent
> Jun 21, 2008 8:16:43 AM org.apache.tuscany.sca.node.impl.NodeImpl &lt;init&gt;
> INFO: Creating node: target/classes/myapp.composite
> Jun 21, 2008 8:16:43 AM org.apache.tuscany.sca.node.impl.NodeImpl configureNode
> INFO: Loading contribution: file:/home/continuum/data/working-directory/277/samples/callback-ws-client/target/classes/
> Jun 21, 2008 8:16:44 AM org.apache.tuscany.sca.node.impl.NodeImpl configureNode
> INFO: Loading composite: file:/home/continuum/data/working-directory/277/samples/callback-ws-client/target/classes/myapp.composite
> Jun 21, 2008 8:16:44 AM org.apache.tuscany.sca.node.impl.NodeImpl start
> INFO: Starting node: target/classes/myapp.composite
> Jun 21, 2008 8:16:44 AM org.apache.catalina.core.StandardEngine start
> INFO: Starting Servlet Engine: Apache Tomcat/6.0.14
> Jun 21, 2008 8:16:44 AM org.apache.catalina.startup.ContextConfig defaultWebConfig
> INFO: No default web.xml
> Jun 21, 2008 8:16:44 AM org.apache.coyote.http11.Http11Protocol init
> SEVERE: Error initializing endpoint
> java.net.BindException: Address already in use:8080
> 	at org.apache.tomcat.util.net.JIoEndpoint.init(JIoEndpoint.java:501)
> 	at org.apache.coyote.http11.Http11Protocol.init(Http11Protocol.java:177)
> 	at org.apache.catalina.connector.Connector.initialize(Connector.java:1059)
> 	at org.apache.tuscany.sca.http.tomcat.TomcatServer$4.run(TomcatServer.java:287)
> 	at org.apache.tuscany.sca.http.tomcat.TomcatServer$4.run(TomcatServer.java:283)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at org.apache.tuscany.sca.http.tomcat.TomcatServer.addServletMapping(TomcatServer.java:282)
> 	at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.start(Axis2ServiceProvider.java:219)
> 	at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceBindingProvider.start(Axis2ServiceBindingProvider.java:119)
> 	at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl$3.run(CompositeActivatorImpl.java:618)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:616)
> 	at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:548)
> 	at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:387)
> 	at myapp.MyClientImpl.main(MyClientImpl.java:55)
> 	at myapp.CallbackClientTestCase.testClient(CallbackClientTestCase.java:47)
> 	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:75)
> 	at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:36)
> 	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:308)
> 	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:879)
> Jun 21, 2008 8:16:44 AM org.apache.tuscany.sca.node.impl.NodeImpl stop
> INFO: Stopping node: jar:file:../callback-ws-service/target/sample-callback-ws-service.jar!/callbackws.composite
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.243 sec &lt;&lt;&lt; FAILURE!
> testClient(myapp.CallbackClientTestCase)  Time elapsed: 6.09 sec  &lt;&lt;&lt; ERROR!
> org.apache.tuscany.sca.host.http.ServletMappingException: java.security.PrivilegedActionException: LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use:8080
> 	at org.apache.tuscany.sca.http.tomcat.TomcatServer.addServletMapping(TomcatServer.java:293)
> 	at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider.start(Axis2ServiceProvider.java:219)
> 	at org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceBindingProvider.start(Axis2ServiceBindingProvider.java:119)
> 	at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl$3.run(CompositeActivatorImpl.java:618)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:616)
> 	at org.apache.tuscany.sca.core.assembly.CompositeActivatorImpl.start(CompositeActivatorImpl.java:548)
> 	at org.apache.tuscany.sca.node.impl.NodeImpl.start(NodeImpl.java:387)
> 	at myapp.MyClientImpl.main(MyClientImpl.java:55)
> 	at myapp.CallbackClientTestCase.testClient(CallbackClientTestCase.java:47)
> 	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:75)
> 	at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:36)
> 	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:308)
> 	at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:879)
> Caused by: java.security.PrivilegedActionException: LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use:8080
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at org.apache.tuscany.sca.http.tomcat.TomcatServer.addServletMapping(TomcatServer.java:282)
> 	... 33 more
> Caused by: LifecycleException:  Protocol handler initialization failed: java.net.BindException: Address already in use:8080
> 	at org.apache.catalina.connector.Connector.initialize(Connector.java:1061)
> 	at org.apache.tuscany.sca.http.tomcat.TomcatServer$4.run(TomcatServer.java:287)
> 	at org.apache.tuscany.sca.http.tomcat.TomcatServer$4.run(TomcatServer.java:283)
> 	... 35 more
> Results :
> Tests in error: 
>   testClient(myapp.CallbackClientTestCase)
> Tests run: 1, Failures: 0, Errors: 1, Skipped: 0
> [INFO] ------------------------------------------------------------------------
> [ERROR] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] There are test failures.
> Please refer to /home/continuum/data/working-directory/277/samples/callback-ws-client/target/surefire-reports for the individual test results.
> [INFO] ------------------------------------------------------------------------
> [INFO] For more information, run Maven with the -e switch
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 24 minutes 46 seconds
> [INFO] Finished at: Sat Jun 21 08:16:46 PDT 2008
> [INFO] Final Memory: 77M/138M
> [INFO] ------------------------------------------------------------------------

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.