From 9c367c57c05c18b63cf35ebfbb8e6e82d5a1c20c Mon Sep 17 00:00:00 2001 From: Andreas Beeker Date: Tue, 20 Oct 2020 20:30:03 +0000 Subject: [PATCH] Handle errors from GraalVM native mode runs - UnsupportedFeature on setting Sax features together with missing ErrorMessages from the java.xml module git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1882714 13f79535-47bb-0310-9956-ffa450edef68 --- build.xml | 37 ++++++---- maven/ooxml-security.pom | 79 --------------------- src/java/org/apache/poi/util/XMLHelper.java | 5 +- 3 files changed, 28 insertions(+), 93 deletions(-) delete mode 100644 maven/ooxml-security.pom diff --git a/build.xml b/build.xml index fb06c2e450..a2aafb712b 100644 --- a/build.xml +++ b/build.xml @@ -1938,6 +1938,16 @@ under the License. + + + + + + + + + + Maven POMs are located in ${dist.dir} Use ant dist-nexus to deploy the artifacts in the remote repository @@ -2211,22 +2221,25 @@ under the License. - + + - - - - - + + + + + - - - - - - + + + + + + + + diff --git a/maven/ooxml-security.pom b/maven/ooxml-security.pom deleted file mode 100644 index e092464abe..0000000000 --- a/maven/ooxml-security.pom +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - 4.0.0 - org.apache.poi - ooxml-security - @VERSION@ - jar - OOXML security - - XmlBeans generated from various supplied xsds for encryption and signing: - http://msdn.microsoft.com/en-us/library/dd925810(v=office.12).aspx - http://www.ecma-international.org/publications/files/ECMA-ST/Office%20Open%20XML%201st%20edition%20Part%202%20(PDF).zip - http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd - http://uri.etsi.org/01903/v1.3.2/XAdES.xsd - http://uri.etsi.org/01903/v1.4.1/XAdESv141.xsd - http://dublincore.org/schemas/xmls/qdc/2003/04/02/dc.xsd - http://dublincore.org/schemas/xmls/qdc/2003/04/02/dcterms.xsd - http://dublincore.org/schemas/xmls/qdc/2003/04/02/dcmitype.xsd - - https://poi.apache.org/ - - - - POI Users List - user-subscribe@poi.apache.org - user-unsubscribe@poi.apache.org - http://mail-archives.apache.org/mod_mbox/poi-user/ - - - POI Developer List - dev-subscribe@poi.apache.org - dev-unsubscribe@poi.apache.org - http://mail-archives.apache.org/mod_mbox/poi-dev/ - - - - - - Apache License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - Apache Software Foundation - http://www.apache.org/ - - - - - org.apache.xmlbeans - xmlbeans - 2.6.0 - - - diff --git a/src/java/org/apache/poi/util/XMLHelper.java b/src/java/org/apache/poi/util/XMLHelper.java index d9e00d9a3c..77d06b6430 100644 --- a/src/java/org/apache/poi/util/XMLHelper.java +++ b/src/java/org/apache/poi/util/XMLHelper.java @@ -269,7 +269,7 @@ public final class XMLHelper { return true; } catch (Exception e) { logThrowable(e, "SAX Feature unsupported", name); - } catch (AbstractMethodError ame) { + } catch (Error ame) { logThrowable(ame, "Cannot set SAX feature because outdated XML parser in classpath", name); } return false; @@ -281,7 +281,8 @@ public final class XMLHelper { return true; } catch (Exception e) { logThrowable(e, "SAX Feature unsupported", name); - } catch (AbstractMethodError ame) { + } catch (Error ame) { + // ignore all top error object - GraalVM in native mode is not coping with java.xml error message resources logThrowable(ame, "Cannot set SAX feature because outdated XML parser in classpath", name); } return false;