Camel
  1. Camel
  2. CAMEL-1949

MultiServletConsumerTest fails on Windows with HttpNotFoundException

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.1.0
    • Component/s: camel-servlet
    • Labels:
      None
    • Environment:

      Windows Vista 32 Bit, JDK 1.6.0_14 and maven 2.2.0

      Description

      I do not understand the test enough to say why the exception happens. Apart from the failure I think it would be better if the test would not use port 80 as it may be already in use on many machines.

      I have attached the stack trace and the log on debug level:

      com.meterware.httpunit.HttpNotFoundException: Error on HTTP request: 404 http://localhost/mycontext/services2/hello
      at com.meterware.httpunit.WebClient.validateHeaders(WebClient.java:575)
      at com.meterware.httpunit.WebClient.updateClient(WebClient.java:464)
      at com.meterware.httpunit.WebWindow.updateWindow(WebWindow.java:139)
      at com.meterware.httpunit.WebWindow.getSubframeResponse(WebWindow.java:130)
      at com.meterware.httpunit.WebWindow.getResponse(WebWindow.java:121)
      at com.meterware.httpunit.WebClient.getResponse(WebClient.java:113)
      at org.apache.camel.component.servlet.MultiServletConsumerTest.getService(MultiServletConsumerTest.java:66)
      at org.apache.camel.component.servlet.MultiServletConsumerTest.testMultiServletsConsumers(MultiServletConsumerTest.java:53)
      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:597)
      at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
      at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
      at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
      at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
      at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
      at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
      at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
      at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
      at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
      at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
      at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
      at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
      at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
      at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
      at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

      Rhino classes (js.jar) not found - Javascript disabled
      2009-08-27 10:56:51,195 [main ] INFO DefaultCamelContext - JMX enabled. Using DefaultManagedLifecycleStrategy.
      2009-08-27 10:57:00,471 [main ] DEBUG MultiServletConsumerTest - Using created route builder: Routes: []
      2009-08-27 10:57:03,453 [main ] DEBUG DefaultCamelContext - Adding routes from builder: Routes: []
      2009-08-27 10:57:04,837 [main ] INFO DefaultCamelContext - Apache Camel 2.1-SNAPSHOT (CamelContext:camel-1) is starting
      2009-08-27 10:57:04,846 [main ] DEBUG DefaultProducerServicePool - Starting service pool: org.apache.camel.impl.DefaultProducerServicePool@f42160
      2009-08-27 10:57:05,487 [main ] DEBUG DefaultComponentResolver - Found component: servlet via type: org.apache.camel.component.servlet.ServletComponent via: META-INF/services/org/apache/camel/component/servlet
      2009-08-27 10:57:05,542 [main ] DEBUG DefaultHttpParams - Set parameter http.useragent = Jakarta Commons-HttpClient/3.1
      2009-08-27 10:57:05,547 [main ] DEBUG DefaultHttpParams - Set parameter http.protocol.version = HTTP/1.1
      2009-08-27 10:57:05,551 [main ] DEBUG DefaultHttpParams - Set parameter http.connection-manager.class = class org.apache.commons.httpclient.SimpleHttpConnectionManager
      2009-08-27 10:57:05,552 [main ] DEBUG DefaultHttpParams - Set parameter http.protocol.cookie-policy = default
      2009-08-27 10:57:05,553 [main ] DEBUG DefaultHttpParams - Set parameter http.protocol.element-charset = US-ASCII
      2009-08-27 10:57:05,554 [main ] DEBUG DefaultHttpParams - Set parameter http.protocol.content-charset = ISO-8859-1
      2009-08-27 10:57:05,561 [main ] DEBUG DefaultHttpParams - Set parameter http.method.retry-handler = org.apache.commons.httpclient.DefaultHttpMethodRetryHandler@1e2a069
      2009-08-27 10:57:05,562 [main ] DEBUG DefaultHttpParams - Set parameter http.dateparser.patterns = [EEE, dd MMM yyyy HH:mm:ss zzz, EEEE, dd-MMM-yy HH:mm:ss zzz, EEE MMM d HH:mm:ss yyyy, EEE, dd-MMM-yyyy HH:mm:ss z, EEE, dd-MMM-yyyy HH-mm-ss z, EEE, dd MMM yy HH:mm:ss z, EEE dd-MMM-yyyy HH:mm:ss z, EEE dd MMM yyyy HH:mm:ss z, EEE dd-MMM-yyyy HH-mm-ss z, EEE dd-MMM-yy HH:mm:ss z, EEE dd MMM yy HH:mm:ss z, EEE,dd-MMM-yy HH:mm:ss z, EEE,dd-MMM-yyyy HH:mm:ss z, EEE, dd-MM-yyyy HH:mm:ss z]
      2009-08-27 10:57:05,608 [main ] DEBUG DefaultComponent - Creating endpoint uri=[servlet:///hello], path=[/hello], parameters=[{}]
      2009-08-27 10:57:05,648 [main ] DEBUG DefaultCamelContext - servlet:///hello converted to endpoint: Endpoint[/hello] by component: org.apache.camel.component.servlet.ServletComponent@83e5f1
      2009-08-27 10:57:05,776 [main ] DEBUG DefaultComponent - Creating endpoint uri=[servlet:///echo?servletName=CamelServlet1], path=[/echo], parameters=[

      {servletName=CamelServlet1}

      ]
      2009-08-27 10:57:05,799 [main ] DEBUG DefaultCamelContext - servlet:///echo?servletName=CamelServlet1 converted to endpoint: Endpoint[/echo?servletName=CamelServlet1] by component: org.apache.camel.component.servlet.ServletComponent@83e5f1
      2009-08-27 10:57:05,829 [main ] DEBUG DefaultComponent - Creating endpoint uri=[servlet:///echo?servletName=CamelServlet2], path=[/echo], parameters=[

      {servletName=CamelServlet2}

      ]
      2009-08-27 10:57:05,833 [main ] DEBUG DefaultCamelContext - servlet:///echo?servletName=CamelServlet2 converted to endpoint: Endpoint[/echo?servletName=CamelServlet2] by component: org.apache.camel.component.servlet.ServletComponent@83e5f1
      2009-08-27 10:57:05,836 [main ] DEBUG DefaultCamelContext - Starting routes
      2009-08-27 10:57:06,175 [main ] DEBUG HttpConsumer - Starting consumer: Consumer[/echo?servletName=CamelServlet2]
      2009-08-27 10:57:06,423 [main ] DEBUG HttpConsumer - Starting consumer: Consumer[/echo?servletName=CamelServlet1]
      2009-08-27 10:57:06,613 [main ] DEBUG HttpConsumer - Starting consumer: Consumer[/hello]
      2009-08-27 10:57:06,615 [main ] INFO CamelHttpTransportServlet - Since no servlet name is specified, using the first element of camelServlet map [CamelServlet1]
      2009-08-27 10:57:06,616 [main ] DEBUG DefaultCamelContext - Route 0: EventDrivenConsumerRoute[Endpoint[/echo?servletName=CamelServlet2] -> Instrumention:route[UnitOfWork(Channel[org.apache.camel.component.servlet.MultiServletConsumerTest$1$1@15c2843])]]
      2009-08-27 10:57:06,618 [main ] DEBUG DefaultCamelContext - Route 1: EventDrivenConsumerRoute[Endpoint[/echo?servletName=CamelServlet1] -> Instrumention:route[UnitOfWork(Channel[org.apache.camel.component.servlet.MultiServletConsumerTest$1$1@15c2843])]]
      2009-08-27 10:57:06,620 [main ] DEBUG DefaultCamelContext - Route 2: EventDrivenConsumerRoute[Endpoint[/hello] -> Instrumention:route[UnitOfWork(Channel[org.apache.camel.component.servlet.MultiServletConsumerTest$1$1@15c2843])]]
      2009-08-27 10:57:06,621 [main ] DEBUG DefaultCamelContext - Started routes
      2009-08-27 10:57:06,622 [main ] INFO DefaultCamelContext - Apache Camel 2.1-SNAPSHOT (CamelContext:camel-1) started
      2009-08-27 10:57:13,064 [main ] DEBUG MultiServletConsumerTest - Routing Rules are: [EventDrivenConsumerRoute[Endpoint[/echo?servletName=CamelServlet2] -> Instrumention:route[UnitOfWork(Channel[org.apache.camel.component.servlet.MultiServletConsumerTest$1$1@15c2843])]], EventDrivenConsumerRoute[Endpoint[/echo?servletName=CamelServlet1] -> Instrumention:route[UnitOfWork(Channel[org.apache.camel.component.servlet.MultiServletConsumerTest$1$1@15c2843])]], EventDrivenConsumerRoute[Endpoint[/hello] -> Instrumention:route[UnitOfWork(Channel[org.apache.camel.component.servlet.MultiServletConsumerTest$1$1@15c2843])]]]
      2009-08-27 10:57:14,863 [main ] DEBUG MultiServletConsumerTest - Routing Rules are: [EventDrivenConsumerRoute[Endpoint[/echo?servletName=CamelServlet2] -> Instrumention:route[UnitOfWork(Channel[org.apache.camel.component.servlet.MultiServletConsumerTest$1$1@15c2843])]], EventDrivenConsumerRoute[Endpoint[/echo?servletName=CamelServlet1] -> Instrumention:route[UnitOfWork(Channel[org.apache.camel.component.servlet.MultiServletConsumerTest$1$1@15c2843])]], EventDrivenConsumerRoute[Endpoint[/hello] -> Instrumention:route[UnitOfWork(Channel[org.apache.camel.component.servlet.MultiServletConsumerTest$1$1@15c2843])]]]
      2009-08-27 10:57:26,641 [main ] DEBUG MultiServletConsumerTest - tearDown test
      2009-08-27 10:57:26,642 [main ] INFO DefaultCamelContext - Apache Camel 2.1-SNAPSHOT (CamelContext:camel-1) is stopping
      2009-08-27 10:57:26,642 [main ] INFO CamelHttpTransportServlet - Since no servlet name is specified, using the first element of camelServlet map [CamelServlet1]
      2009-08-27 10:57:26,643 [main ] DEBUG HttpConsumer - Stopping consumer: Consumer[/hello]
      2009-08-27 10:57:26,643 [main ] DEBUG HttpConsumer - Stopping consumer: Consumer[/echo?servletName=CamelServlet1]
      2009-08-27 10:57:26,644 [main ] DEBUG HttpConsumer - Stopping consumer: Consumer[/echo?servletName=CamelServlet2]
      2009-08-27 10:57:26,644 [main ] DEBUG DefaultProducerServicePool - Stopping service pool: org.apache.camel.impl.DefaultProducerServicePool@f42160
      2009-08-27 10:57:26,645 [main ] INFO DefaultCamelContext - Apache Camel 2.1-SNAPSHOT (CamelContext:camel-1) stopped

        Activity

        Christian Schneider created issue -
        Christian Schneider made changes -
        Field Original Value New Value
        Summary MultiServletConsumerTest fails onn Windows with HttpNotFoundException MultiServletConsumerTest fails on Windows with HttpNotFoundException
        Hide
        Claus Ibsen added a comment -

        Christian can you try latest trunk code again?

        Show
        Claus Ibsen added a comment - Christian can you try latest trunk code again?
        Hide
        Christian Schneider added a comment -

        The test succeeds. Thanks

        Show
        Christian Schneider added a comment - The test succeeds. Thanks
        Hide
        Jonathan Anstey added a comment -

        Ah yeah fixed this yesterday. It was occurring for me on Linux with JDK 1.6 too.

        Show
        Jonathan Anstey added a comment - Ah yeah fixed this yesterday. It was occurring for me on Linux with JDK 1.6 too.
        Jonathan Anstey made changes -
        Resolution Fixed [ 1 ]
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Jonathan Anstey [ janstey ]
        Hide
        Jonathan Anstey added a comment -
        Show
        Jonathan Anstey added a comment - BTW the fix rev is http://svn.apache.org/viewvc?rev=829164&view=rev
        Christian Schneider made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Jeff Turner made changes -
        Project Import Sat Nov 27 00:14:50 EST 2010 [ 1290834890113 ]

          People

          • Assignee:
            Jonathan Anstey
            Reporter:
            Christian Schneider
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development