This is an automated email from the ASF dual-hosted git repository.
asf-gitbox-commits pushed a commit to branch branch_2x
in repository https://gitbox.apache.org/repos/asf/tika.git
The following commit(s) were added to refs/heads/branch_2x by this push:
new 04119fdc2c [TIKA-4830]: Handle additional exceptions in
JackcessParser, as suggested by Tim Scheckenbach (#3072)
04119fdc2c is described below
commit 04119fdc2c6a7cc4ee6f5190b2ccd8f08e9336bb
Author: Tilman Hausherr <[email protected]>
AuthorDate: Wed Aug 26 14:10:37 2026 +0200
[TIKA-4830]: Handle additional exceptions in JackcessParser, as suggested
by Tim Scheckenbach (#3072)
---
.../org/apache/tika/parser/microsoft/JackcessParser.java | 14 ++++++++++++--
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git
a/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/JackcessParser.java
b/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/JackcessParser.java
index d7251a4f5d..175ad50b86 100644
---
a/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/JackcessParser.java
+++
b/tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/JackcessParser.java
@@ -31,6 +31,7 @@ import com.healthmarketscience.jackcess.util.LinkResolver;
import org.xml.sax.ContentHandler;
import org.xml.sax.SAXException;
+import org.apache.tika.exception.CorruptedFileException;
import org.apache.tika.exception.EncryptedDocumentException;
import org.apache.tika.exception.TikaException;
import org.apache.tika.exception.UnsupportedFormatException;
@@ -108,9 +109,18 @@ public class JackcessParser extends AbstractParser {
"Jackcess doesn't process mdb versions before v97");
}
throw e;
+ } catch (IndexOutOfBoundsException e) {
+ // TIKA-4830
+ throw new CorruptedFileException(e.getMessage(), e);
} catch (IllegalStateException e) {
- if (e.getMessage() != null && e.getMessage().contains("Incorrect
password")) {
- throw new EncryptedDocumentException(e);
+ if (e.getMessage() != null) {
+ if (e.getMessage().contains("Incorrect password")) {
+ throw new EncryptedDocumentException(e);
+ }
+ if (e.getMessage().startsWith("invalid page number ")) {
+ // TIKA-4830
+ throw new CorruptedFileException(e.getMessage(), e);
+ }
}
throw e;
} finally {