camel-quarkus icon indicating copy to clipboard operation
camel-quarkus copied to clipboard

Tika 2.x incompatible with Quarkus Tika

Open jamesnetherton opened this issue 3 years ago • 7 comments

Camel has moved on to Tika 2.x, Quarkus Tika is currently aligned with 1.x.

Seems most functionality actually works when I exclude the org.apache.tika dependencies from org.apache.camel:camel-tika, except for the textMain content type:

Caused by: java.lang.NoClassDefFoundError: org/apache/tika/sax/boilerpipe/BoilerpipeContentHandler
	at org.apache.camel.component.tika.TikaProducer.getContentHandler(TikaProducer.java:154)
	at org.apache.camel.component.tika.TikaProducer.doParse(TikaProducer.java:117)
	at org.apache.camel.component.tika.TikaProducer.process(TikaProducer.java:91)
	at org.apache.camel.support.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:66)
	... 40 more

For native mode it's possible to fix and work around this via a substitution. For JVM mode it's a bit trickier to fix.

jamesnetherton avatar Mar 08 '22 09:03 jamesnetherton

I have a workaround in place until things are aligned better.

jamesnetherton avatar Mar 08 '22 11:03 jamesnetherton

See also https://github.com/quarkiverse/quarkus-tika/issues/22.

jamesnetherton avatar Mar 08 '22 11:03 jamesnetherton

TikaProducerSubstitutions.java is missing license header.

zhfeng avatar Mar 08 '22 15:03 zhfeng

TikaProducerSubstitutions.java is missing license header.

I've added it now.

jamesnetherton avatar Mar 08 '22 15:03 jamesnetherton

@jamesnetherton shoud it be closed?

zhfeng avatar Jun 17 '22 06:06 zhfeng

@jamesnetherton shoud it be closed?

I was leaving it open because the proper fix is to upgrade to a Quarkus Tika release that is aligned with Tika 2.x.

jamesnetherton avatar Jun 17 '22 06:06 jamesnetherton

OK, I get it.

zhfeng avatar Jun 17 '22 06:06 zhfeng

@jamesnetherton quarkus-tika upgrade to 2.0.0.CR1 which depends on tika 2.7.0 now. So I think we could revert this workaround and close this issue?

zhfeng avatar Apr 04 '23 02:04 zhfeng

This was fixed in 3.0.0-M2 by https://github.com/apache/camel-quarkus/pull/4739.

jamesnetherton avatar Jun 06 '23 14:06 jamesnetherton