I don’t see why that exception would be thrown, from the example you
provided. But the example you provided is just from the docs. So, if you
could share more of your actual route/processor, it would be easier to help.

On Nov 25, 2024 at 2:05:38 PM, Penagos Jaime <
jaime.pena...@ub.uni-muenchen.de> wrote:

> Hey everyone,
>
> I've been working with the Apache Camel PDF Component and my idea is to
> forward the content to another endpoint, that it is supposed to send it to
> another API through the HTTP component.
>
> So, I've been trying to use a File component that sends the PDFs to the
> other direct: route, and I am getting the following exception
>
>
>
> ***************************************
> org.apache.camel.TypeConversionException: Error during type conversion
> from type: org.apache.camel.component.file.GenericFile to the required
> type: java.io.File with value GenericFile
> ****************************************
>
>
> and somehow I am confused, because I never ran to this problem. I thought
> I could just use something like this:
>
> ********************************
>
> from("file://inputdir/").process(new Processor() {
>  public void process(Exchange exchange) throws Exception {
>    Object body = exchange.getIn().getBody();
>    // do some business logic with the input body
>  }
>
> }).to(direct:otherendpoint);
>
> ***********************************
>
>
>
> But it hasnt worked so far. I would appreciate some ideas, on how can I
> forward the content of a file somehow to the other route, not sure how the
> serialization works here. I am also quite new with the concept of message
> forwarding and serialization, so any advice is greatly appreciated.
>
>
> Thanks for your insights.
> Best regards,
> Jaime P
>

Reply via email to