Description
The Tika configuration file parser exits with an exception when the XMLReaderUtils are configured in tika-config.xml without specifying all possible attributes, eg. without the attribute maxEntityExpansions (to use the default value):
<xml-reader-utils poolSize="20" />
There's a test whether the attribute value is null - however, getAttribute() returns the empty string if the attribute is not present. The empty string then causes a NumberFormatException:
2021-09-14 09:57:12,357 ERROR o.a.n.p.t.TikaParser [main] Problem loading custom Tika configuration from tika-config.xml java.lang.NumberFormatException: For input string: "" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?] at java.lang.Integer.parseInt(Integer.java:662) ~[?:?] at java.lang.Integer.parseInt(Integer.java:770) ~[?:?] at org.apache.tika.config.TikaConfig.updateXMLReaderUtils(TikaConfig.java:303) ~[tika-core-1.25.jar:1.25] at org.apache.tika.config.TikaConfig.<init>(TikaConfig.java:192) ~[tika-core-1.25.jar:1.25] at org.apache.tika.config.TikaConfig.<init>(TikaConfig.java:182) ~[tika-core-1.25.jar:1.25] at org.apache.tika.config.TikaConfig.<init>(TikaConfig.java:157) ~[tika-core-1.25.jar:1.25] at org.apache.nutch.parse.tika.TikaParser.setConf(TikaParser.java:276) [parse-tika.jar:?]
Attachments
Issue Links
- links to