tika/msoffice/poi library incompatability
f4tq Aug 17, 2011 4:19 PMHi,
I've been trying to use modeshape-2.6.0.Beta2 particularly the jboss 6 kit with modeshape-extractor-tika unsuccessfully because when as6 boots I get this (modeshape/log/boot.log):
--snip--
17:21:22,652 INFO [InjectableHandlerRegistry] Registering injectable handler: topic - org.torquebox.messaging.injection.DestinationInjectableHandler@7a6de1c4 17:22:28,066 WARN [ClassLoaderManager] Unexpected error during load of:org.apache.poi.hssf.eventusermodel.EventWorkbookBuilder$StubHSSFWorkbook: java.lang.VerifyError: Cannot inherit from final class at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_26] at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) [:1.6.0_26] at java.lang.ClassLoader.defineClass(ClassLoader.java:615) [:1.6.0_26] at org.jboss.classloader.spi.base.BaseClassLoader.access$200(BaseClassLoader.java:52) [jboss-classloader.jar:2.2.0.GA]
I figured out the jar/library issue by checking out and building 2.6.0.beta2 (see below). In short, there is a library incompatability with poi 3.6 & 3.7 for (msoffice/tika-extractor respectively). My short term fix is to add modeshape-extractor-tika and remove poi*jar from $JBOSS_HOME/server/modeshape/deploy/modeshape-services.jar but I'd love to get this sorted out for the long-run. Also, who knows whether something this breaks something else...
BTW, modeshape-extractor-tika was not part of the jboss-as6 kit. Is this why?
Gritty details:
# git clone -b modeshape-2.6.0.Beta2 https://github.com/ModeShape/modeshape.git # mvn clean install # cd deploy/jbossas/modeshape-jbossas-service # mvn dependency:tree<
--snip-- [INFO] +- org.modeshape:modeshape-sequencer-msoffice:jar:2.6-SNAPSHOT:compile [INFO] | +- org.apache.poi:poi:jar:3.6:compile [INFO] | \- org.apache.poi:poi-scratchpad:jar:3.6:compile [INFO] +- org.modeshape:modeshape-sequencer-teiid:jar:2.6-SNAPSHOT:compile
Now running the same for tika,
# cd extensions/modeshape-extractor-tika # mvn dependency:tree org.modeshape:modeshape-extractor-tika:jar:2.6-SNAPSHOT [INFO] +- org.modeshape:modeshape-graph:jar:2.6-SNAPSHOT:compile [INFO] | +- org.modeshape:modeshape-common:jar:2.6-SNAPSHOT:compile [INFO] | \- joda-time:joda-time:jar:1.6:compile [INFO] +- org.modeshape:modeshape-graph:test-jar:tests:2.6-SNAPSHOT:test [INFO] +- org.modeshape:modeshape-common:test-jar:tests:2.6-SNAPSHOT:test [INFO] +- org.apache.tika:tika-parsers:jar:0.9:compile [INFO] | +- org.apache.tika:tika-core:jar:0.9:compile [INFO] | +- org.apache.pdfbox:pdfbox:jar:1.4.0:compile [INFO] | | +- org.apache.pdfbox:fontbox:jar:1.4.0:compile [INFO] | | +- org.apache.pdfbox:jempbox:jar:1.4.0:compile [INFO] | | \- commons-logging:commons-logging:jar:1.1.1:compile [INFO] | +- org.bouncycastle:bcmail-jdk15:jar:1.45:compile [INFO] | +- org.bouncycastle:bcprov-jdk15:jar:1.45:compile [INFO] | +- org.apache.poi:poi:jar:3.7:compile [INFO] | +- org.apache.poi:poi-scratchpad:jar:3.7:compile [INFO] | +- org.apache.poi:poi-ooxml:jar:3.7:compile [INFO] | | +- org.apache.poi:poi-ooxml-schemas:jar:3.7:compile
Thanks,
Chris