camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bocamel <johnz...@gmail.com>
Subject Re: Camel retries a message after the message has been completed successfully
Date Fri, 03 May 2013 13:25:04 GMT
Claus,

Thank you very much for your prompt response.  I tried to load the messages
in memory as you suggested.  But the same exception (system cannot find the
file, see below) still occurs.  Could you please share what you think might
be the cause for this?  It seems that the locking mechanism of the File
component might not be airtight.

[thread #0 - file://src/data/in] DefaultErrorHandler            ERROR Failed
delivery for (MessageId: ID-John-PCI-51304-1367586446106-0-6201 on
ExchangeId: ID-John-PCI-51304-1367586446106-0-6202). Exhausted after
delivery attempt: 1 caught: org.apache.camel.InvalidPayloadException: No
body available of type: java.lang.String but has value:
GenericFile[test20130503-090823021.xml] of type:
org.apache.camel.component.file.GenericFile on: test20130503-090823021.xml.
Caused by: Error during type conversion from type:
org.apache.camel.component.file.GenericFile to the required type: byte[]
with value GenericFile[test20130503-090823021.xml] due
java.io.FileNotFoundException:
C:\Users\John\workspace\TestConcurrency\src\data\in\test20130503-090823021.xml
(The system cannot find the file specified).
Exchange[test20130503-090823021.xml]. Caused by:
[org.apache.camel.TypeConversionException - Error during type conversion
from type: org.apache.camel.component.file.GenericFile to the required type:
byte[] with value GenericFile[test20130503-090823021.xml] due
java.io.FileNotFoundException:
C:\Users\John\workspace\TestConcurrency\src\data\in\test20130503-090823021.xml
(The system cannot find the file specified)]
org.apache.camel.InvalidPayloadException: No body available of type:
java.lang.String but has value: GenericFile[test20130503-090823021.xml] of
type: org.apache.camel.component.file.GenericFile on:
test20130503-090823021.xml. Caused by: Error during type conversion from
type: org.apache.camel.component.file.GenericFile to the required type:
byte[] with value GenericFile[test20130503-090823021.xml] due
java.io.FileNotFoundException:
C:\Users\John\workspace\TestConcurrency\src\data\in\test20130503-090823021.xml
(The system cannot find the file specified).
Exchange[test20130503-090823021.xml]. Caused by:
[org.apache.camel.TypeConversionException - Error during type conversion
from type: org.apache.camel.component.file.GenericFile to the required type:
byte[] with value GenericFile[test20130503-090823021.xml] due
java.io.FileNotFoundException:
C:\Users\John\workspace\TestConcurrency\src\data\in\test20130503-090823021.xml
(The system cannot find the file specified)]
	at
org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:101)
	at
org.apache.camel.processor.ConvertBodyProcessor.process(ConvertBodyProcessor.java:68)
	at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.processor.interceptor.BacklogTracerInterceptor.process(BacklogTracerInterceptor.java:84)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:91)
	at
org.apache.camel.processor.interceptor.HandleFaultInterceptor.process(HandleFaultInterceptor.java:41)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:390)
	at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:273)
	at
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:46)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.processor.interceptor.DefaultChannel.process(DefaultChannel.java:335)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:117)
	at org.apache.camel.processor.Pipeline.process(Pipeline.java:80)
	at
org.apache.camel.processor.RouteContextProcessor.processNext(RouteContextProcessor.java:46)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:150)
	at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:117)
	at
org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)
	at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72)
	at
org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:350)
	at
org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:197)
	at
org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:163)
	at
org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:141)
	at
org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:91)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at
java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:351)
	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:178)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:178)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
	at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.camel.TypeConversionException: Error during type
conversion from type: org.apache.camel.component.file.GenericFile to the
required type: byte[] with value GenericFile[test20130503-090823021.xml] due
java.io.FileNotFoundException:
C:\Users\John\workspace\TestConcurrency\src\data\in\test20130503-090823021.xml
(The system cannot find the file specified)
	at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:173)
	at
org.apache.camel.component.file.FileBinding.loadContent(FileBinding.java:57)
	at
org.apache.camel.component.file.GenericFileConverter.genericFileToString(GenericFileConverter.java:140)
	at sun.reflect.GeneratedMethodAccessor14.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:980)
	at
org.apache.camel.impl.converter.StaticMethodTypeConverter.convertTo(StaticMethodTypeConverter.java:47)
	at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:275)
	at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:164)
	at
org.apache.camel.impl.MessageSupport.getMandatoryBody(MessageSupport.java:99)
	... 46 more
Caused by: org.apache.camel.RuntimeCamelException:
java.io.FileNotFoundException:
C:\Users\John\workspace\TestConcurrency\src\data\in\test20130503-090823021.xml
(The system cannot find the file specified)
	at
org.apache.camel.util.ObjectHelper.wrapRuntimeCamelException(ObjectHelper.java:1338)
	at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:984)
	at
org.apache.camel.impl.converter.StaticMethodTypeConverter.convertTo(StaticMethodTypeConverter.java:47)
	at
org.apache.camel.component.file.GenericFileConverter.convertTo(GenericFileConverter.java:97)
	at sun.reflect.GeneratedMethodAccessor23.invoke(Unknown Source)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:980)
	at
org.apache.camel.impl.converter.StaticMethodFallbackTypeConverter.convertTo(StaticMethodFallbackTypeConverter.java:50)
	at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.doConvertTo(BaseTypeConverterRegistry.java:311)
	at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:164)
	... 56 more
Caused by: java.io.FileNotFoundException:
C:\Users\John\workspace\TestConcurrency\src\data\in\test20130503-090823021.xml
(The system cannot find the file specified)
	at java.io.FileInputStream.open(Native Method)
	at java.io.FileInputStream.<init>(FileInputStream.java:138)
	at
org.apache.camel.converter.IOConverter.toInputStream(IOConverter.java:73)
	at org.apache.camel.converter.IOConverter.toByteArray(IOConverter.java:248)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:601)
	at org.apache.camel.util.ObjectHelper.invokeMethod(ObjectHelper.java:980)
	... 65 more
[thread #0 - file://src/data/in] GenericFileOnCompletion        WARN 
Rollback file strategy:
org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy@597e648b
for file: GenericFile[test20130503-090823021.xml]




--
View this message in context: http://camel.465427.n5.nabble.com/Camel-retries-a-message-after-the-message-has-been-completed-successfully-tp5731930p5731971.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message