You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Christian Müller <ch...@gmail.com> on 2010/07/05 16:21:27 UTC

My camel-CXF tests fails, if they run together

Hello list,

I using Apache Camel 2.2.0-fuse-01-00 and I have trouble to run my four unit
tests. If I run each test separate (annotate the other tests with @Ignore or
run only one test method in my IDE) all tests succeed. But if I run all
tests together (one test after the others) with Maven or in my IDE, I
receive a java.net.SocketTimeoutException. Unfortunately I have no idea,
where the side effect is.

My test looks as following:
public class IncommingRouteTest extends CamelSpringTestSupport {

    private Person client;

    @EndpointInject(uri = "mock:result")
    private MockEndpoint queueEndpoint;

    @EndpointInject(uri = "mock:error")
    private MockEndpoint errorEndpoint;

    @Before
    public void setUp() throws Exception {
        disableJMX();

        super.setUp();

        URL wsdlURL =
IncommingRouteTest.class.getClassLoader().getResource("META-INF/wlsi/person-non-wrapper.wsdl");
        PersonService ss = new PersonService(wsdlURL, new QName("
http://camel.apache.org/non-wrapper", "PersonService"));
        client = ss.getSoap();
    }

    @Test
    public void process() throws Exception {
        queueEndpoint.expectedMessageCount(1);

queueEndpoint.expectedBodiesReceived("com.awl.wlsi.example.eai.service.types.GetPerson[personId='1']");
        errorEndpoint.expectedMessageCount(0);

        GetPerson request = new GetPerson();
        request.setPersonId("1");
        GetPersonResponse response = client.getPerson(request);

        assertEquals("1", response.getPersonId());
        assertEquals("Christian Mueller", response.getName());
        assertEquals("123", response.getSsn());

        queueEndpoint.assertIsSatisfied();
        errorEndpoint.assertIsSatisfied();
    }

    @Test
    public void processIrrecoverableExceptionForUnknowPerson() throws
Exception {
        queueEndpoint.expectedMessageCount(1);

queueEndpoint.expectedBodiesReceived("com.awl.wlsi.example.eai.service.types.GetPerson[personId='?']");
        errorEndpoint.expectedMessageCount(0);

        GetPerson request = new GetPerson();
        request.setPersonId("?");

        try {
            client.getPerson(request);
            fail("We expect to get the UnknowPersonFault here");
        } catch (UnknownPersonFault fault) {
            // We expect to get fault here
            assertEquals("Receive an invalid personId: '?'",
fault.getMessage());
        }

        queueEndpoint.assertIsSatisfied();
        errorEndpoint.assertIsSatisfied();
    }

    @Test
    public void processRecoverableExceptionForUnknowPerson() throws
Exception {
        queueEndpoint.expectedMessageCount(1);

queueEndpoint.expectedBodiesReceived("com.awl.wlsi.example.eai.service.types.GetPerson[personId='5']");
        errorEndpoint.expectedMessageCount(1);

        GetPerson request = new GetPerson();
        request.setPersonId("5");

        try {
            client.getPerson(request);
            fail("We expect to get the SOAPFaultException here");
        } catch (SOAPFaultException fault) {
            // We expect to get fault here
            assertEquals("Recoverable exception", fault.getMessage());
        }

        queueEndpoint.assertIsSatisfied();
        errorEndpoint.assertIsSatisfied();
    }

    @Test
    public void processInvalidRequest() throws Exception {
        queueEndpoint.expectedMessageCount(0);
        errorEndpoint.expectedMessageCount(0);

        GetPerson request = new GetPerson();
        request.setPersonId("tooooooooooooooooooooooo long");

        try {
            client.getPerson(request);
            fail("We expect to get a message schema validation
failure");
        } catch (Exception ex) {
            // We expect to get fault here
            assertEquals("Unmarshalling Error: cvc-maxLength-valid: Value
'tooooooooooooooooooooooo long' with length = '29' is not facet-valid with
respect to maxLength '10' for type 'personId'. ", ex.getMessage());
        }

        queueEndpoint.assertIsSatisfied();
        errorEndpoint.assertIsSatisfied();
    }

    @Override
    protected ClassPathXmlApplicationContext createApplicationContext() {
        return new ClassPathXmlApplicationContext(new
String[]{"META-INF/spring/bundle-context.xml",
"META-INF/spring/bundle-context-test.xml"});
    }

    @Override
    protected int getExpectedRouteCount() {
        return 0;
    }
}


stack trace:
2010-07-05 16:07:40,963 [main           ] DEBUG
DefaultCamelContext            - ... Routes started
2010-07-05 16:07:40,963 [main           ] INFO
DefaultCamelContext            - Started 3 routes
2010-07-05 16:07:40,963 [main           ] INFO
DefaultCamelContext            - Apache Camel 2.2.0-fuse-01-00
(CamelContext:camelContext) started
2010-07-05 16:07:40,963 [main           ] DEBUG
IncommingRouteTest             - Camel Routes:
[EventDrivenConsumerRoute[Endpoint[
http://localhost:8181/Services/PersonService] ->
Instrumentation:route[UnitOfWork(Channel[Multicast[[Channel[sendTo(Endpoint[direct://queue])],
Channel[sendTo(Endpoint[direct://processor])]]]])]],
EventDrivenConsumerRoute[Endpoint[direct://queue] ->
Instrumentation:route[UnitOfWork(Pipeline[Channel[com.awl.wlsi.example.eai.in.IncommingRoute$1@b3a5d1],
Channel[sendTo(Endpoint[mock://result] InOnly)]])]],
EventDrivenConsumerRoute[Endpoint[direct://processor] ->
Instrumentation:route[UnitOfWork(Channel[com.awl.wlsi.example.eai.in.PersonProcessor@139ef3a
])]]]
2010-07-05 16:07:40,963 [main           ] TRACE
CamelBeanPostProcessor         - Camel bean processing before initialization
for bean: this
2010-07-05 16:07:40,963 [main           ] TRACE
DefaultCamelContext            - Getting endpoint with uri: mock://result
2010-07-05 16:07:40,963 [main           ] TRACE
DefaultCamelContext            - Getting endpoint with uri: mock://error
2010-07-05 16:07:40,963 [main           ] DEBUG
IncommingRouteTest             - Using created route builder: Routes: []
2010-07-05 16:07:40,963 [main           ] DEBUG
DefaultCamelContext            - Adding routes from builder: Routes: []
2010-07-05 16:07:40,963 [main           ] DEBUG
IncommingRouteTest             - Routing Rules are:
[EventDrivenConsumerRoute[Endpoint[
http://localhost:8181/Services/PersonService] ->
Instrumentation:route[UnitOfWork(Channel[Multicast[[Channel[sendTo(Endpoint[direct://queue])],
Channel[sendTo(Endpoint[direct://processor])]]]])]],
EventDrivenConsumerRoute[Endpoint[direct://queue] ->
Instrumentation:route[UnitOfWork(Pipeline[Channel[com.awl.wlsi.example.eai.in.IncommingRoute$1@b3a5d1],
Channel[sendTo(Endpoint[mock://result] InOnly)]])]],
EventDrivenConsumerRoute[Endpoint[direct://processor] ->
Instrumentation:route[UnitOfWork(Channel[com.awl.wlsi.example.eai.in.PersonProcessor@139ef3a
])]]]
2010-07-05 16:07:40,963 [main           ] DEBUG
IncommingRouteTest             - Routing Rules are:
[EventDrivenConsumerRoute[Endpoint[
http://localhost:8181/Services/PersonService] ->
Instrumentation:route[UnitOfWork(Channel[Multicast[[Channel[sendTo(Endpoint[direct://queue])],
Channel[sendTo(Endpoint[direct://processor])]]]])]],
EventDrivenConsumerRoute[Endpoint[direct://queue] ->
Instrumentation:route[UnitOfWork(Pipeline[Channel[com.awl.wlsi.example.eai.in.IncommingRoute$1@b3a5d1],
Channel[sendTo(Endpoint[mock://result] InOnly)]])]],
EventDrivenConsumerRoute[Endpoint[direct://processor] ->
Instrumentation:route[UnitOfWork(Channel[com.awl.wlsi.example.eai.in.PersonProcessor@139ef3a
])]]]
05.07.2010 16:07:40
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
INFO: Creating Service
{http://camel.apache.org/non-wrapper}PersonServicefrom WSDL:
file:/D:/workspaceWLSI/wlsi/examples/wlsi-example-eai/wlsi-example-eai-incomming/target/classes/META-INF/wlsi/person-non-wrapper.wsdl
05.07.2010 16:08:41 org.apache.cxf.phase.PhaseInterceptorChain
doDefaultLogging
WARNUNG: Interceptor for {
http://camel.apache.org/non-wrapper}PersonService#{http://camel.apache.org/non-wrapper}GetPersonhas
thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
    at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
    at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:484)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:310)
    at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:262)
    at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
    at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
    at $Proxy51.getPerson(Unknown Source)
    at
com.awl.wlsi.example.eai.in.IncommingRouteTest.process(IncommingRouteTest.java:50)
    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)
Caused by: java.net.SocketTimeoutException: SocketTimeoutException invoking
http://localhost:8181/Services/PersonService: Read timed out
    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:513)
    at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:2011)
    at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1992)
    at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
    at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:640)
    at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
    ... 30 more
Caused by: java.net.SocketTimeoutException: Read timed out
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(SocketInputStream.java:129)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
    at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
    at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
    at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1072)
    at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
    at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2110)
    at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2087)
    at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1985)
    ... 33 more
2010-07-05 16:08:41,497 [main           ] DEBUG
IncommingRouteTest             - tearDown test
2010-07-05 16:08:41,497 [main           ] TRACE
ServiceHelper                  - Stopping service
org.apache.camel.impl.ProducerCache@89949a

Any idea? I could also provide my other code, if it's required...

Thanks in advance,
Christian

Re: My camel-CXF tests fails, if they run together

Posted by AlanFoster <al...@alanfoster.me>.
Hi milanmilas,

There's also a helper method that will return the next available port, which
might be relevant to what you're doing :)

It can be found under AvailablePortFinder, here is an example of its usage
`vailablePortFinder.getNextAvailable()`

There's more information here about it here too
http://camel.apache.org/camel-test.html#CamelTest-Dynamicallyassigningports



--
View this message in context: http://camel.465427.n5.nabble.com/My-camel-CXF-tests-fails-if-they-run-together-tp696559p5729858.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: My camel-CXF tests fails, if they run together

Posted by Willem jiang <wi...@gmail.com>.
Yeah, I think the better solution could be we can let the CamelBlueprintTestSupport support to create the context per test class.
I will work on it today.


--  
Willem Jiang

Red Hat, Inc.
FuseSource is now part of Red Hat
Web: http://www.fusesource.com | http://www.redhat.com
Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English)
          http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem





On Tuesday, March 26, 2013 at 10:42 PM, milanmilas wrote:

> Similar issue with CamelBlueprintTestSupport.
> Resolution:
>  
>  
> public class RouteTest extends CamelBlueprintTestSupport {
> private static int num = 8567;
> @Override
> protected String getBlueprintDescriptor() {
> ++num;
> return "/OSGI-INF/blueprint/blueprint.xml";
> }
>  
> @Override
> protected Properties useOverridePropertiesWithPropertiesComponent() {
> Properties extra = new Properties();
> extra.put("service.address", "http://localhost:"+(num));
> return extra;
> }
> ---------------------------------------------------------------------------------
> <cm:property-placeholder persistent-id="my-placeholders">
> <cm:default-properties>
> <cm:property name="service.address" value="" />
> </cm:default-properties>
> </cm:property-placeholder>
>  
> <cxf:cxfEndpoint id="routerEndpoint"
> address="{{service.address}}/CxfMtomRouterPayloadModeTest/jaxws-mtom/hello"
>  
>  
>  
> --
> View this message in context: http://camel.465427.n5.nabble.com/My-camel-CXF-tests-fails-if-they-run-together-tp696559p5729852.html
> Sent from the Camel - Users mailing list archive at Nabble.com (http://Nabble.com).




Re: My camel-CXF tests fails, if they run together

Posted by milanmilas <mi...@gmail.com>.
Similar issue with CamelBlueprintTestSupport.
Resolution:


public class RouteTest extends CamelBlueprintTestSupport {
	private static int num = 8567;
    @Override
    protected String getBlueprintDescriptor() {
    	++num;
        return "/OSGI-INF/blueprint/blueprint.xml";
    }
    
    @Override
    protected Properties useOverridePropertiesWithPropertiesComponent() {
        Properties extra = new Properties();
        extra.put("service.address", "http://localhost:"+(num));
        return extra;
    }
---------------------------------------------------------------------------------
<cm:property-placeholder persistent-id="my-placeholders">
    <cm:default-properties>
      <cm:property name="service.address" value="" />
    </cm:default-properties>
  </cm:property-placeholder>
  
  <cxf:cxfEndpoint id="routerEndpoint"
address="{{service.address}}/CxfMtomRouterPayloadModeTest/jaxws-mtom/hello"



--
View this message in context: http://camel.465427.n5.nabble.com/My-camel-CXF-tests-fails-if-they-run-together-tp696559p5729852.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: My camel-CXF tests fails, if they run together

Posted by Willem Jiang <wi...@gmail.com>.
Hi Christian,

Welcome to the timeout world :)

It's cause by the HTTP's keep alive mechanism, when the client sends out 
the request with the keep alive header (which is default for cxf 
client), the server will keep the socket open until the timeout.
For you case, you start a new http serve each time and CXF let jetty try
to reuse the socket port when it start, so you don't have the address is
binded error when you start the server. But the client may not survive 
with this situation.

You can use netstat -na to monitor the TCP socket state when you run the 
tests.

So that could explain why your first test passed and the second one
failed with SocketTimeOut Error.

The solution could be you only start the CXF server once before the test 
cases are ran.

Willem
----------------------------------
Apache Camel, Apache CXF committer
Open SOA http://www.fusesource.com
Blog http://willemjiang.blogspot.com
Tiwtter http://twitter.com/willemjiang



Christian Müller wrote:
> After some additional tests it looks like, that each second test fails
> because of this. If I run all tests, number one succeed, number two fails,
> number three succeed and number four fails. If I comment number number two,
> number three fails and number four succeed. If I comment number two and
> three, number four succeed. Very strange...
> 
> Regards,
> Christian
> 
> On Mon, Jul 5, 2010 at 4:21 PM, Christian Müller <
> christian.mueller@gmail.com> wrote:
> 
>> Hello list,
>>
>> I using Apache Camel 2.2.0-fuse-01-00 and I have trouble to run my four
>> unit tests. If I run each test separate (annotate the other tests with
>> @Ignore or run only one test method in my IDE) all tests succeed. But if I
>> run all tests together (one test after the others) with Maven or in my IDE,
>> I receive a java.net.SocketTimeoutException. Unfortunately I have no idea,
>> where the side effect is.
>>
>> My test looks as following:
>> public class IncommingRouteTest extends CamelSpringTestSupport {
>>
>>     private Person client;
>>
>>     @EndpointInject(uri = "mock:result")
>>     private MockEndpoint queueEndpoint;
>>
>>     @EndpointInject(uri = "mock:error")
>>     private MockEndpoint errorEndpoint;
>>
>>     @Before
>>     public void setUp() throws Exception {
>>         disableJMX();
>>
>>         super.setUp();
>>
>>         URL wsdlURL =
>> IncommingRouteTest.class.getClassLoader().getResource("META-INF/wlsi/person-non-wrapper.wsdl");
>>         PersonService ss = new PersonService(wsdlURL, new QName("
>> http://camel.apache.org/non-wrapper", "PersonService"));
>>         client = ss.getSoap();
>>     }
>>
>>     @Test
>>     public void process() throws Exception {
>>         queueEndpoint.expectedMessageCount(1);
>>
>> queueEndpoint.expectedBodiesReceived("com.awl.wlsi.example.eai.service.types.GetPerson[personId='1']");
>>         errorEndpoint.expectedMessageCount(0);
>>
>>         GetPerson request = new GetPerson();
>>         request.setPersonId("1");
>>         GetPersonResponse response = client.getPerson(request);
>>
>>         assertEquals("1", response.getPersonId());
>>         assertEquals("Christian Mueller", response.getName());
>>         assertEquals("123", response.getSsn());
>>
>>         queueEndpoint.assertIsSatisfied();
>>         errorEndpoint.assertIsSatisfied();
>>     }
>>
>>     @Test
>>     public void processIrrecoverableExceptionForUnknowPerson() throws
>> Exception {
>>         queueEndpoint.expectedMessageCount(1);
>>
>> queueEndpoint.expectedBodiesReceived("com.awl.wlsi.example.eai.service.types.GetPerson[personId='?']");
>>         errorEndpoint.expectedMessageCount(0);
>>
>>         GetPerson request = new GetPerson();
>>         request.setPersonId("?");
>>
>>         try {
>>             client.getPerson(request);
>>             fail("We expect to get the UnknowPersonFault here");
>>         } catch (UnknownPersonFault fault) {
>>             // We expect to get fault here
>>             assertEquals("Receive an invalid personId: '?'",
>> fault.getMessage());
>>         }
>>
>>         queueEndpoint.assertIsSatisfied();
>>         errorEndpoint.assertIsSatisfied();
>>     }
>>
>>     @Test
>>     public void processRecoverableExceptionForUnknowPerson() throws
>> Exception {
>>         queueEndpoint.expectedMessageCount(1);
>>
>> queueEndpoint.expectedBodiesReceived("com.awl.wlsi.example.eai.service.types.GetPerson[personId='5']");
>>         errorEndpoint.expectedMessageCount(1);
>>
>>         GetPerson request = new GetPerson();
>>         request.setPersonId("5");
>>
>>         try {
>>             client.getPerson(request);
>>             fail("We expect to get the SOAPFaultException here");
>>         } catch (SOAPFaultException fault) {
>>             // We expect to get fault here
>>             assertEquals("Recoverable exception", fault.getMessage());
>>         }
>>
>>         queueEndpoint.assertIsSatisfied();
>>         errorEndpoint.assertIsSatisfied();
>>     }
>>
>>     @Test
>>     public void processInvalidRequest() throws Exception {
>>         queueEndpoint.expectedMessageCount(0);
>>         errorEndpoint.expectedMessageCount(0);
>>
>>         GetPerson request = new GetPerson();
>>         request.setPersonId("tooooooooooooooooooooooo long");
>>
>>         try {
>>             client.getPerson(request);
>>             fail("We expect to get a message schema validation
>> failure");
>>         } catch (Exception ex) {
>>             // We expect to get fault here
>>             assertEquals("Unmarshalling Error: cvc-maxLength-valid: Value
>> 'tooooooooooooooooooooooo long' with length = '29' is not facet-valid with
>> respect to maxLength '10' for type 'personId'. ", ex.getMessage());
>>         }
>>
>>         queueEndpoint.assertIsSatisfied();
>>         errorEndpoint.assertIsSatisfied();
>>     }
>>
>>     @Override
>>     protected ClassPathXmlApplicationContext createApplicationContext() {
>>         return new ClassPathXmlApplicationContext(new
>> String[]{"META-INF/spring/bundle-context.xml",
>> "META-INF/spring/bundle-context-test.xml"});
>>     }
>>
>>     @Override
>>     protected int getExpectedRouteCount() {
>>         return 0;
>>     }
>> }
>>
>>
>> stack trace:
>> 2010-07-05 16:07:40,963 [main           ] DEBUG
>> DefaultCamelContext            - ... Routes started
>> 2010-07-05 16:07:40,963 [main           ] INFO
>> DefaultCamelContext            - Started 3 routes
>> 2010-07-05 16:07:40,963 [main           ] INFO
>> DefaultCamelContext            - Apache Camel 2.2.0-fuse-01-00
>> (CamelContext:camelContext) started
>> 2010-07-05 16:07:40,963 [main           ] DEBUG
>> IncommingRouteTest             - Camel Routes:
>> [EventDrivenConsumerRoute[Endpoint[
>> http://localhost:8181/Services/PersonService] ->
>> Instrumentation:route[UnitOfWork(Channel[Multicast[[Channel[sendTo(Endpoint[direct://queue])],
>> Channel[sendTo(Endpoint[direct://processor])]]]])]],
>> EventDrivenConsumerRoute[Endpoint[direct://queue] ->
>> Instrumentation:route[UnitOfWork(Pipeline[Channel[com.awl.wlsi.example.eai.in.IncommingRoute$1@b3a5d1],
>> Channel[sendTo(Endpoint[mock://result] InOnly)]])]],
>> EventDrivenConsumerRoute[Endpoint[direct://processor] ->
>> Instrumentation:route[UnitOfWork(Channel[com.awl.wlsi.example.eai.in.PersonProcessor@139ef3a
>> ])]]]
>> 2010-07-05 16:07:40,963 [main           ] TRACE
>> CamelBeanPostProcessor         - Camel bean processing before initialization
>> for bean: this
>> 2010-07-05 16:07:40,963 [main           ] TRACE
>> DefaultCamelContext            - Getting endpoint with uri: mock://result
>> 2010-07-05 16:07:40,963 [main           ] TRACE
>> DefaultCamelContext            - Getting endpoint with uri: mock://error
>> 2010-07-05 16:07:40,963 [main           ] DEBUG
>> IncommingRouteTest             - Using created route builder: Routes: []
>> 2010-07-05 16:07:40,963 [main           ] DEBUG
>> DefaultCamelContext            - Adding routes from builder: Routes: []
>> 2010-07-05 16:07:40,963 [main           ] DEBUG
>> IncommingRouteTest             - Routing Rules are:
>> [EventDrivenConsumerRoute[Endpoint[
>> http://localhost:8181/Services/PersonService] ->
>> Instrumentation:route[UnitOfWork(Channel[Multicast[[Channel[sendTo(Endpoint[direct://queue])],
>> Channel[sendTo(Endpoint[direct://processor])]]]])]],
>> EventDrivenConsumerRoute[Endpoint[direct://queue] ->
>> Instrumentation:route[UnitOfWork(Pipeline[Channel[com.awl.wlsi.example.eai.in.IncommingRoute$1@b3a5d1],
>> Channel[sendTo(Endpoint[mock://result] InOnly)]])]],
>> EventDrivenConsumerRoute[Endpoint[direct://processor] ->
>> Instrumentation:route[UnitOfWork(Channel[com.awl.wlsi.example.eai.in.PersonProcessor@139ef3a
>> ])]]]
>> 2010-07-05 16:07:40,963 [main           ] DEBUG
>> IncommingRouteTest             - Routing Rules are:
>> [EventDrivenConsumerRoute[Endpoint[
>> http://localhost:8181/Services/PersonService] ->
>> Instrumentation:route[UnitOfWork(Channel[Multicast[[Channel[sendTo(Endpoint[direct://queue])],
>> Channel[sendTo(Endpoint[direct://processor])]]]])]],
>> EventDrivenConsumerRoute[Endpoint[direct://queue] ->
>> Instrumentation:route[UnitOfWork(Pipeline[Channel[com.awl.wlsi.example.eai.in.IncommingRoute$1@b3a5d1],
>> Channel[sendTo(Endpoint[mock://result] InOnly)]])]],
>> EventDrivenConsumerRoute[Endpoint[direct://processor] ->
>> Instrumentation:route[UnitOfWork(Channel[com.awl.wlsi.example.eai.in.PersonProcessor@139ef3a
>> ])]]]
>> 05.07.2010 16:07:40
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
>> buildServiceFromWSDL
>> INFO: Creating Service {http://camel.apache.org/non-wrapper}PersonService<http://camel.apache.org/non-wrapper%7DPersonService>from WSDL:
>> file:/D:/workspaceWLSI/wlsi/examples/wlsi-example-eai/wlsi-example-eai-incomming/target/classes/META-INF/wlsi/person-non-wrapper.wsdl
>> 05.07.2010 16:08:41 org.apache.cxf.phase.PhaseInterceptorChain
>> doDefaultLogging
>> WARNUNG: Interceptor for {
>> http://camel.apache.org/non-wrapper}PersonService#{http://camel.apache.org/non-wrapper}GetPerson<http://camel.apache.org/non-wrapper%7DPersonService#%7Bhttp://camel.apache.org/non-wrapper%7DGetPerson>has thrown exception, unwinding now
>> org.apache.cxf.interceptor.Fault: Could not send Message.
>>     at
>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
>>     at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
>>     at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:484)
>>     at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:310)
>>     at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:262)
>>     at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>     at
>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>>     at $Proxy51.getPerson(Unknown Source)
>>     at
>> com.awl.wlsi.example.eai.in.IncommingRouteTest.process(IncommingRouteTest.java:50)
>>     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)
>> Caused by: java.net.SocketTimeoutException: SocketTimeoutException invoking
>> http://localhost:8181/Services/PersonService: Read timed out
>>     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:513)
>>     at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:2011)
>>     at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1992)
>>     at
>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>     at
>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:640)
>>     at
>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>     ... 30 more
>> Caused by: java.net.SocketTimeoutException: Read timed out
>>     at java.net.SocketInputStream.socketRead0(Native Method)
>>     at java.net.SocketInputStream.read(SocketInputStream.java:129)
>>     at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
>>     at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
>>     at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
>>     at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
>>     at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
>>     at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
>>     at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
>>     at
>> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1072)
>>     at
>> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
>>     at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2110)
>>     at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2087)
>>     at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1985)
>>     ... 33 more
>> 2010-07-05 16:08:41,497 [main           ] DEBUG
>> IncommingRouteTest             - tearDown test
>> 2010-07-05 16:08:41,497 [main           ] TRACE
>> ServiceHelper                  - Stopping service
>> org.apache.camel.impl.ProducerCache@89949a
>>
>> Any idea? I could also provide my other code, if it's required...
>>
>> Thanks in advance,
>> Christian
>>
> 



Re: My camel-CXF tests fails, if they run together

Posted by Christian Müller <ch...@gmail.com>.
Hello Willem, hello Christian!

Thanks a lot for your help. I modified my setUpBeforeClass method to:

    @BeforeClass
    public static void setUpBeforeClass() {
        // start a simple CXF server
        ServerFactoryBean svrBean = new ServerFactoryBean();
        svrBean.setAddress("http://localhost:8181/PersonService");
        svrBean.setServiceClass(Person.class);
        svrBean.setBus(CXFBusFactory.getDefaultBus());
        svrBean.create();

        URL wsdlURL =
IncommingRouteTest.class.getClassLoader().getResource("META-INF/wlsi/person-non-wrapper.wsdl");
        PersonService ss = new PersonService(wsdlURL, new QName("
http://camel.apache.org/non-wrapper", "PersonService"));
        client = ss.getSoap();
    }

and now it works. :o)

Thanks,
Christian

Re: My camel-CXF tests fails, if they run together

Posted by Willem Jiang <wi...@gmail.com>.
Hi Christian,

I think the better solution is start the CXF server once in the 
@BeforeClass method.

If you take a look the unit tests of camel-cxf, we will find there are 
lots of tests still use Camel JUnit helper class :)

Willem
----------------------------------
Apache Camel, Apache CXF committer
Open SOA http://www.fusesource.com
Blog http://willemjiang.blogspot.com
Tiwtter http://twitter.com/willemjiang

Christian Müller wrote:
> Hello Christian, hello Willem!
> 
> I extract the creation of the client in a 'setUpBeforeClass' method, so that
> the client is only initialized once:
> 
>     @BeforeClass
>     public static void setUpBeforeClass() throws Exception {
>         URL wsdlURL =
> IncommingRouteTest.class.getClassLoader().getResource("META-INF/wlsi/person-non-wrapper.wsdl");
>         PersonService ss = new PersonService(wsdlURL, new QName("
> http://camel.apache.org/non-wrapper", "PersonService"));
>         client = ss.getSoap();
>     }
> 
> But I still have the same behavior (because of the reason Willem mentioned).
> My knowledge is, that the Camel JUnit helper classes always create a new
> camel context after each test. This means for my test, I can not use the
> Camel JUnit helper classes?
> 
> Regards,
> Christian
> 


Re: My camel-CXF tests fails, if they run together

Posted by Christian Schneider <ch...@die-schneider.net>.
  You could simply use a default spring junit 4 test. I think there the 
default is to reuse the spring context.
I have done such a test in SoapCxfServerTest:
http://svn.apache.org/repos/asf/camel/trunk/components/camel-soap/src/test/java/org/apache/camel/dataformat/soap/SoapCxfServerTest.java

Greetings

Christian

Am 06.07.2010 17:55, schrieb Christian Müller:
> Hello Christian, hello Willem!
>
> I extract the creation of the client in a 'setUpBeforeClass' method, so that
> the client is only initialized once:
>
>      @BeforeClass
>      public static void setUpBeforeClass() throws Exception {
>          URL wsdlURL =
> IncommingRouteTest.class.getClassLoader().getResource("META-INF/wlsi/person-non-wrapper.wsdl");
>          PersonService ss = new PersonService(wsdlURL, new QName("
> http://camel.apache.org/non-wrapper", "PersonService"));
>          client = ss.getSoap();
>      }
>
> But I still have the same behavior (because of the reason Willem mentioned).
> My knowledge is, that the Camel JUnit helper classes always create a new
> camel context after each test. This means for my test, I can not use the
> Camel JUnit helper classes?
>
> Regards,
> Christian
>

-- 
----
http://www.liquid-reality.de


Re: My camel-CXF tests fails, if they run together

Posted by Christian Müller <ch...@gmail.com>.
Hello Christian, hello Willem!

I extract the creation of the client in a 'setUpBeforeClass' method, so that
the client is only initialized once:

    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        URL wsdlURL =
IncommingRouteTest.class.getClassLoader().getResource("META-INF/wlsi/person-non-wrapper.wsdl");
        PersonService ss = new PersonService(wsdlURL, new QName("
http://camel.apache.org/non-wrapper", "PersonService"));
        client = ss.getSoap();
    }

But I still have the same behavior (because of the reason Willem mentioned).
My knowledge is, that the Camel JUnit helper classes always create a new
camel context after each test. This means for my test, I can not use the
Camel JUnit helper classes?

Regards,
Christian

Re: My camel-CXF tests fails, if they run together

Posted by Christian Schneider <ch...@die-schneider.net>.
  Hi Christian,

you are doing some setup in your @Before method. This method will be 
called before each test method. Is this what you intend?
If you only want the code to be executed once you should try @BeforeClass.

Greetings

Christian


Am 05.07.2010 16:39, schrieb Christian Müller:
> After some additional tests it looks like, that each second test fails
> because of this. If I run all tests, number one succeed, number two fails,
> number three succeed and number four fails. If I comment number number two,
> number three fails and number four succeed. If I comment number two and
> three, number four succeed. Very strange...
>
> Regards,
> Christian
>
> On Mon, Jul 5, 2010 at 4:21 PM, Christian Müller<
> christian.mueller@gmail.com>  wrote:
>
>> Hello list,
>>
>> I using Apache Camel 2.2.0-fuse-01-00 and I have trouble to run my four
>> unit tests. If I run each test separate (annotate the other tests with
>> @Ignore or run only one test method in my IDE) all tests succeed. But if I
>> run all tests together (one test after the others) with Maven or in my IDE,
>> I receive a java.net.SocketTimeoutException. Unfortunately I have no idea,
>> where the side effect is.
>>
>> My test looks as following:
>> public class IncommingRouteTest extends CamelSpringTestSupport {
>>
>>      private Person client;
>>
>>      @EndpointInject(uri = "mock:result")
>>      private MockEndpoint queueEndpoint;
>>
>>      @EndpointInject(uri = "mock:error")
>>      private MockEndpoint errorEndpoint;
>>
>>      @Before
>>      public void setUp() throws Exception {
>>          disableJMX();
>>
>>          super.setUp();
>>
>>          URL wsdlURL =
>> IncommingRouteTest.class.getClassLoader().getResource("META-INF/wlsi/person-non-wrapper.wsdl");
>>          PersonService ss = new PersonService(wsdlURL, new QName("
>> http://camel.apache.org/non-wrapper", "PersonService"));
>>          client = ss.getSoap();
>>      }
>>
>>      @Test
>>      public void process() throws Exception {
>>          queueEndpoint.expectedMessageCount(1);
>>
>> queueEndpoint.expectedBodiesReceived("com.awl.wlsi.example.eai.service.types.GetPerson[personId='1']");
>>          errorEndpoint.expectedMessageCount(0);
>>
>>          GetPerson request = new GetPerson();
>>          request.setPersonId("1");
>>          GetPersonResponse response = client.getPerson(request);
>>
>>          assertEquals("1", response.getPersonId());
>>          assertEquals("Christian Mueller", response.getName());
>>          assertEquals("123", response.getSsn());
>>
>>          queueEndpoint.assertIsSatisfied();
>>          errorEndpoint.assertIsSatisfied();
>>      }
>>
>>      @Test
>>      public void processIrrecoverableExceptionForUnknowPerson() throws
>> Exception {
>>          queueEndpoint.expectedMessageCount(1);
>>
>> queueEndpoint.expectedBodiesReceived("com.awl.wlsi.example.eai.service.types.GetPerson[personId='?']");
>>          errorEndpoint.expectedMessageCount(0);
>>
>>          GetPerson request = new GetPerson();
>>          request.setPersonId("?");
>>
>>          try {
>>              client.getPerson(request);
>>              fail("We expect to get the UnknowPersonFault here");
>>          } catch (UnknownPersonFault fault) {
>>              // We expect to get fault here
>>              assertEquals("Receive an invalid personId: '?'",
>> fault.getMessage());
>>          }
>>
>>          queueEndpoint.assertIsSatisfied();
>>          errorEndpoint.assertIsSatisfied();
>>      }
>>
>>      @Test
>>      public void processRecoverableExceptionForUnknowPerson() throws
>> Exception {
>>          queueEndpoint.expectedMessageCount(1);
>>
>> queueEndpoint.expectedBodiesReceived("com.awl.wlsi.example.eai.service.types.GetPerson[personId='5']");
>>          errorEndpoint.expectedMessageCount(1);
>>
>>          GetPerson request = new GetPerson();
>>          request.setPersonId("5");
>>
>>          try {
>>              client.getPerson(request);
>>              fail("We expect to get the SOAPFaultException here");
>>          } catch (SOAPFaultException fault) {
>>              // We expect to get fault here
>>              assertEquals("Recoverable exception", fault.getMessage());
>>          }
>>
>>          queueEndpoint.assertIsSatisfied();
>>          errorEndpoint.assertIsSatisfied();
>>      }
>>
>>      @Test
>>      public void processInvalidRequest() throws Exception {
>>          queueEndpoint.expectedMessageCount(0);
>>          errorEndpoint.expectedMessageCount(0);
>>
>>          GetPerson request = new GetPerson();
>>          request.setPersonId("tooooooooooooooooooooooo long");
>>
>>          try {
>>              client.getPerson(request);
>>              fail("We expect to get a message schema validation
>> failure");
>>          } catch (Exception ex) {
>>              // We expect to get fault here
>>              assertEquals("Unmarshalling Error: cvc-maxLength-valid: Value
>> 'tooooooooooooooooooooooo long' with length = '29' is not facet-valid with
>> respect to maxLength '10' for type 'personId'. ", ex.getMessage());
>>          }
>>
>>          queueEndpoint.assertIsSatisfied();
>>          errorEndpoint.assertIsSatisfied();
>>      }
>>
>>      @Override
>>      protected ClassPathXmlApplicationContext createApplicationContext() {
>>          return new ClassPathXmlApplicationContext(new
>> String[]{"META-INF/spring/bundle-context.xml",
>> "META-INF/spring/bundle-context-test.xml"});
>>      }
>>
>>      @Override
>>      protected int getExpectedRouteCount() {
>>          return 0;
>>      }
>> }
>>
>>
>> stack trace:
>> 2010-07-05 16:07:40,963 [main           ] DEBUG
>> DefaultCamelContext            - ... Routes started
>> 2010-07-05 16:07:40,963 [main           ] INFO
>> DefaultCamelContext            - Started 3 routes
>> 2010-07-05 16:07:40,963 [main           ] INFO
>> DefaultCamelContext            - Apache Camel 2.2.0-fuse-01-00
>> (CamelContext:camelContext) started
>> 2010-07-05 16:07:40,963 [main           ] DEBUG
>> IncommingRouteTest             - Camel Routes:
>> [EventDrivenConsumerRoute[Endpoint[
>> http://localhost:8181/Services/PersonService] ->
>> Instrumentation:route[UnitOfWork(Channel[Multicast[[Channel[sendTo(Endpoint[direct://queue])],
>> Channel[sendTo(Endpoint[direct://processor])]]]])]],
>> EventDrivenConsumerRoute[Endpoint[direct://queue] ->
>> Instrumentation:route[UnitOfWork(Pipeline[Channel[com.awl.wlsi.example.eai.in.IncommingRoute$1@b3a5d1],
>> Channel[sendTo(Endpoint[mock://result] InOnly)]])]],
>> EventDrivenConsumerRoute[Endpoint[direct://processor] ->
>> Instrumentation:route[UnitOfWork(Channel[com.awl.wlsi.example.eai.in.PersonProcessor@139ef3a
>> ])]]]
>> 2010-07-05 16:07:40,963 [main           ] TRACE
>> CamelBeanPostProcessor         - Camel bean processing before initialization
>> for bean: this
>> 2010-07-05 16:07:40,963 [main           ] TRACE
>> DefaultCamelContext            - Getting endpoint with uri: mock://result
>> 2010-07-05 16:07:40,963 [main           ] TRACE
>> DefaultCamelContext            - Getting endpoint with uri: mock://error
>> 2010-07-05 16:07:40,963 [main           ] DEBUG
>> IncommingRouteTest             - Using created route builder: Routes: []
>> 2010-07-05 16:07:40,963 [main           ] DEBUG
>> DefaultCamelContext            - Adding routes from builder: Routes: []
>> 2010-07-05 16:07:40,963 [main           ] DEBUG
>> IncommingRouteTest             - Routing Rules are:
>> [EventDrivenConsumerRoute[Endpoint[
>> http://localhost:8181/Services/PersonService] ->
>> Instrumentation:route[UnitOfWork(Channel[Multicast[[Channel[sendTo(Endpoint[direct://queue])],
>> Channel[sendTo(Endpoint[direct://processor])]]]])]],
>> EventDrivenConsumerRoute[Endpoint[direct://queue] ->
>> Instrumentation:route[UnitOfWork(Pipeline[Channel[com.awl.wlsi.example.eai.in.IncommingRoute$1@b3a5d1],
>> Channel[sendTo(Endpoint[mock://result] InOnly)]])]],
>> EventDrivenConsumerRoute[Endpoint[direct://processor] ->
>> Instrumentation:route[UnitOfWork(Channel[com.awl.wlsi.example.eai.in.PersonProcessor@139ef3a
>> ])]]]
>> 2010-07-05 16:07:40,963 [main           ] DEBUG
>> IncommingRouteTest             - Routing Rules are:
>> [EventDrivenConsumerRoute[Endpoint[
>> http://localhost:8181/Services/PersonService] ->
>> Instrumentation:route[UnitOfWork(Channel[Multicast[[Channel[sendTo(Endpoint[direct://queue])],
>> Channel[sendTo(Endpoint[direct://processor])]]]])]],
>> EventDrivenConsumerRoute[Endpoint[direct://queue] ->
>> Instrumentation:route[UnitOfWork(Pipeline[Channel[com.awl.wlsi.example.eai.in.IncommingRoute$1@b3a5d1],
>> Channel[sendTo(Endpoint[mock://result] InOnly)]])]],
>> EventDrivenConsumerRoute[Endpoint[direct://processor] ->
>> Instrumentation:route[UnitOfWork(Channel[com.awl.wlsi.example.eai.in.PersonProcessor@139ef3a
>> ])]]]
>> 05.07.2010 16:07:40
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
>> buildServiceFromWSDL
>> INFO: Creating Service {http://camel.apache.org/non-wrapper}PersonService<http://camel.apache.org/non-wrapper%7DPersonService>from WSDL:
>> file:/D:/workspaceWLSI/wlsi/examples/wlsi-example-eai/wlsi-example-eai-incomming/target/classes/META-INF/wlsi/person-non-wrapper.wsdl
>> 05.07.2010 16:08:41 org.apache.cxf.phase.PhaseInterceptorChain
>> doDefaultLogging
>> WARNUNG: Interceptor for {
>> http://camel.apache.org/non-wrapper}PersonService#{http://camel.apache.org/non-wrapper}GetPerson<http://camel.apache.org/non-wrapper%7DPersonService#%7Bhttp://camel.apache.org/non-wrapper%7DGetPerson>has thrown exception, unwinding now
>> org.apache.cxf.interceptor.Fault: Could not send Message.
>>      at
>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
>>      at
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
>>      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:484)
>>      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:310)
>>      at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:262)
>>      at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>>      at
>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>>      at $Proxy51.getPerson(Unknown Source)
>>      at
>> com.awl.wlsi.example.eai.in.IncommingRouteTest.process(IncommingRouteTest.java:50)
>>      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)
>> Caused by: java.net.SocketTimeoutException: SocketTimeoutException invoking
>> http://localhost:8181/Services/PersonService: Read timed out
>>      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:513)
>>      at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:2011)
>>      at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1992)
>>      at
>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>>      at
>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:640)
>>      at
>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>>      ... 30 more
>> Caused by: java.net.SocketTimeoutException: Read timed out
>>      at java.net.SocketInputStream.socketRead0(Native Method)
>>      at java.net.SocketInputStream.read(SocketInputStream.java:129)
>>      at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
>>      at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
>>      at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
>>      at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
>>      at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
>>      at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
>>      at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
>>      at
>> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1072)
>>      at
>> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
>>      at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2110)
>>      at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2087)
>>      at
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1985)
>>      ... 33 more
>> 2010-07-05 16:08:41,497 [main           ] DEBUG
>> IncommingRouteTest             - tearDown test
>> 2010-07-05 16:08:41,497 [main           ] TRACE
>> ServiceHelper                  - Stopping service
>> org.apache.camel.impl.ProducerCache@89949a
>>
>> Any idea? I could also provide my other code, if it's required...
>>
>> Thanks in advance,
>> Christian
>>

-- 
----
http://www.liquid-reality.de


Re: My camel-CXF tests fails, if they run together

Posted by Christian Müller <ch...@gmail.com>.
After some additional tests it looks like, that each second test fails
because of this. If I run all tests, number one succeed, number two fails,
number three succeed and number four fails. If I comment number number two,
number three fails and number four succeed. If I comment number two and
three, number four succeed. Very strange...

Regards,
Christian

On Mon, Jul 5, 2010 at 4:21 PM, Christian Müller <
christian.mueller@gmail.com> wrote:

> Hello list,
>
> I using Apache Camel 2.2.0-fuse-01-00 and I have trouble to run my four
> unit tests. If I run each test separate (annotate the other tests with
> @Ignore or run only one test method in my IDE) all tests succeed. But if I
> run all tests together (one test after the others) with Maven or in my IDE,
> I receive a java.net.SocketTimeoutException. Unfortunately I have no idea,
> where the side effect is.
>
> My test looks as following:
> public class IncommingRouteTest extends CamelSpringTestSupport {
>
>     private Person client;
>
>     @EndpointInject(uri = "mock:result")
>     private MockEndpoint queueEndpoint;
>
>     @EndpointInject(uri = "mock:error")
>     private MockEndpoint errorEndpoint;
>
>     @Before
>     public void setUp() throws Exception {
>         disableJMX();
>
>         super.setUp();
>
>         URL wsdlURL =
> IncommingRouteTest.class.getClassLoader().getResource("META-INF/wlsi/person-non-wrapper.wsdl");
>         PersonService ss = new PersonService(wsdlURL, new QName("
> http://camel.apache.org/non-wrapper", "PersonService"));
>         client = ss.getSoap();
>     }
>
>     @Test
>     public void process() throws Exception {
>         queueEndpoint.expectedMessageCount(1);
>
> queueEndpoint.expectedBodiesReceived("com.awl.wlsi.example.eai.service.types.GetPerson[personId='1']");
>         errorEndpoint.expectedMessageCount(0);
>
>         GetPerson request = new GetPerson();
>         request.setPersonId("1");
>         GetPersonResponse response = client.getPerson(request);
>
>         assertEquals("1", response.getPersonId());
>         assertEquals("Christian Mueller", response.getName());
>         assertEquals("123", response.getSsn());
>
>         queueEndpoint.assertIsSatisfied();
>         errorEndpoint.assertIsSatisfied();
>     }
>
>     @Test
>     public void processIrrecoverableExceptionForUnknowPerson() throws
> Exception {
>         queueEndpoint.expectedMessageCount(1);
>
> queueEndpoint.expectedBodiesReceived("com.awl.wlsi.example.eai.service.types.GetPerson[personId='?']");
>         errorEndpoint.expectedMessageCount(0);
>
>         GetPerson request = new GetPerson();
>         request.setPersonId("?");
>
>         try {
>             client.getPerson(request);
>             fail("We expect to get the UnknowPersonFault here");
>         } catch (UnknownPersonFault fault) {
>             // We expect to get fault here
>             assertEquals("Receive an invalid personId: '?'",
> fault.getMessage());
>         }
>
>         queueEndpoint.assertIsSatisfied();
>         errorEndpoint.assertIsSatisfied();
>     }
>
>     @Test
>     public void processRecoverableExceptionForUnknowPerson() throws
> Exception {
>         queueEndpoint.expectedMessageCount(1);
>
> queueEndpoint.expectedBodiesReceived("com.awl.wlsi.example.eai.service.types.GetPerson[personId='5']");
>         errorEndpoint.expectedMessageCount(1);
>
>         GetPerson request = new GetPerson();
>         request.setPersonId("5");
>
>         try {
>             client.getPerson(request);
>             fail("We expect to get the SOAPFaultException here");
>         } catch (SOAPFaultException fault) {
>             // We expect to get fault here
>             assertEquals("Recoverable exception", fault.getMessage());
>         }
>
>         queueEndpoint.assertIsSatisfied();
>         errorEndpoint.assertIsSatisfied();
>     }
>
>     @Test
>     public void processInvalidRequest() throws Exception {
>         queueEndpoint.expectedMessageCount(0);
>         errorEndpoint.expectedMessageCount(0);
>
>         GetPerson request = new GetPerson();
>         request.setPersonId("tooooooooooooooooooooooo long");
>
>         try {
>             client.getPerson(request);
>             fail("We expect to get a message schema validation
> failure");
>         } catch (Exception ex) {
>             // We expect to get fault here
>             assertEquals("Unmarshalling Error: cvc-maxLength-valid: Value
> 'tooooooooooooooooooooooo long' with length = '29' is not facet-valid with
> respect to maxLength '10' for type 'personId'. ", ex.getMessage());
>         }
>
>         queueEndpoint.assertIsSatisfied();
>         errorEndpoint.assertIsSatisfied();
>     }
>
>     @Override
>     protected ClassPathXmlApplicationContext createApplicationContext() {
>         return new ClassPathXmlApplicationContext(new
> String[]{"META-INF/spring/bundle-context.xml",
> "META-INF/spring/bundle-context-test.xml"});
>     }
>
>     @Override
>     protected int getExpectedRouteCount() {
>         return 0;
>     }
> }
>
>
> stack trace:
> 2010-07-05 16:07:40,963 [main           ] DEBUG
> DefaultCamelContext            - ... Routes started
> 2010-07-05 16:07:40,963 [main           ] INFO
> DefaultCamelContext            - Started 3 routes
> 2010-07-05 16:07:40,963 [main           ] INFO
> DefaultCamelContext            - Apache Camel 2.2.0-fuse-01-00
> (CamelContext:camelContext) started
> 2010-07-05 16:07:40,963 [main           ] DEBUG
> IncommingRouteTest             - Camel Routes:
> [EventDrivenConsumerRoute[Endpoint[
> http://localhost:8181/Services/PersonService] ->
> Instrumentation:route[UnitOfWork(Channel[Multicast[[Channel[sendTo(Endpoint[direct://queue])],
> Channel[sendTo(Endpoint[direct://processor])]]]])]],
> EventDrivenConsumerRoute[Endpoint[direct://queue] ->
> Instrumentation:route[UnitOfWork(Pipeline[Channel[com.awl.wlsi.example.eai.in.IncommingRoute$1@b3a5d1],
> Channel[sendTo(Endpoint[mock://result] InOnly)]])]],
> EventDrivenConsumerRoute[Endpoint[direct://processor] ->
> Instrumentation:route[UnitOfWork(Channel[com.awl.wlsi.example.eai.in.PersonProcessor@139ef3a
> ])]]]
> 2010-07-05 16:07:40,963 [main           ] TRACE
> CamelBeanPostProcessor         - Camel bean processing before initialization
> for bean: this
> 2010-07-05 16:07:40,963 [main           ] TRACE
> DefaultCamelContext            - Getting endpoint with uri: mock://result
> 2010-07-05 16:07:40,963 [main           ] TRACE
> DefaultCamelContext            - Getting endpoint with uri: mock://error
> 2010-07-05 16:07:40,963 [main           ] DEBUG
> IncommingRouteTest             - Using created route builder: Routes: []
> 2010-07-05 16:07:40,963 [main           ] DEBUG
> DefaultCamelContext            - Adding routes from builder: Routes: []
> 2010-07-05 16:07:40,963 [main           ] DEBUG
> IncommingRouteTest             - Routing Rules are:
> [EventDrivenConsumerRoute[Endpoint[
> http://localhost:8181/Services/PersonService] ->
> Instrumentation:route[UnitOfWork(Channel[Multicast[[Channel[sendTo(Endpoint[direct://queue])],
> Channel[sendTo(Endpoint[direct://processor])]]]])]],
> EventDrivenConsumerRoute[Endpoint[direct://queue] ->
> Instrumentation:route[UnitOfWork(Pipeline[Channel[com.awl.wlsi.example.eai.in.IncommingRoute$1@b3a5d1],
> Channel[sendTo(Endpoint[mock://result] InOnly)]])]],
> EventDrivenConsumerRoute[Endpoint[direct://processor] ->
> Instrumentation:route[UnitOfWork(Channel[com.awl.wlsi.example.eai.in.PersonProcessor@139ef3a
> ])]]]
> 2010-07-05 16:07:40,963 [main           ] DEBUG
> IncommingRouteTest             - Routing Rules are:
> [EventDrivenConsumerRoute[Endpoint[
> http://localhost:8181/Services/PersonService] ->
> Instrumentation:route[UnitOfWork(Channel[Multicast[[Channel[sendTo(Endpoint[direct://queue])],
> Channel[sendTo(Endpoint[direct://processor])]]]])]],
> EventDrivenConsumerRoute[Endpoint[direct://queue] ->
> Instrumentation:route[UnitOfWork(Pipeline[Channel[com.awl.wlsi.example.eai.in.IncommingRoute$1@b3a5d1],
> Channel[sendTo(Endpoint[mock://result] InOnly)]])]],
> EventDrivenConsumerRoute[Endpoint[direct://processor] ->
> Instrumentation:route[UnitOfWork(Channel[com.awl.wlsi.example.eai.in.PersonProcessor@139ef3a
> ])]]]
> 05.07.2010 16:07:40
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean
> buildServiceFromWSDL
> INFO: Creating Service {http://camel.apache.org/non-wrapper}PersonService<http://camel.apache.org/non-wrapper%7DPersonService>from WSDL:
> file:/D:/workspaceWLSI/wlsi/examples/wlsi-example-eai/wlsi-example-eai-incomming/target/classes/META-INF/wlsi/person-non-wrapper.wsdl
> 05.07.2010 16:08:41 org.apache.cxf.phase.PhaseInterceptorChain
> doDefaultLogging
> WARNUNG: Interceptor for {
> http://camel.apache.org/non-wrapper}PersonService#{http://camel.apache.org/non-wrapper}GetPerson<http://camel.apache.org/non-wrapper%7DPersonService#%7Bhttp://camel.apache.org/non-wrapper%7DGetPerson>has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: Could not send Message.
>     at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
>     at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
>     at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:484)
>     at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:310)
>     at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:262)
>     at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
>     at
> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:124)
>     at $Proxy51.getPerson(Unknown Source)
>     at
> com.awl.wlsi.example.eai.in.IncommingRouteTest.process(IncommingRouteTest.java:50)
>     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)
> Caused by: java.net.SocketTimeoutException: SocketTimeoutException invoking
> http://localhost:8181/Services/PersonService: Read timed out
>     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:513)
>     at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:2011)
>     at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1992)
>     at
> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
>     at
> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:640)
>     at
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
>     ... 30 more
> Caused by: java.net.SocketTimeoutException: Read timed out
>     at java.net.SocketInputStream.socketRead0(Native Method)
>     at java.net.SocketInputStream.read(SocketInputStream.java:129)
>     at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
>     at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
>     at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
>     at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
>     at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
>     at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:766)
>     at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
>     at
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1072)
>     at
> java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
>     at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2110)
>     at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2087)
>     at
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1985)
>     ... 33 more
> 2010-07-05 16:08:41,497 [main           ] DEBUG
> IncommingRouteTest             - tearDown test
> 2010-07-05 16:08:41,497 [main           ] TRACE
> ServiceHelper                  - Stopping service
> org.apache.camel.impl.ProducerCache@89949a
>
> Any idea? I could also provide my other code, if it's required...
>
> Thanks in advance,
> Christian
>