Hi

Are you by any chance creating an uber-jar/fat-jar of your Camel
applications? If so then mind about this.
https://camel.apache.org/manual/camel-maven-plugin.html#_camelprepare_fatjar

On Thu, Oct 6, 2022 at 3:26 PM Nick Bryan <n...@unit3d.tv> wrote:

> Hi,
> I'm running with Java 8 (1.8.0_152 on windows 10 and OpenJDK 1.8.0_342 on
> Ubuntu 22).
>
> I have a very simple route which takes files and puts them on a queue
> (activemq).
>
>         from(dataPath)
>                 .log("Processing ${file:name}")
>                 .convertBodyTo(String.class)
>                 .to(queueName);
>
> This runs fine under Windows 10/1.8.0_152 but not on Linux. On Linux I get
> TypeConverter errors:
>
> org.apache.camel.InvalidPayloadException: No body available of type:
> java.lang.String but has value:
> GenericFile[/data/to-queues/XXX.xml-1665066664096] of type:
> org.apache.camel.component.file.GenericFile on: XXX.xml-1665066664096.
> Caused by: No type converter available to convert from type:
> org.apache.camel.component.file.GenericFile to the required type:
> java.lang.String with value
> GenericFile[/data/to-queues/XXX.xml-1665066664096].
>
> I've recompiled the source on Linux but still get the same errors.
>
> Going round in circles so any help appreciated
> Nick
>


-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to