java.util.zip.ZipException: error in opening zip file
Hi everybody, I’m using Camel 2.14.1, mainly to use a timer and an http consumer (URL_FLEET_HISTORY), as shown on the following Java code: @Override public void configure() throws Exception { from(timer:ws?period= + period) .process(new Processor() { @Override public void process(Exchange exchange) throws Exception { Calendar cal = Calendar.getInstance(); System.out.println(Searching new data @ + cal.getTime()); cal.add(Calendar.HOUR, -48); System.out.println(Since + cal.getTime()); String lastReport = LAST_REPORT_DATE_FORMAT.format(cal .getTime()); exchange.getOut().setHeader(lastReport, lastReport); } }) .recipientList( simple(URL_FLEET_HISTORY + USERNAME + SLASH + PASSWORD + SLASH + ${header.lastReport})) .convertBodyTo(String.class) .log(LoggingLevel.INFO, logger, Data Received: ${body}) .split().tokenizePair(Heading, /Status, true) .process(new LocationProcessor()); } I’m also using org.apache.camel.main.Main to run the process as a command line forever running kind of daemon. with this code: public class Listener { public static void main(String[] args) throws Exception { Listener daemon = new Listener(); daemon.boot(); } private Main main; public void boot() throws Exception { // create a Main instance main = new Main(); // enable hangup support so you can press ctrl + c to terminate the JVM main.enableHangupSupport(); // add routes main.addRouteBuilder(new SkyPatrolRouteBuilder()); // run until you terminate the JVM System.out.println(Starting Listener. Use Ctrl + c to terminate.); main.run(); } } After a few days running the HTTP consumer starts to fail consistently with the following stacktrace: 228243785 [Camel (camel-1) thread #0 - timer://ws] timer://ws] ERROR org.apache.camel.processor.DefaultErrorHandler - Failed delivery for (MessageId: ID-Monitor-59190-1424577519856-0-184780 on ExchangeId: ID-Monitor-59190-1424577519856-0-184781). Exhausted after delivery attempt: 1 caught: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: [Body is null]] Message History --- RouteId ProcessorId Processor Elapsed (ms) [route1] [route1] [timer://ws?period=18 ] [ 41 timer://ws?period=18%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0]%20[%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A041] [route1] [process1 ] [cl.waypoint.monitor.skypatrol.SkyPatrolRouteBuilder$1@549b6220 ] [ 1] [route1] [recipientList1] [recipientList[simple{Simple: http://wsp.skypatrol.com/fleet_history/waypointch] http://wsp.skypatrol.com/fleet_history/waypointch] [42] Exchange --- Exchange[ Id ID-Monitor-59190-1424577519856-0-184781 ExchangePattern InOnly Headers {breadcrumbId=ID-Monitor-59190-1424577519856-0-184780, CamelRedelivered=false, CamelRedeliveryCounter=0, lastReport=20150222162243} BodyTypenull Body[Body is null] ] Stacktrace --- org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: [Body is null]] at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1380) at org.apache.camel.impl.DefaultExchange.setException(DefaultExchange.java:283) at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:64) at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:416) at
Re: java.util.zip.ZipException: error in opening zip file
Thanks Claus for such a fast answer! Regarding Java versions, we'll try to install a Java 7 or 8 in that Linux box, but as an alternate approach, which Camel version DOES support Java 6 so we could try that approach too? Atentamente / Regards, Gonzalo Vásquez Sáez gvasq...@waypoint.cl +56 (2) 29634180 Director I+D / RD Director Waypoint Telecomunicaciones S.A. Alfredo Barros Errázuriz 1953 Of. 1004 7500550 Providencia, Santiago, Chile Mapcode: R3.BR El 25-02-2015, a las 11:10, Claus Ibsen claus.ib...@gmail.com escribió: Camel 2.14.x does not support Java 6. You must use Java 7 or 8. On Wed, Feb 25, 2015 at 3:02 PM, Gonzalo Vásquez Sáez gvasq...@waypoint.cl wrote: Hi everybody, I’m using Camel 2.14.1, mainly to use a timer and an http consumer (URL_FLEET_HISTORY), as shown on the following Java code: @Override public void configure() throws Exception { from(timer:ws?period= + period) .process(new Processor() { @Override public void process(Exchange exchange) throws Exception { Calendar cal = Calendar.getInstance(); System.out.println(Searching new data @ + cal.getTime()); cal.add(Calendar.HOUR, -48); System.out.println(Since + cal.getTime()); String lastReport = LAST_REPORT_DATE_FORMAT.format(cal .getTime()); exchange.getOut().setHeader(lastReport, lastReport); } }) .recipientList( simple(URL_FLEET_HISTORY + USERNAME + SLASH + PASSWORD + SLASH + ${header.lastReport})) .convertBodyTo(String.class) .log(LoggingLevel.INFO, logger, Data Received: ${body}) .split().tokenizePair(Heading, /Status, true) .process(new LocationProcessor()); } I’m also using org.apache.camel.main.Main to run the process as a command line forever running kind of daemon. with this code: public class Listener { public static void main(String[] args) throws Exception { Listener daemon = new Listener(); daemon.boot(); } private Main main; public void boot() throws Exception { // create a Main instance main = new Main(); // enable hangup support so you can press ctrl + c to terminate the JVM main.enableHangupSupport(); // add routes main.addRouteBuilder(new SkyPatrolRouteBuilder()); // run until you terminate the JVM System.out.println(Starting Listener. Use Ctrl + c to terminate.); main.run(); } } After a few days running the HTTP consumer starts to fail consistently with the following stacktrace: 228243785 [Camel (camel-1) thread #0 - timer://ws] timer://ws] ERROR org.apache.camel.processor.DefaultErrorHandler - Failed delivery for (MessageId: ID-Monitor-59190-1424577519856-0-184780 on ExchangeId: ID-Monitor-59190-1424577519856-0-184781). Exhausted after delivery attempt: 1 caught: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: [Body is null]] Message History --- RouteId ProcessorId Processor Elapsed (ms) [route1] [route1] [timer://ws?period=18 ] [41 timer://ws?period=18%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0]%20[%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A041] [route1] [process1 ] [cl.waypoint.monitor.skypatrol.SkyPatrolRouteBuilder$1@549b6220 ] [ 1] [route1] [recipientList1] [recipientList[simple{Simple: http://wsp.skypatrol.com/fleet_history/waypointch] http://wsp.skypatrol.com/fleet_history/waypointch] [42] Exchange --- Exchange[ Id ID-Monitor-59190-1424577519856-0-184781 ExchangePattern InOnly Headers {breadcrumbId=ID-Monitor-59190-1424577519856-0-184780, CamelRedelivered=false, CamelRedeliveryCounter=0, lastReport=20150222162243} BodyTypenull Body[Body is null] ] Stacktrace
Re: camel-blueprint.xsd is not updated
anyone? -- View this message in context: http://camel.465427.n5.nabble.com/camel-blueprint-xsd-is-not-updated-tp5763118p5763156.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: java.util.zip.ZipException: error in opening zip file
Camel 2.14.x does not support Java 6. You must use Java 7 or 8. On Wed, Feb 25, 2015 at 3:02 PM, Gonzalo Vásquez Sáez gvasq...@waypoint.cl wrote: Hi everybody, I’m using Camel 2.14.1, mainly to use a timer and an http consumer (URL_FLEET_HISTORY), as shown on the following Java code: @Override public void configure() throws Exception { from(timer:ws?period= + period) .process(new Processor() { @Override public void process(Exchange exchange) throws Exception { Calendar cal = Calendar.getInstance(); System.out.println(Searching new data @ + cal.getTime()); cal.add(Calendar.HOUR, -48); System.out.println(Since + cal.getTime()); String lastReport = LAST_REPORT_DATE_FORMAT.format(cal .getTime()); exchange.getOut().setHeader(lastReport, lastReport); } }) .recipientList( simple(URL_FLEET_HISTORY + USERNAME + SLASH + PASSWORD + SLASH + ${header.lastReport})) .convertBodyTo(String.class) .log(LoggingLevel.INFO, logger, Data Received: ${body}) .split().tokenizePair(Heading, /Status, true) .process(new LocationProcessor()); } I’m also using org.apache.camel.main.Main to run the process as a command line forever running kind of daemon. with this code: public class Listener { public static void main(String[] args) throws Exception { Listener daemon = new Listener(); daemon.boot(); } private Main main; public void boot() throws Exception { // create a Main instance main = new Main(); // enable hangup support so you can press ctrl + c to terminate the JVM main.enableHangupSupport(); // add routes main.addRouteBuilder(new SkyPatrolRouteBuilder()); // run until you terminate the JVM System.out.println(Starting Listener. Use Ctrl + c to terminate.); main.run(); } } After a few days running the HTTP consumer starts to fail consistently with the following stacktrace: 228243785 [Camel (camel-1) thread #0 - timer://ws] timer://ws] ERROR org.apache.camel.processor.DefaultErrorHandler - Failed delivery for (MessageId: ID-Monitor-59190-1424577519856-0-184780 on ExchangeId: ID-Monitor-59190-1424577519856-0-184781). Exhausted after delivery attempt: 1 caught: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: [Body is null]] Message History --- RouteId ProcessorId Processor Elapsed (ms) [route1] [route1] [timer://ws?period=18 ] [41 timer://ws?period=18%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0]%20[%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A041] [route1] [process1 ] [cl.waypoint.monitor.skypatrol.SkyPatrolRouteBuilder$1@549b6220 ] [ 1] [route1] [recipientList1] [recipientList[simple{Simple: http://wsp.skypatrol.com/fleet_history/waypointch] http://wsp.skypatrol.com/fleet_history/waypointch] [42] Exchange --- Exchange[ Id ID-Monitor-59190-1424577519856-0-184781 ExchangePattern InOnly Headers {breadcrumbId=ID-Monitor-59190-1424577519856-0-184780, CamelRedelivered=false, CamelRedeliveryCounter=0, lastReport=20150222162243} BodyTypenull Body[Body is null] ] Stacktrace --- org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: [Body is null]] at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1380) at org.apache.camel.impl.DefaultExchange.setException(DefaultExchange.java:283) at
Re: Upgrading to Camel 2.14.1 and CompositeRegistry issue
Hi This sounds like a mixed versions of Camel on the classpath. So double check that you use the same Camel version for all your camel jars. On Wed, Feb 25, 2015 at 1:18 PM, geppo geppore...@gmail.com wrote: Hi, I'm trying to upgrade some legacy code to use Camel 2.14.1, but I'm getting an AbstractMethodError when the method lookupByNameAndType is called. Any idea what this means and/or how I can fix it? Many thanks! Caused by: org.apache.camel.NoSuchBeanException: Cannot lookup: properties from registry: myUtils.camel.guice.GuiceRegistry@2ba95c45 with expected type: class org.apache.camel.component.properties.PropertiesComponent due: null at org.apache.camel.impl.CompositeRegistry.lookupByNameAndType(CompositeRegistry.java:62) at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookupByNameAndType(PropertyPlaceholderDelegateRegistry.java:63) at org.apache.camel.util.CamelContextHelper.lookupPropertiesComponent(CamelContextHelper.java:492) at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1891) at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1767) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1735) at myUtils.camel.MyService.start(MyService.java:19) ... 5 more Caused by: java.lang.AbstractMethodError at org.apache.camel.impl.CompositeRegistry.lookupByNameAndType(CompositeRegistry.java:56) ... 12 more -- View this message in context: http://camel.465427.n5.nabble.com/Upgrading-to-Camel-2-14-1-and-CompositeRegistry-issue-tp5763152.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
Re: Failover with Camel CXF
Hi, I followed the instructions provided but unable to implement shows the error: [LoadBalanceType[ref:null... because of ref or loadBalancer must be specified. Please find below code snippet and correct me where I go wrong with this. WSDL -- wsdl:service name=OrderEndpointService wsdl:port name=OrderService binding=tns:OrderBinding soap:address location=http://localhost:9000/order; / /wsdl:port wsdl:port name=OrderService binding=tns:OrderBinding soap:address location=http://localhost:9001/order; / /wsdl:port wsdl:port name=OrderService binding=tns:OrderBinding soap:address location=http://localhost:9002/order; / /wsdl:port /wsdl:service -- Endpoint config: cxf:cxfEndpoint id=orderEndpoint address=http://localhost:9000/order/; serviceClass=camelinaction.order.OrderEndpoint wsdlURL=wsdl/order.wsdl /cxf:cxfEndpoint cxf:cxfEndpoint id=orderEndpoint1 address=http://localhost:9001/order/; serviceClass=camelinaction.order.OrderEndpoint wsdlURL=wsdl/order.wsdl /cxf:cxfEndpoint cxf:cxfEndpoint id=orderEndpoint2 address=http://localhost:9002/order/; serviceClass=camelinaction.order.OrderEndpoint wsdlURL=wsdl/order.wsdl /cxf:cxfEndpoint Camel Route: route id=route from ref=orderEndpoint / loadBalance to uri=cxf:bean:orderEndpoint1 / to uri=cxf:bean:orderEndpoint2 / /loadBalance to uri=seda:incomingOrders / transform constantOK/constant /transform /route Appreciate a quick response. Thanks and Regards, Sayed -- View this message in context: http://camel.465427.n5.nabble.com/Failover-with-Camel-CXF-tp5723454p5763151.html Sent from the Camel - Users mailing list archive at Nabble.com.
Upgrading to Camel 2.14.1 and CompositeRegistry issue
Hi, I'm trying to upgrade some legacy code to use Camel 2.14.1, but I'm getting an AbstractMethodError when the method lookupByNameAndType is called. Any idea what this means and/or how I can fix it? Many thanks! Caused by: org.apache.camel.NoSuchBeanException: Cannot lookup: properties from registry: myUtils.camel.guice.GuiceRegistry@2ba95c45 with expected type: class org.apache.camel.component.properties.PropertiesComponent due: null at org.apache.camel.impl.CompositeRegistry.lookupByNameAndType(CompositeRegistry.java:62) at org.apache.camel.impl.PropertyPlaceholderDelegateRegistry.lookupByNameAndType(PropertyPlaceholderDelegateRegistry.java:63) at org.apache.camel.util.CamelContextHelper.lookupPropertiesComponent(CamelContextHelper.java:492) at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:1891) at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:1767) at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:1735) at myUtils.camel.MyService.start(MyService.java:19) ... 5 more Caused by: java.lang.AbstractMethodError at org.apache.camel.impl.CompositeRegistry.lookupByNameAndType(CompositeRegistry.java:56) ... 12 more -- View this message in context: http://camel.465427.n5.nabble.com/Upgrading-to-Camel-2-14-1-and-CompositeRegistry-issue-tp5763152.html Sent from the Camel - Users mailing list archive at Nabble.com.
Camel Netty Http: HttpHeaders case sensitive
Hello, we are implementing a http camel route for receiving data from SAP. The route consumes from a netty-http endpoint(from(netty-http...)). Our tests with SoapUi worked fine, but when we tried sending data from the SAP system the test failed with http 400 bad request. After some research I found https://issues.apache.org/jira/browse/CAMEL-6599 where is mentioned to check if the host appears as http header. I analyzed the http requests: SoapUI: Accept-Encoding: gzip,deflate[\r][\n] Content-Type: text/xml;charset=UTF-8[\r][\n] Content-Length: 4[\r][\n] *Host: host-123:8080[\r][\n]* Connection: Keep-Alive[\r][\n] User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n] SAP: content-type: text/xml; charset=utf-8\r\n content-length: 3391\r\n [Content length: 3391] connection: keep-alive\r\n accept-encoding: gzip, deflate\r\n user-agent: SAP NetWeaver Application Server (1.0;731)\r\n * host: host-123:8080\r\n* sap-language: D\r\n The camel netty http component checks if a Host http header exists(case sensitive), SAP sends host: org.apache.camel.component.netty.http.handlers.HttpServerChannelHandler: // must include HOST header as required by HTTP 1.1 if (!request.headers().names().contains(HttpHeaders.Names.HOST)) { HttpResponse response = new DefaultHttpResponse(HTTP_1_1, BAD_REQUEST); response.setChunked(false); response.headers().set(Exchange.CONTENT_TYPE, text/plain); response.headers().set(Exchange.CONTENT_LENGTH, 0); response.setContent(ChannelBuffers.copiedBuffer(new byte[]{})); messageEvent.getChannel().write(response).syncUninterruptibly(); messageEvent.getChannel().close(); return; } HttpHeaders can be/have to be case insensitive, see http://stackoverflow.com/questions/5258977/are-http-headers-case-sensitive or http://www.ietf.org/rfc/rfc2616.txt. Should I create a ticket for this? kind regards, soilworker -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Netty-Http-HttpHeaders-case-sensitive-tp5763157.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: java.util.zip.ZipException: error in opening zip file
Hi Check the bottom of the release notes and you can find which version that dropped java 6. Which is indeed 2.14.x http://camel.apache.org/camel-2140-release.html So try with 2.13.x On Wed, Feb 25, 2015 at 3:14 PM, Gonzalo Vásquez Sáez gvasq...@waypoint.cl wrote: Thanks Claus for such a fast answer! Regarding Java versions, we'll try to install a Java 7 or 8 in that Linux box, but as an alternate approach, which Camel version DOES support Java 6 so we could try that approach too? Atentamente / Regards, Gonzalo Vásquez Sáez gvasq...@waypoint.cl +56 (2) 29634180 Director I+D / RD Director Waypoint Telecomunicaciones S.A. Alfredo Barros Errázuriz 1953 Of. 1004 7500550 Providencia, Santiago, Chile Mapcode: R3.BR El 25-02-2015, a las 11:10, Claus Ibsen claus.ib...@gmail.com escribió: Camel 2.14.x does not support Java 6. You must use Java 7 or 8. On Wed, Feb 25, 2015 at 3:02 PM, Gonzalo Vásquez Sáez gvasq...@waypoint.cl wrote: Hi everybody, I’m using Camel 2.14.1, mainly to use a timer and an http consumer (URL_FLEET_HISTORY), as shown on the following Java code: @Override public void configure() throws Exception { from(timer:ws?period= + period) .process(new Processor() { @Override public void process(Exchange exchange) throws Exception { Calendar cal = Calendar.getInstance(); System.out.println(Searching new data @ + cal.getTime()); cal.add(Calendar.HOUR, -48); System.out.println(Since + cal.getTime()); String lastReport = LAST_REPORT_DATE_FORMAT.format(cal .getTime()); exchange.getOut().setHeader(lastReport, lastReport); } }) .recipientList( simple(URL_FLEET_HISTORY + USERNAME + SLASH + PASSWORD + SLASH + ${header.lastReport})) .convertBodyTo(String.class) .log(LoggingLevel.INFO, logger, Data Received: ${body}) .split().tokenizePair(Heading, /Status, true) .process(new LocationProcessor()); } I’m also using org.apache.camel.main.Main to run the process as a command line forever running kind of daemon. with this code: public class Listener { public static void main(String[] args) throws Exception { Listener daemon = new Listener(); daemon.boot(); } private Main main; public void boot() throws Exception { // create a Main instance main = new Main(); // enable hangup support so you can press ctrl + c to terminate the JVM main.enableHangupSupport(); // add routes main.addRouteBuilder(new SkyPatrolRouteBuilder()); // run until you terminate the JVM System.out.println(Starting Listener. Use Ctrl + c to terminate.); main.run(); } } After a few days running the HTTP consumer starts to fail consistently with the following stacktrace: 228243785 [Camel (camel-1) thread #0 - timer://ws] timer://ws] ERROR org.apache.camel.processor.DefaultErrorHandler - Failed delivery for (MessageId: ID-Monitor-59190-1424577519856-0-184780 on ExchangeId: ID-Monitor-59190-1424577519856-0-184781). Exhausted after delivery attempt: 1 caught: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: [Body is null]] Message History --- RouteId ProcessorId Processor Elapsed (ms) [route1] [route1] [timer://ws?period=18 ] [41 timer://ws?period=18%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0]%20[%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A041] [route1] [process1 ] [cl.waypoint.monitor.skypatrol.SkyPatrolRouteBuilder$1@549b6220 ] [ 1] [route1] [recipientList1] [recipientList[simple{Simple: http://wsp.skypatrol.com/fleet_history/waypointch] http://wsp.skypatrol.com/fleet_history/waypointch] [42] Exchange --- Exchange[ Id ID-Monitor-59190-1424577519856-0-184781 ExchangePattern InOnly Headers
Re: java.util.zip.ZipException: error in opening zip file
Thanks, we'll try downgrading to Camel 2.13.3 (just pom.xml fixing needed) Atentamente / Regards, Gonzalo Vásquez Sáez gvasq...@waypoint.cl +56 (2) 29634180 Director I+D / RD Director Waypoint Telecomunicaciones S.A. Alfredo Barros Errázuriz 1953 Of. 1004 7500550 Providencia, Santiago, Chile Mapcode: R3.BR El 25-02-2015, a las 11:16, Claus Ibsen claus.ib...@gmail.com escribió: Hi Check the bottom of the release notes and you can find which version that dropped java 6. Which is indeed 2.14.x http://camel.apache.org/camel-2140-release.html So try with 2.13.x On Wed, Feb 25, 2015 at 3:14 PM, Gonzalo Vásquez Sáez gvasq...@waypoint.cl wrote: Thanks Claus for such a fast answer! Regarding Java versions, we'll try to install a Java 7 or 8 in that Linux box, but as an alternate approach, which Camel version DOES support Java 6 so we could try that approach too? Atentamente / Regards, Gonzalo Vásquez Sáez gvasq...@waypoint.cl +56 (2) 29634180 Director I+D / RD Director Waypoint Telecomunicaciones S.A. Alfredo Barros Errázuriz 1953 Of. 1004 7500550 Providencia, Santiago, Chile Mapcode: R3.BR El 25-02-2015, a las 11:10, Claus Ibsen claus.ib...@gmail.com escribió: Camel 2.14.x does not support Java 6. You must use Java 7 or 8. On Wed, Feb 25, 2015 at 3:02 PM, Gonzalo Vásquez Sáez gvasq...@waypoint.cl wrote: Hi everybody, I’m using Camel 2.14.1, mainly to use a timer and an http consumer (URL_FLEET_HISTORY), as shown on the following Java code: @Override public void configure() throws Exception { from(timer:ws?period= + period) .process(new Processor() { @Override public void process(Exchange exchange) throws Exception { Calendar cal = Calendar.getInstance(); System.out.println(Searching new data @ + cal.getTime()); cal.add(Calendar.HOUR, -48); System.out.println(Since + cal.getTime()); String lastReport = LAST_REPORT_DATE_FORMAT.format(cal .getTime()); exchange.getOut().setHeader(lastReport, lastReport); } }) .recipientList( simple(URL_FLEET_HISTORY + USERNAME + SLASH + PASSWORD + SLASH + ${header.lastReport})) .convertBodyTo(String.class) .log(LoggingLevel.INFO, logger, Data Received: ${body}) .split().tokenizePair(Heading, /Status, true) .process(new LocationProcessor()); } I’m also using org.apache.camel.main.Main to run the process as a command line forever running kind of daemon. with this code: public class Listener { public static void main(String[] args) throws Exception { Listener daemon = new Listener(); daemon.boot(); } private Main main; public void boot() throws Exception { // create a Main instance main = new Main(); // enable hangup support so you can press ctrl + c to terminate the JVM main.enableHangupSupport(); // add routes main.addRouteBuilder(new SkyPatrolRouteBuilder()); // run until you terminate the JVM System.out.println(Starting Listener. Use Ctrl + c to terminate.); main.run(); } } After a few days running the HTTP consumer starts to fail consistently with the following stacktrace: 228243785 [Camel (camel-1) thread #0 - timer://ws] timer://ws] ERROR org.apache.camel.processor.DefaultErrorHandler - Failed delivery for (MessageId: ID-Monitor-59190-1424577519856-0-184780 on ExchangeId: ID-Monitor-59190-1424577519856-0-184781). Exhausted after delivery attempt: 1 caught: org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[Message: [Body is null]] Message History --- RouteId ProcessorId Processor Elapsed (ms) [route1] [route1] [timer://ws?period=18 ] [41 timer://ws?period=18%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A0]%20[%20%C2%A0%20%C2%A0%20%C2%A0%20%C2%A041] [route1] [process1 ] [cl.waypoint.monitor.skypatrol.SkyPatrolRouteBuilder$1@549b6220 ] [ 1] [route1] [recipientList1] [recipientList[simple{Simple:
Re: How to trap most specific exceptions?
Hi If you have a copy of Camel in Action its explained in much detail in chapter 5. You may find some information on the Camel doc website as well, but not as deep as in the book. On Mon, Feb 23, 2015 at 5:15 PM, toomanyedwards toomanyedwa...@gmail.com wrote: Thanks for the pointer. Can you give some insight into why Camel matches from the bottom up of the exception chain rather from the top? This appears to be an explicit design decision and it'd be useful to know the rationale behind it to help leverage exception trapping more effectively. -- View this message in context: http://camel.465427.n5.nabble.com/How-to-trap-most-specific-exceptions-tp5762994p5763086.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
Re: Camel Netty Http: HttpHeaders case sensitive
Hi Well spotted. Yeah you are welcome to log a ticket. And also we love contributions so a patch with a fix is also welcome. http://camel.apache.org/contributing.html On Wed, Feb 25, 2015 at 1:57 PM, cgiera christoph.gi...@mic-cust.com wrote: Hello, we are implementing a http camel route for receiving data from SAP. The route consumes from a netty-http endpoint(from(netty-http...)). Our tests with SoapUi worked fine, but when we tried sending data from the SAP system the test failed with http 400 bad request. After some research I found https://issues.apache.org/jira/browse/CAMEL-6599 where is mentioned to check if the host appears as http header. I analyzed the http requests: SoapUI: Accept-Encoding: gzip,deflate[\r][\n] Content-Type: text/xml;charset=UTF-8[\r][\n] Content-Length: 4[\r][\n] *Host: host-123:8080[\r][\n]* Connection: Keep-Alive[\r][\n] User-Agent: Apache-HttpClient/4.1.1 (java 1.5)[\r][\n] SAP: content-type: text/xml; charset=utf-8\r\n content-length: 3391\r\n [Content length: 3391] connection: keep-alive\r\n accept-encoding: gzip, deflate\r\n user-agent: SAP NetWeaver Application Server (1.0;731)\r\n * host: host-123:8080\r\n* sap-language: D\r\n The camel netty http component checks if a Host http header exists(case sensitive), SAP sends host: org.apache.camel.component.netty.http.handlers.HttpServerChannelHandler: // must include HOST header as required by HTTP 1.1 if (!request.headers().names().contains(HttpHeaders.Names.HOST)) { HttpResponse response = new DefaultHttpResponse(HTTP_1_1, BAD_REQUEST); response.setChunked(false); response.headers().set(Exchange.CONTENT_TYPE, text/plain); response.headers().set(Exchange.CONTENT_LENGTH, 0); response.setContent(ChannelBuffers.copiedBuffer(new byte[]{})); messageEvent.getChannel().write(response).syncUninterruptibly(); messageEvent.getChannel().close(); return; } HttpHeaders can be/have to be case insensitive, see http://stackoverflow.com/questions/5258977/are-http-headers-case-sensitive or http://www.ietf.org/rfc/rfc2616.txt. Should I create a ticket for this? kind regards, soilworker -- View this message in context: http://camel.465427.n5.nabble.com/Camel-Netty-Http-HttpHeaders-case-sensitive-tp5763157.html Sent from the Camel - Users mailing list archive at Nabble.com. -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
Re: Camel File outputType as StreamList
Hi You can use the max messages per poll to limit the number of files which could allow the consumer to process files sooner. On Tue, Feb 24, 2015 at 12:32 PM, Dewitte P-Alban dewitte...@gmail.com wrote: Hi everybody Is it possible to read recursively a directory and output file names (and/or content) in a streamList like the outputytpe paramater for the JDBC component. I had to process large directories with many file. Right now my route recurse in all sub directories before starting to process each file. i would like to find a solution to start processing file right after file componant find it. Here is a example : public class FileScan { public static void main(String[] args) throws Exception { FileScan example = new FileScan(); example.boot(); } public void boot() throws Exception { // create a Main instance Main main = new Main(); // enable hangup support so you can press ctrl + c to terminate the JVM main.enableHangupSupport(); main.addRouteBuilder(new RouteBuilder() { @Override public void configure() throws Exception { from(file:C:\\Temp?noop=truerecursive=truereadLock=none) .routeId(FileScanner).process(new Processor() { @Override public void process(Exchange exchange) throws Exception { System.out.println(Reading +exchange.getIn().getHeader(CamelFilePath)); } }); } }); // run until you terminate the JVM System.out.println(Starting Camel. Use ctrl + c to terminate the JVM.\n); main.run(); } } Best regards Pierre-Alban -- Claus Ibsen - Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/
Getting HTTP status code as 202 always and want to override with the 200.
New to camel.I have existing spring application which has soap endpoints. The return type of soap endpoint is jdom Element. When the processing of endpoint completes I am calling the camel processors in routes - one for Acknowledgement and other for putting in JMS. Once its done returning me response as 202 which is correct but how to override that to 200. Tried in last processor i.e. when I put my message in JMS after that it will end my camel route.Tried these things 1. Used getOut 2. Used getIn. 3.Used after last processor in camel route. 1. exchange.getOut.setHeader(Exchange.HTTP_RESPONSE_CODE,200) Response r = Response.status(200).entity(Created).build(); exchange.getOut().setBody(r); 2. exchange.getIn.setHeader(Exchange.HTTP_RESPONSE_CODE,200) Response r = Response.status(200).entity(Created).build(); exchange.getIn().setBody(r); 3. camel:setHeader headerName = CamelHttpResponseCodeconstant200/constant/camel:setHeader When I was debugging my code after completion of camel its checking for this else if (exchange.getPattern().isOutCapable()) { Message responseMessage = exchange.getOut(Message.class); if (responseMessage != null) { Source responseBody = responseMessage.getBody(Source.class); WebServiceMessage response = messageContext.getResponse(); so tried to put the few more line of code in processor to fulfil above request assuming my body will have Source Element. Message msg = exchange.getIn(); exchange.setOut(msg) exchange.getOut.setBody(exchange.getIn().getBody()) I need some pointer if someone already faced this issue. Appreciate your help and time. -- View this message in context: http://camel.465427.n5.nabble.com/Getting-HTTP-status-code-as-202-always-and-want-to-override-with-the-200-tp5763173.html Sent from the Camel - Users mailing list archive at Nabble.com.
how to Mock camel EL ?
hi at all. i am new in camel. i need a support in the thema junit test for camel.so, i have this configuration: FetchPreprocessingResultFromMarklogicRoute.java http://camel.465427.n5.nabble.com/file/n5763174/FetchPreprocessingResultFromMarklogicRoute.java to get it run i have created a junit test: FetchPreprocessingResultFromMarklogicRoute_Test.java http://camel.465427.n5.nabble.com/file/n5763174/FetchPreprocessingResultFromMarklogicRoute_Test.java so the problem is an Camel EL. I don't now how can i replace the expressionwith Mock, or is there other solution ? -- View this message in context: http://camel.465427.n5.nabble.com/how-to-Mock-camel-EL-tp5763174.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel blueprint support multiple mail boxes ???
Hi Yogu13, thanks!!! ok, I think I get it, if I use the Java DSL I have more scalability because the config files or the xml's do not support multiple configuration entries??? Sorry if I am a bit behind, learning on overload, arg! thanks again, Gary -- View this message in context: http://camel.465427.n5.nabble.com/camel-blueprint-support-multiple-mail-boxes-tp5763126p5763168.html Sent from the Camel - Users mailing list archive at Nabble.com.
Invoking existing spring jms listener through camel routes.
Spring exposes the jmsListener part like below jms:listener-container connection-factory=myConnectionFactory task-executor=myTaskExecutor destination-resolver=myDestinationResolver transaction-manager=myTransactionManager concurrency=10 jms:listener destination=${jms.queue.Inbound} ref=beanMDP/ /jms:listener-container So how to call this through Camel as a different service in camel routes. My aim is to decouple the listener part service which can be used in future to use anywhere in camel path. I tried to invoke spring listener for inbound JMS message in camel route below and removed the jms:listener destination=${jms.queue.Inbound} ref=beanMDP/ line from jms:listener but not successful. camel:route id = jmsListner camel:from uri = jms.queue.Inbound/ !--- do here some processing -- /camel:route jms:listener-container connection-factory=myConnectionFactory task-executor=myTaskExecutor destination-resolver=myDestinationResolver transaction-manager=myTransactionManager concurrency=10 /jms:listener-container Any pointers will really help. Thanks in advance guys for help. -- View this message in context: http://camel.465427.n5.nabble.com/Invoking-existing-spring-jms-listener-through-camel-routes-tp5763179.html Sent from the Camel - Users mailing list archive at Nabble.com.
Async IdempotentRepository
Does camel support of any IdempotentRepository SPI that has async methods unlike https://github.com/apache/camel/blob/master/camel-core/src/main/java/org/apache/camel/spi/IdempotentRepository.java ? I have implemented above interface on top of Couchbase API however I am using `Await` to block futures to send back add/remove/contains results and this is not currently provide the concurrency/performance we need on high load. -- --Behrad
RE: SFTP file process order
But that has null as default option. So, what is the default behavior? And what about SFTP concurrent file download if there are multiple files? Thanks Shreyas From: dewitte...@gmail.com Date: Wed, 25 Feb 2015 08:20:45 + Subject: Re: SFTP file process order To: users@camel.apache.org Hi, I think sorter and sortBy are the options you are looking for. http://camel.apache.org/file2.html Best regards Pierre-Alban Le Tue Feb 24 2015 at 20:38:23, shreyas shreyas.puro...@hotmail.com a écrit : Hello, Is anyone aware of default file process order in SFTP component? I am downloading files from SFTP server to local disk using readchange strategy. What happens if multiple files are put in the SFTP server. Are they processed in datetime order or some other order. I did look into file2 consumer but did not read anything about process order. Also, is SFTP download's concurrent? I know FTP is not, but what about SFTP. Thanks in advance, Shreyas Purohit
Re: Failover with Camel CXF
Hi, You need to specify the LoadBalanceType such as Failover or roundRobin. You can find more information here[1] [1]https://camel.apache.org/load-balancer.html -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On February 25, 2015 at 7:57:00 PM, sayed_india (sayed.abdulis...@gmail.com) wrote: Hi, I followed the instructions provided but unable to implement shows the error: [LoadBalanceType[ref:null... because of ref or loadBalancer must be specified. Please find below code snippet and correct me where I go wrong with this. WSDL -- -- Endpoint config: serviceClass=camelinaction.order.OrderEndpoint wsdlURL=wsdl/order.wsdl serviceClass=camelinaction.order.OrderEndpoint wsdlURL=wsdl/order.wsdl serviceClass=camelinaction.order.OrderEndpoint wsdlURL=wsdl/order.wsdl Camel Route: OK Appreciate a quick response. Thanks and Regards, Sayed -- View this message in context: http://camel.465427.n5.nabble.com/Failover-with-Camel-CXF-tp5723454p5763151.html Sent from the Camel - Users mailing list archive at Nabble.com.
RE: camel-metrics Component
Hello Claus, I tested Jim's orginal Java class with 2.14.1, but still could not get the metrics from MetricsRegistryService. When I invoke dumpStatisticsAsJson() , all the metrics are empty. Here is the output version : 3.0.0, gauges : { }, counters : { }, histograms : { }, meters : { }, timers : { camel-1:testroute.responses : { count : 3, max : 25.073, mean : 9.5436665, min : 1.5678, p50 : 1.99, p75 : 25.073, p95 : 25.073, p98 : 25.073, p99 : 25.073, p999 : 25.073, stddev : 13.450452272445464, m15_rate : 0.558194480485237, m1_rate : 0.20307925506404548, m5_rate : 0.48311899441084233, mean_rate : 0.042752986809164464, duration_units : milliseconds, rate_units : calls/second } } } My application uses blueprint and I want to expose the counters so that I can access the metrics via Hawtio In blueprint.xml, I have declared the bean as bean id=metricsRoutePolicyFactory class=org.apache.camel.component.metrics.routepolicy.MetricsRoutePolicyFactory property name=useJmx value=true/ property name=prettyPrint value=true/ /bean In Hawtio interface, I do see the Mbean service but it does not have any counters in the output. Could you please let me know if the issue is fixed in 2.14.1? Is there something that I am missing? Thanks, Vivek -- View this message in context: http://camel.465427.n5.nabble.com/camel-metrics-Component-tp5758627p5763182.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel-blueprint.xsd is not updated
We need to do it manually, I will take care of it today. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com (English) http://jnn.iteye.com (Chinese) Twitter: willemjiang Weibo: 姜宁willem On February 24, 2015 at 9:53:43 PM, yogu13 (yog...@gmail.com) wrote: Hi, I see that the camel-blueprint.xsd available @ http://camel.apache.org/schema/blueprint/ is not updated with the blueprint changes for recent released for camel (2.14.1). It was last synched with the version 2.13.0. Any specific reason for this or can i raise a JIRA and provide a patch for the same if it has to be done manually? Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/camel-blueprint-xsd-is-not-updated-tp5763118.html Sent from the Camel - Users mailing list archive at Nabble.com.
Rest DSL with Jetty and multipart/form-data POST
Hi, I'm trying to POST a file, along with some parameters, towards a RestDSL endpoint: restConfiguration component=jetty host=localhost port=8080 / rest post uri=/upload/{id} to uri=direct:upload / /post /rest route from uri=direct:upload / to uri=log://upload?showAll=trueamp;multiline=true / /route But I can get only id in headers, and not the ones inside the multipart and I have no attachments with posted file. It seems like the rest endpoint does not enable multipart filter which I enabled on jetty component with no success. Any idea on how to achieve this? Francesco -- View this message in context: http://camel.465427.n5.nabble.com/Rest-DSL-with-Jetty-and-multipart-form-data-POST-tp5763150.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: camel blueprint support multiple mail boxes ???
Hello Gary, From what i understand about your problem creating / configuring dynamic routes using RouteBuilder (Java DSL) should simplfy things for you, Assuming that you list of mailboxes is only configured in the configuration file can vary over a period of time. example @ https://svn.apache.org/repos/asf/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/AddRoutesAtRuntimeTest.java Hope this helps! Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/camel-blueprint-support-multiple-mail-boxes-tp5763126p5763141.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: IBM MQ Issue because of Spring JMS Listener
I have used *inOnly* instead of to in route. it is working fine. to is getting response and camel is trying to update response in default queue.default queue doesn't have access. so I am getting warning. now inOnly won't expect response. -- View this message in context: http://camel.465427.n5.nabble.com/IBM-MQ-Issue-because-of-Spring-JMS-Listener-tp5762991p5763140.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: SFTP file process order
Hi, I think sorter and sortBy are the options you are looking for. http://camel.apache.org/file2.html Best regards Pierre-Alban Le Tue Feb 24 2015 at 20:38:23, shreyas shreyas.puro...@hotmail.com a écrit : Hello, Is anyone aware of default file process order in SFTP component? I am downloading files from SFTP server to local disk using readchange strategy. What happens if multiple files are put in the SFTP server. Are they processed in datetime order or some other order. I did look into file2 consumer but did not read anything about process order. Also, is SFTP download's concurrent? I know FTP is not, but what about SFTP. Thanks in advance, Shreyas Purohit