any news on topic ?? I believe I get same error in failover situation, my configuration (I tested both my endpoints are working by commenting them out one by one):
<from uri="cxf://http://0.0.0.0:8081/fooServer/echo?wsdlURL=http://localhost:8080/fooServer1-0.0.1a-SNAPSHOT/echo?wsdl&serviceName={http://www.telecats.nl/nl.telecats.bvibluenode.adt.server-push.fooService}EchoService&portName={http://www.telecats.nl/nl.telecats.bvibluenode.adt.server-push.fooService}EchoServiceImplPort&dataFormat=MESSAGE" /> <loadBalance> <failover> <exception>java.lang.Exception</exception> <exception>java.io.IOException</exception> </failover> <!-- first --> <to uri="cxf://http://localhost:8080/fooServer1-0.0.1a-SNAPSHOT/echo?wsdlURL=http://localhost:8080/fooServer1-0.0.1a-SNAPSHOT/echo?wsdl&serviceName={http://www.telecats.nl/nl.telecats.bvibluenode.adt.server-push.fooService}EchoService&portName={http://www.telecats.nl/nl.telecats.bvibluenode.adt.server-push.fooService}EchoServiceImplPort&dataFormat=MESSAGE" /> <!-- second --> <to uri="cxf://http://localhost:8080/fooServer1-0.0.1b-SNAPSHOT/echo?wsdlURL=http://localhost:8080/fooServer1-0.0.1b-SNAPSHOT/echo?wsdl&serviceName={http://www.telecats.nl/nl.telecats.bvibluenode.adt.server-push.fooService}EchoService&portName={http://www.telecats.nl/nl.telecats.bvibluenode.adt.server-push.fooService}EchoServiceImplPort&dataFormat=MESSAGE" /> </loadBalance> </route> When I disable the first TO destination by removing the war file from tomcat, camel doesn't correctly failover but throws exception below: ... Mar 15, 2010 8:11:05 PM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging WARNING: Interceptor for {http://www.telecats.nl/nl.telecats.bvibluenode.adt.server-push.fooService}EchoService has thrown exception, unwinding now org.apache.cxf.interceptor.Fault: Already connected at org.apache.camel.component.cxf.CxfConsumer$1.invoke(CxfConsumer.java:101) at org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:58) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) ... Caused by: java.lang.IllegalStateException: Already connected at java.net.HttpURLConnection.setFixedLengthStreamingMode(HttpURLConnection.java:121) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.thresholdNotReached(HTTPConduit.java:1888) at org.apache.cxf.io.AbstractThresholdOutputStream.close(AbstractThresholdOutputStream.java:99) at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1979) ... Currently I have no idea what causes this, any hints ? willem.jiang wrote: > > Hi, > Can you fill a JIRA [1] and attach your test case with it ? > I will debug it when I get time. > > [1]https://issues.apache.org/activemq/browse/CAMEL > > Willem > > mta38 wrote: >> Hi Willem, >> I tried my code with Camel 1.5 and cxf 2.13 and the problem staying >> alive. >> I'm still working on that problem >> Mta38 >> >> >> willem.jiang wrote: >>> Hi >>> >>> It's looks like a CXF HTTPConduit bug, which version of CXF and Camel >>> are you using? >>> Can you invoke the service with a normal CXF client ? >>> >>> Willem >>> >>> mta38 wrote: >>>> Hi all, >>>> I have some trouble with Camel rout to cxf endpoint. >>>> I have implemented a web service and publish it using cxf api. The >>>> following >>>> snipset is my code to start web service: >>>> >>>> JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean(); >>>> sf.setServiceBean(new ClientFixeImpl()); >>>> address = props.getProperty("http://localhost:8000/service/client"); >>>> sf.setAddress(address); >>>> service = sf.create(); >>>> >>>> The service is published; I can invoke it in an internet Browser. But >>>> when I >>>> try to send a message to that web service using a camel route : >>>> >>>> <camel:camelContext id="camelContext"> >>>> <camel:route> >>>> <camel:from uri="direct:start"/> >>>> <camel:to uri="cxf:bean:endpointFixeProvider"/> >>>> </camel:route> >>>> </camel:camelContext> >>>> >>>> Where " endpointFixeProvider" is defined like that : >>>> >>>> >>>> <cxf:cxfEndpoint id="endpointFixeProvider" >>>> serviceClass="org.example.clientfixe.ClientFixe" >>>> address="http://localhost:8001/ClientFixeSOAP" >>>> wsdlURL="wsdl/ClientFixe-1.0.wsdl" >>>> endpointName="s:ClientFixeSOAP" >>>> serviceName="s:ClientFixe" >>>> xmlns:s="http://www.example.org/ClientFixe/"> >>>> <cxf:properties> >>>> <entry key="dataFormat" value="MESSAGE"></entry> >>>> </cxf:properties> >>>> >>>> </cxf:cxfEndpoint> >>>> >>>> >>>> I have the following error: >>>> INFO: Interceptor has thrown exception, unwinding now >>>> java.lang.IllegalStateException: Already connected >>>> at >>>> java.net.HttpURLConnection.setFixedLengthStreamingMode(HttpURLConnection.java:100) >>>> at >>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.thresholdNotReached(HTTPConduit.java:1774) >>>> at >>>> org.apache.cxf.io.AbstractThresholdOutputStream.close(AbstractThresholdOutputStream.java:99) >>>> at >>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1859) >>>> at >>>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66) >>>> at >>>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:593) >>>> at >>>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) >>>> at >>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220) >>>> at >>>> org.apache.camel.component.cxf.invoker.CxfClient.invokeWithMessageStream(CxfClient.java:132) >>>> at >>>> org.apache.camel.component.cxf.invoker.CxfClient.dispatch(CxfClient.java:75) >>>> at >>>> org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:251) >>>> at >>>> org.apache.camel.component.cxf.CxfProducer.process(CxfProducer.java:176) >>>> at >>>> org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:43) >>>> at >>>> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:75) >>>> at >>>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:57) >>>> at >>>> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:155) >>>> at >>>> org.apache.camel.processor.DeadLetterChannel.process(DeadLetterChannel.java:91) >>>> at >>>> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:57) >>>> at >>>> org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:39) >>>> at >>>> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:41) >>>> at >>>> org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:66) >>>> at >>>> org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:47) >>>> at >>>> org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:149) >>>> at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:86) >>>> at >>>> org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:84) >>>> at >>>> org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:143) >>>> at >>>> org.apache.camel.impl.DefaultProducerTemplate.sendBodyAndHeaders(DefaultProducerTemplate.java:139) >>>> at >>>> adapter.camel.CamelServiceAdapter.sendSync(CamelServiceAdapter.java:147) >>>> at org.example.client.ClientImpl.soldeClient(ClientImpl.java:91) >>>> >>>> >>>> Is someone have an idea? :confused: >>>> Thanks in Advance, >>>> Mta38 >>>> >>> >>> >> > > > -- View this message in context: http://old.nabble.com/%22Already-Connected%22-message-when-try-to-route-to-cxf-web-service-tp21028941p27909068.html Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.