Hey everyone,

I've been testing some camel solr component (v 3.22.2) and I would like to send 
to solr the contents of PDF files (that support it), so I decided to use the 
PDF Component in Camel and I am not sure how to extract the information to test.




Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
org.apache.camel.TypeConversionException: Error during type conversion from 
type: org.apache.camel.component.file.GenericFile to the required type: 
org.apache.pdfbox.pdmodel.PDDocument with value GenericFile[myTestPDF.pdf] due 
to java.lang.IllegalArgumentException: No serializer found for class 
org.apache.camel.component.file.FileBinding and no properties discovered to 
create BeanSerializer (to avoid exception, disable 
SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: 
org.apache.camel.component.file.GenericFile["binding"])


Caused by: java.lang.IllegalArgumentException: No serializer found for class 
org.apache.camel.component.file.FileBinding and no properties discovered to 
create BeanSerializer (to avoid exception, disable 
SerializationFeature.FAIL_ON_EMPTY_BEANS) (through reference chain: 
org.apache.camel.component.file.GenericFile["binding"])





>From the info I could find on the website, it is focused on the latest version 
>(4.8), but that's for us not applicable. Is there a way or some examples that 
>I can refer to to understand what I am supposed to do?

I appreciate greatly any advice on this.




My routes look like this



from("file:appdata/etl/odlmu/folder"
          + "?"
          + "fileName=myTestPDF.pdf"
          + "&"
          + "noop=true"
)
          .id("route-to-test-components")
          .to("pdf:extractText" + "")
          .process((Exchange exchange) -> {
          })
          .to("file:appdata/etl/odlmu/folder?fileName=myPDFOUTPUT.txt");





Best regards,
Jaime P.

Reply via email to