Unfortunately, just adding these two libraries (see previous post) did
not do the trick. Tika uses a lot of other libraries (for extraction
from PDF files, etc.) and classes from the latter libraries are not
found due to the class loader configuration.
What did work for me is to add the following line somewhere in the
startup code (in the servlet context listener in my case):
Parser.class.isAssignableFrom(Class.forName("org.apache.tika.parser.asm.ClassParser"));
Without this,
final Iterator<Parser> it =
ServiceRegistry.lookupProviders(org.apache.tika.parser.Parser.class);
while (it.hasNext())
{
System.err.println(it.next().getClass());
}
produces no results; with the above line, I see all parsers from Tika.
(ClassParser is one such parser. It was not enough to simply define a
ClassParser instance "ClassParser dummy".)
Kaspar