[ 
https://issues.apache.org/jira/browse/LUCENE-7884?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16064111#comment-16064111
 ] 

Mike Drob commented on LUCENE-7884:
-----------------------------------

Catching throwable and then trucking on in the face of whatever happened is a 
very dangerous pattern. What happens if you get an OOM there? The rest of your 
application could be in a bad state and I don't think we want to continue as we 
are. Better to explicitly catch NCDFE.

That said, are you running in the "standard" environment with Java 7, or the 
"flexible" environment with Java 8? Lucene requires Java 8, and running on 7 
would get you this error. So I suspect it might be a setup issue.

> 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]

Reply via email to