4 Replies Latest reply on Apr 4, 2011 10:42 PM by dead devil

    "Camel in action" chapter 7 example

    dead devil Newbie

      Greetings.

       

      I'm trying to run the web services example that is explained in the book. When im building the maven project, i get this output:

       

       

      Scanning for projects...

      -


      Reactor Build Order:

      Camel in Action :: Chapter 7 :: CXF Component Examples

      Camel in Action :: Chapter 7 :: CXF Component Examples :: Contract First

      Camel in Action :: Chapter 7 :: CXF Component Examples :: Code First

                                                                              

      -


      Building Camel in Action :: Chapter 7 :: CXF Component Examples 1.0

      -


      --- maven-install-plugin:2.3.1:install (default-install) @ cxf ---

      Installing /home/echo66/camelinaction-source/chapter7/cxf/pom.xml to /home/echo66/.m2/repository/com/camelinaction/cxf/1.0/cxf-1.0.pom

                                                                              

      -


      Building Camel in Action :: Chapter 7 :: CXF Component Examples :: Contract First 1.0

      -


      --- cxf-codegen-plugin:2.2.11:wsdl2java (generate-sources) @ chapter7-cxf-contract-first ---

      --- maven-resources-plugin:2.4.3:resources (default-resources) @ chapter7-cxf-contract-first ---

      Using 'UTF-8' encoding to copy filtered resources.

      Copying 4 resources

      --- maven-compiler-plugin:2.3.2:compile (default-compile) @ chapter7-cxf-contract-first ---

      Nothing to compile - all classes are up to date

      --- maven-resources-plugin:2.4.3:testResources (default-testResources) @ chapter7-cxf-contract-first ---

      Using 'UTF-8' encoding to copy filtered resources.

      skip non existing resourceDirectory /home/echo66/camelinaction-source/chapter7/cxf/contract_first/src/test/resources

      --- maven-compiler-plugin:2.3.2:testCompile (default-testCompile) @ chapter7-cxf-contract-first ---

      Nothing to compile - all classes are up to date

      --- maven-surefire-plugin:2.5:test (default-test) @ chapter7-cxf-contract-first ---

      Surefire report directory: /home/echo66/camelinaction-source/chapter7/cxf/contract_first/target/surefire-reports

       

      -


      T E S T S

      -


      Running camelinaction.OrderTest

      2011-03-29 02:59:45,286 INFO  CamelNamespaceHandler          - OSGi environment not detected.

      2011-03-29 02:59:47,801 INFO  DefaultCamelContext            - Apache Camel 2.5.0 (CamelContext: camel-1) is starting

      2011-03-29 02:59:47,801 INFO  DefaultCamelContext            - JMX enabled. Using ManagedManagementStrategy.

      2011-03-29 02:59:48,417 INFO  ReflectionServiceFactoryBean   - Creating Service OrderEndpointService from WSDL: wsdl/order.wsdl

      2011-03-29 02:59:49,269 WARN  stractWSDLBasedEndpointFactory - Could not find endpoint/port for OrderEndpointPort in wsdl. Using OrderService.

      2011-03-29 02:59:49,312 INFO  ServerImpl                     - Setting the server's publish address to be http://localhost:9000/order/

      2011-03-29 02:59:49,577 INFO  log                            - Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog

      2011-03-29 02:59:49,603 INFO  log                            - jetty-6.1.25

      2011-03-29 02:59:49,684 WARN  log                            - failed SelectChannelConnector@localhost:9000: java.net.BindException: Address already in use

      2011-03-29 02:59:49,684 WARN  log                            - failed Server@1ee69d3: java.net.BindException: Address already in use

      2011-03-29 02:59:49,695 ERROR JettyHTTPServerEngine          - Could not start Jetty server on port 9.000: Address already in use

      2011-03-29 02:59:49,695 INFO  log                            - Stopped SelectChannelConnector@localhost:9000

      2011-03-29 02:59:49,798 INFO  DefaultCamelContext            - Apache Camel 2.5.0 (CamelContext:camel-1) is shutting down

      2011-03-29 02:59:49,799 INFO  DefaultShutdownStrategy        - Starting to graceful shutdown 0 routes (timeout 300 seconds)

      2011-03-29 02:59:49,802 INFO  DefaultShutdownStrategy        - Graceful shutdown of 0 routes completed in 0 seconds

      2011-03-29 02:59:49,804 WARN  DefaultCamelContext            - Error occurred while shutting down service: org.apache.camel.impl.RouteService@1d602b3. This exception will be ignored.

      java.lang.IllegalArgumentException: executorService must be specified

           at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:276)

           at org.apache.camel.impl.DefaultExecutorServiceStrategy.shutdown(DefaultExecutorServiceStrategy.java:293)

           at org.apache.camel.component.seda.SedaConsumer.doStop(SedaConsumer.java:190)

           at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:98)

           at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:122)

           at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:99)

           at org.apache.camel.util.ServiceHelper.stopAndShutdownService(ServiceHelper.java:147)

           at org.apache.camel.impl.RouteService.stopChildService(RouteService.java:244)

           at org.apache.camel.impl.RouteService.doStop(RouteService.java:186)

           at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:98)

           at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:122)

           at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:99)

           at org.apache.camel.util.ServiceHelper.stopAndShutdownService(ServiceHelper.java:147)

           at org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1442)

           at org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1464)

           at org.apache.camel.impl.DefaultCamelContext.shutdownServices(DefaultCamelContext.java:1452)

           at org.apache.camel.impl.DefaultCamelContext.doStop(DefaultCamelContext.java:1332)

           at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:98)

           at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:71)

           at org.apache.camel.impl.ServiceSupport.start(ServiceSupport.java:52)

           at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1191)

           at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:203)

           at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:101)

           at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:237)

           at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:97)

           at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:303)

           at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:911)

           at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:428)

           at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)

           at camelinaction.OrderTest.createApplicationContext(OrderTest.java:34)

           at org.apache.camel.test.junit4.CamelSpringTestSupport.setUp(CamelSpringTestSupport.java:50)

           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

           at java.lang.reflect.Method.invoke(Method.java:616)

           at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)

           at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)

           at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)

           at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:27)

           at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)

           at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:76)

           at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)

           at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)

           at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)

           at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)

           at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)

           at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)

           at org.junit.runners.ParentRunner.run(ParentRunner.java:236)

           at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:59)

           at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:115)

           at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:102)

           at org.apache.maven.surefire.Surefire.run(Surefire.java:180)

           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

           at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

           at java.lang.reflect.Method.invoke(Method.java:616)

           at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:350)

           at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1021)

      2011-03-29 02:59:49,808 INFO  DefaultInflightRepository      - Shutting down with no inflight exchanges.

      2011-03-29 02:59:49,810 INFO  DefaultCamelContext            - Uptime: 2.008 seconds

      2011-03-29 02:59:49,810 INFO  DefaultCamelContext            - Apache Camel 2.5.0 (CamelContext: camel-1) is shutdown in 0.011 seconds

      2011-03-29 02:59:49,811 INFO  OrderTest                      - Testing done: camelinaction.OrderTest@f49e8f

      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.848 sec <<< FAILURE!

       

      Results :

       

      Tests in error:

        testOrderOk(camelinaction.OrderTest)

       

      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0

       

      -


      Reactor Summary:

      Camel in Action :: Chapter 7 :: CXF Component Examples  SUCCESS

      Camel in Action :: Chapter 7 :: CXF Component Examples :: Contract First  FAILURE

      Camel in Action :: Chapter 7 :: CXF Component Examples :: Code First  SKIPPED

      -


      BUILD FAILURE

      -


      Total time: 15.406s

      Finished at: Tue Mar 29 02:59:49 WEST 2011

      Final Memory: 7M/70M

      -


      Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.5:test (default-test) on project chapter7-cxf-contract-first: There are test failures.

      Please refer to /home/echo66/camelinaction-source/chapter7/cxf/contract_first/target/surefire-reports for the individual test results.

      ->

      To see the full stack trace of the errors, re-run Maven with the -e switch.

      Re-run Maven using the -X switch to enable full debug logging.

      For more information about the errors and possible solutions, please read the following articles:

      http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

      After correcting the problems, you can resume the build with the command

         mvn  -rf :chapter7-cxf-contract-first

       

       

      am i doing something wrong????