[
https://issues.apache.org/jira/browse/LUCENE-7884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16064210#comment-16064210
]
Yan Zhao commented on LUCENE-7884:
----------------------------------
[~mdrob] Thx for your time!
*Changed the patch to catch NCDFE.*
Sadly I have to use the standard google app engine environment which still runs
java 7. I am using the latest Lucene version (5.5.4) that supports java 7.
The problem is actually accessing nio `Paths` results a NCDFE since google
disabled it.
Here is a snippet of stacktrace, thx!
{noformat}
java.lang.NoClassDefFoundError: java.nio.file.Paths is a restricted class.
Please see the Google App Engine developer's guide for more details.
at
com.google.apphosting.runtime.security.shared.stub.java.nio.file.Paths.<clinit>(Paths.java)
at org.apache.lucene.util.StringHelper.<clinit>(StringHelper.java:252)
at
org.apache.lucene.index.DocumentsWriterPerThread.<init>(DocumentsWriterPerThread.java:183)
at
org.apache.lucene.index.DocumentsWriter.ensureInitialized(DocumentsWriter.java:391)
at
org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:445)
at
org.apache.lucene.index.IndexWriter.updateDocument(IndexWriter.java:1477)
at
org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1256)
{noformat}
> StringHelper needs to catch NoClassDefFoundError
> ------------------------------------------------
>
> Key: LUCENE-7884
> URL: https://issues.apache.org/jira/browse/LUCENE-7884
> Project: Lucene - Core
> Issue Type: Bug
> Components: core/other
> Affects Versions: 5.x, 6.x, 6.5.1
> Environment: Google App Engine: https://cloud.google.com/appengine/
> Reporter: Yan Zhao
> Priority: Minor
> Labels: easyfix, newbie, newdev, patch
> Attachments: LUCENE-7884.patch
>
>
> h3. Problem:
> As shown
> [here|https://github.com/apache/lucene-solr/blob/master/lucene/core/src/java/org/apache/lucene/util/StringHelper.java#L252-L255],
> StringHelpers currently use *Paths* to generate random and catch *Exception*
> when resources are unavailable.
> However, in some platform, calling *Paths* will result *NoClassDefFoundError*
> which is not handled by catching *Exception*.
> h3. Change:
> Change to catch **Throwable** instead.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]