I can tell there is something wrong when the HttpClient wants to write some 
info log from the stack trace.

at org.apache.commons.logging.impl.Jdk14Logger.log(Jdk14Logger.java:98) 
at org.apache.commons.logging.impl.Jdk14Logger.info(Jdk14Logger.java:193) 
at 
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:439)
 
at 
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
 
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) 
at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323) 
at 
org.apache.camel.component.http.HttpProducer.executeMethod(HttpProducer.java:244)
 
at org.apache.camel.component.http.HttpProducer.process(HttpProducer.java:144) 

--  
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 10:04:53 PM, Gonzalo Vásquez Sáez 
([email protected]) 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("", "", 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] 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=180000 ] [ 41 ]  
> [route1 ] [process1 ] 
> [cl.waypoint.monitor.skypatrol.SkyPatrolRouteBuilder$1@549b6220  
> ] [ 1]
> [route1 ] [recipientList1 ] [recipientList[simple{Simple: 
> 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}
> BodyType null
> 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 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>   
> at 
> org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:586)
>   
> at 
> org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:514)
>   
> at 
> org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:226)
>   
> at 
> org.apache.camel.processor.RecipientList.sendToRecipientList(RecipientList.java:167)
>   
> at org.apache.camel.processor.RecipientList.process(RecipientList.java:120)  
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
> at 
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
>   
> at 
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:416)
>   
> at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>   
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
> at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>   
> at 
> org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:166)
>   
> at 
> org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:74)  
> at java.util.TimerThread.mainLoop(Timer.java:512)
> at java.util.TimerThread.run(Timer.java:462)
> Caused by: java.lang.InternalError
> at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:755)
> at sun.misc.URLClassPath.getResource(URLClassPath.java:169)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at java.util.ResourceBundle$RBClassLoader.loadClass(ResourceBundle.java:435)  
> at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2289)
> at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1364)
> at java.util.ResourceBundle.findBundle(ResourceBundle.java:1328)
> at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1224)
> at java.util.ResourceBundle.getBundle(ResourceBundle.java:705)
> at java.util.logging.Level.getLocalizedName(Level.java:223)
> at java.util.logging.SimpleFormatter.format(SimpleFormatter.java:64)
> at java.util.logging.StreamHandler.publish(StreamHandler.java:179)
> at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:88)
> at java.util.logging.Logger.log(Logger.java:458)
> at java.util.logging.Logger.doLog(Logger.java:480)
> at java.util.logging.Logger.logp(Logger.java:596)
> at org.apache.commons.logging.impl.Jdk14Logger.log(Jdk14Logger.java:98)
> at org.apache.commons.logging.impl.Jdk14Logger.info(Jdk14Logger.java:193)  
> at 
> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:439)
>   
> at 
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
>   
> at 
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)  
> at 
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)  
> at 
> org.apache.camel.component.http.HttpProducer.executeMethod(HttpProducer.java:244)
>   
> at 
> org.apache.camel.component.http.HttpProducer.process(HttpProducer.java:144)  
> at 
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>   
> ... 19 more
> Caused by: java.util.zip.ZipException: error in opening zip file
> at java.util.zip.ZipFile.open(Native Method)
> at java.util.zip.ZipFile.(ZipFile.java:114)
> at java.util.jar.JarFile.(JarFile.java:135)
> at java.util.jar.JarFile.(JarFile.java:72)
> at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:646)
> at sun.misc.URLClassPath$JarLoader.access$600(URLClassPath.java:540)
> at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:607)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:599)
> at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:753)
> ... 50 more
> 228243804 [Camel (camel-1) thread #0 - timer://ws] WARN 
> org.apache.camel.component.timer.TimerConsumer  
> - Error processing exchange. Exchange[Message: [Body is null]]. Caused by: 
> [org.apache.camel.CamelExecutionException  
> - Exception occurred during execution on the exchange: Exchange[Message: 
> [Body is  
> null]]]
> 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 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>   
> at 
> org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:586)
>   
> at 
> org.apache.camel.processor.MulticastProcessor.doProcessSequential(MulticastProcessor.java:514)
>   
> at 
> org.apache.camel.processor.MulticastProcessor.process(MulticastProcessor.java:226)
>   
> at 
> org.apache.camel.processor.RecipientList.sendToRecipientList(RecipientList.java:167)
>   
> at org.apache.camel.processor.RecipientList.process(RecipientList.java:120)  
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
> at 
> org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
>   
> at 
> org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:416)
>   
> at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>   
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:118)
> at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
> at 
> org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191)
>   
> at 
> org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:166)
>   
> at 
> org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:74)  
> at java.util.TimerThread.mainLoop(Timer.java:512)
> at java.util.TimerThread.run(Timer.java:462)
> Caused by: java.lang.InternalError
> at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:755)
> at sun.misc.URLClassPath.getResource(URLClassPath.java:169)
> at java.net.URLClassLoader$1.run(URLClassLoader.java:194)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:296)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
> at java.util.ResourceBundle$RBClassLoader.loadClass(ResourceBundle.java:435)  
> at java.util.ResourceBundle$Control.newBundle(ResourceBundle.java:2289)
> at java.util.ResourceBundle.loadBundle(ResourceBundle.java:1364)
> at java.util.ResourceBundle.findBundle(ResourceBundle.java:1328)
> at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:1224)
> at java.util.ResourceBundle.getBundle(ResourceBundle.java:705)
> at java.util.logging.Level.getLocalizedName(Level.java:223)
> at java.util.logging.SimpleFormatter.format(SimpleFormatter.java:64)
> at java.util.logging.StreamHandler.publish(StreamHandler.java:179)
> at java.util.logging.ConsoleHandler.publish(ConsoleHandler.java:88)
> at java.util.logging.Logger.log(Logger.java:458)
> at java.util.logging.Logger.doLog(Logger.java:480)
> at java.util.logging.Logger.logp(Logger.java:596)
> at org.apache.commons.logging.impl.Jdk14Logger.log(Jdk14Logger.java:98)
> at org.apache.commons.logging.impl.Jdk14Logger.info(Jdk14Logger.java:193)  
> at 
> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:439)
>   
> at 
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
>   
> at 
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)  
> at 
> org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)  
> at 
> org.apache.camel.component.http.HttpProducer.executeMethod(HttpProducer.java:244)
>   
> at 
> org.apache.camel.component.http.HttpProducer.process(HttpProducer.java:144)  
> at 
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
>   
> ... 19 more
> Caused by: java.util.zip.ZipException: error in opening zip file
> at java.util.zip.ZipFile.open(Native Method)
> at java.util.zip.ZipFile.(ZipFile.java:114)
> at java.util.jar.JarFile.(JarFile.java:135)
> at java.util.jar.JarFile.(JarFile.java:72)
> at sun.misc.URLClassPath$JarLoader.getJarFile(URLClassPath.java:646)
> at sun.misc.URLClassPath$JarLoader.access$600(URLClassPath.java:540)
> at sun.misc.URLClassPath$JarLoader$1.run(URLClassPath.java:607)
> at java.security.AccessController.doPrivileged(Native Method)
> at sun.misc.URLClassPath$JarLoader.ensureOpen(URLClassPath.java:599)
> at sun.misc.URLClassPath$JarLoader.getResource(URLClassPath.java:753)
> ... 50 more
>  
> This is running in Debian Lenny 5.0.6 with Java 1.6.0_20
>  
> Seems to me like one of the dependant JARs could not be opened, but why after 
> a few days running  
> and not upon startup when it must have already passed through the whole pack 
> of methods  
> involved? How can I know which file/jar/zip is the problematic one?
>  
> Suggestions would be appreciated.
>  
> Atentamente / Regards,
>  
> Gonzalo Vásquez Sáez
> [email protected]  
> +56 (2) 29634180
> Director I+D / R&D Director
> Waypoint Telecomunicaciones S.A.
>  
> Alfredo Barros Errázuriz 1953 Of. 1004
> 7500550
> Providencia, Santiago, Chile
> Mapcode: R3.BR

Reply via email to