From 285ac85870e9f837492069394185fb41932ef087 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Thu, 15 Jun 2017 05:08:24 +0000 Subject: [PATCH] bug 61170: add comment why we should catch exceptions in SAXHelper git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1798793 13f79535-47bb-0310-9956-ffa450edef68 --- src/ooxml/java/org/apache/poi/util/SAXHelper.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ooxml/java/org/apache/poi/util/SAXHelper.java b/src/ooxml/java/org/apache/poi/util/SAXHelper.java index 5149a222bb..fcd86e5099 100644 --- a/src/ooxml/java/org/apache/poi/util/SAXHelper.java +++ b/src/ooxml/java/org/apache/poi/util/SAXHelper.java @@ -73,6 +73,10 @@ public final class SAXHelper { logger.log(POILogger.WARN, "Failed to create SAXParserFactory", e); throw new RuntimeException("Failed to create SAXParserFactory", e); } catch (Error e) { + // catches NoClassDefFoundError, which may be due to a local class path issue + // This may occur if the code is run inside a web container + // or a restricted JVM + // See bug 61170: https://bz.apache.org/bugzilla/show_bug.cgi?id=61170 logger.log(POILogger.WARN, "Failed to create SAXParserFactory", e); throw e; }