I am using tika-parsers as part of a web application
<groupId>org.apache.tika</groupId>
<artifactId>tika-parsers</artifactId>
<version>1.11</version>
and had problems deploying it on wildyfly (8.2.1 and 10.0.0.RC4). This was resolved by adding a jboss-all.xml containing:
<jboss xmlns="urn:jboss:1.0">
<weld xmlns="urn:jboss:weld:1.0" require-bean-descriptor="true"/>
</jboss>
But now tika returns empty Strings for e.g. pdf or ms office files. I assume it is falling back to the EmptyParser. Text files seem to work.
This is my simple test code that works correctly when being run as a junit test.
AutoDetectParser parser = new AutoDetectParser();
BodyContentHandler handler = new BodyContentHandler(9000000);
Metadata metadata = new Metadata();
parser.parse(entry.getValue(), handler, metadata);
String s = handler.toString();