File component fails with charsets
Hello. I've been using the File component for years, and discover today a strange exception when using a charset on a producer endpoint. Example : If I put a file that contains only characters that exist in ISO-8859-1, no problem. If the file contains an € (euro) for example, an exception is thrown (see at the end of the mail) : java.nio.charset.UnmappableCharacterException: Input length = 1 A trivial java program, with the same jvm on the same machine, that reads a file in UTF-8 and writes its content into another file with ISO-8859-1 only replaces the missing unmapped characters with ? Is it a bug (I can't imagine nobody saw that before) or just a missing option on the endpoint ? I've not found any option for that... Thanks for your help. Regards. The exception : org.apache.camel.component.file.GenericFileOperationFailedException: Cannot store file: C:\TMP\PMA\output\F1.txt at org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:359) ~[!/:2.25.4] at org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:305) ~[!/:2.25.4] at org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:169) ~[!/:2.25.4] at org.apache.camel.component.file.GenericFileProducer.process(GenericFileProducer.java:80) ~[!/:2.25.4] at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) ~[!/:2.25.4] at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148) ~[!/:2.25.4] at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) [!/:2.25.4] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [!/:2.25.4] at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) [!/:2.25.4] at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) [!/:2.25.4] at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [!/:2.25.4] at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:452) [!/:2.25.4] at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:221) [!/:2.25.4] at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:185) [!/:2.25.4] at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:174) [!/:2.25.4] at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:101) [!/:2.25.4] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_242] at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) [?:1.8.0_242] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_242] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) [?:1.8.0_242] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_242] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_242] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_242] Caused by: java.nio.charset.UnmappableCharacterException: Input length = 1 at java.nio.charset.CoderResult.throwException(CoderResult.java:282) ~[?:1.8.0_242] at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:285) ~[?:1.8.0_242] at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125) ~[?:1.8.0_242] at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207) ~[?:1.8.0_242] at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:129) ~[?:1.8.0_242] at java.io.BufferedWriter.flush(BufferedWriter.java:253) ~[?:1.8.0_242] at org.apache.camel.util.IOHelper.copy(IOHelper.java:250) ~[!/:2.25.4] at org.apache.camel.component.file.FileOperations.writeFileByReaderWithCharset(FileOperations.java:421) ~[!/:2.25.4] at org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:337) ~[!/:2.25.4] ... 22 more Suppressed: java.nio.charset.UnmappableCharacterException: Input length = 1 at java.nio.charset.CoderResult.throwException(CoderResult.java:282) ~[?:1.8.0_242] at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:285) ~[?:1.8.0_242] at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:125) ~[?:1.8.0_242] at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207) ~[?:1.8.0_242] at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:129) ~[?:1.8.0_242] at java.io.BufferedWriter.close(BufferedWriter.java:265)
Re: [RESULT][VOTE] Release Apache Camel Kamelets 0.9.2
As a side note Christopher from the board reminded me the vote window is 72 hours. Since the policy is still reporting the rule, we need to follow the 72 hours rule. This is a reminder for all and for myself Il ven 28 ott 2022, 10:45 Andrea Cosentino ha scritto: > Hello all, > > The vote passes with the following results: > > 5 +1 binding votes: Andrea Cosentino, Claus Ibsen, Otavio Rodolfo Piske, > Babak Vahdat and Zineb Bendhiba > > 1 +1 non-binding vote: Tadayoshi Sato > > I'll go ahead with the process. > > Thanks all. >
[RESULT][VOTE] Release Apache Camel Kamelets 0.9.2
Hello all, The vote passes with the following results: 5 +1 binding votes: Andrea Cosentino, Claus Ibsen, Otavio Rodolfo Piske, Babak Vahdat and Zineb Bendhiba 1 +1 non-binding vote: Tadayoshi Sato I'll go ahead with the process. Thanks all.
Re: [VOTE] Release Apache Camel Kamelets 0.9.2
Thanks all, The vote passes. I'll go ahead. Il giorno gio 27 ott 2022 alle ore 11:27 Zineb Bendhiba < bendhiba.zi...@gmail.com> ha scritto: > +1 (binding) > > Thanks Andrea! > > Le mer. 26 oct. 2022 à 20:08, Babak Vahdat > a écrit : > > > +1 (binding) > > > > Thanks Andrea! > > > > — > > Babak > > > > > Am 26.10.2022 um 10:25 schrieb Andrea Cosentino : > > > > > > Hello all: > > > > > > This is a vote for releasing only camel-kamelets 0.9.2. > > > > > > The release contains fixes. > > > > > > Kamelets release files: > > > https://dist.apache.org/repos/dist/dev/camel/camel-kamelets/0.9.2/ > > > Kamelets staging repository: > > > https://repository.apache.org/content/repositories/orgapachecamel-1488 > > > Kamelets Tag: > > > > > > https://gitbox.apache.org/repos/asf?p=camel-kamelets.git;a=shortlog;h=refs/tags/v0.9.2 > > > > > > Please cast your vote. > > > > > > [ ] +1 Release camel-kamelets 0.9.2 > > > [ ] -1 Veto the release (provide specific comments) > > > > > > The vote is open for at least 48 hours. > > > > > > NOTE: The vote for 48 hours is because there are no breaking changes > but > > > the release is not really urgent. > > > > > > Here's my +1. > > > > > > Thanks, > > > Andrea Cosentino > > > > > > -- > Zineb >