[
https://issues.apache.org/jira/browse/OPENNLP-1785?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18039981#comment-18039981
]
Martin Wiesner commented on OPENNLP-1785:
-----------------------------------------
[~rzo1] This needs to be cherried to the _main_ branch.
> Ignore ParserConfigurationException in DocumentBuilder when setting XML
> secure processing feature unsupported on Android
> ------------------------------------------------------------------------------------------------------------------------
>
> Key: OPENNLP-1785
> URL: https://issues.apache.org/jira/browse/OPENNLP-1785
> Project: OpenNLP
> Issue Type: Bug
> Components: POS Tagger
> Affects Versions: 2.5.6, 2.5.6.1
> Reporter: Richard Zowalla
> Assignee: Richard Zowalla
> Priority: Minor
> Fix For: 2.5.7
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> Hello! When trying to use POSTagger on Android, a
> ParserConfigurationException is thrown when OpenNLP tries to create a
> DocumentBuilder. It's thrown when the XML secure processing feature is set. I
> looked into it, and found out that the feature is not supported on Android.
> You can view the comment saying it's not supported in the Android source code
> here:
> https://cs.android.com/android/platform/superproject/main/+/main:libcore/luni/src/main/java/javax/xml/parsers/DocumentBuilderFactory.java;l=310-312
> I added ignoring the exception when setting that feature so the POSTagger
> works on Android. I tested it and it now works well.
> see https://github.com/apache/opennlp/pull/892
--
This message was sent by Atlassian Jira
(v8.20.10#820010)