[
https://issues.apache.org/jira/browse/LUCENE-7135?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15619692#comment-15619692
]
Michael McCandless commented on LUCENE-7135:
--------------------------------------------
> That's precisely what my patch does.
Woops, sorry, I did not look closely enough: you're right!
OK I think this is a good approach ... I'll push soon. Thanks [~amake]!
> Constants check for JRE bitness causes SecurityException under WebStart
> -----------------------------------------------------------------------
>
> Key: LUCENE-7135
> URL: https://issues.apache.org/jira/browse/LUCENE-7135
> Project: Lucene - Core
> Issue Type: Bug
> Components: core/other
> Affects Versions: 5.5
> Environment: OS X 10.11.4, Java 1.8.0_77-b03 (under WebStart)
> Reporter: Aaron Madlon-Kay
> Attachments: LUCENE-7135.diff
>
>
> I have an app that I deploy via WebStart that uses Lucene 5.2.1 (we are
> locked to 5.2.1 because that's what [LanguageTool|https://languagetool.org/]
> uses).
> When running under the WebStart security manager, there are two locations
> where exceptions are thrown and prevent pretty much all Lucene classes from
> initializing. This is true even when we sign everything and specify
> {{<security><all-permissions/></security>}}.
> # In {{RamUsageEstimator}}, fixed by LUCENE-6923
> # In {{Constants}}, caused by the call
> {{System.getProperty("sun.arch.data.model")}} (stack trace below).
> {code}
> Error: Caused by: java.security.AccessControlException: access denied
> ("java.util.PropertyPermission" "sun.arch.data.model" "read")
> Error: at
> java.security.AccessControlContext.checkPermission(AccessControlContext.java:472)
>
> Error: at
> java.security.AccessController.checkPermission(AccessController.java:884)
> Error: at
> java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
> Error: at
> com.sun.javaws.security.JavaWebStartSecurity.checkPermission(Unknown Source)
> Error: at
> java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:1294)
> Error: at java.lang.System.getProperty(System.java:717)
> Error: at org.apache.lucene.util.Constants.<clinit>(Constants.java:71)
> Error: ... 34 more
> {code}
> The latter is still present in the latest version. My patch illustrates one
> solution that appears to be working for us.
> (This patch, together with a backport of the fix to LUCENE-6923, seems to fix
> the issue for our purposes. However if you really wanted to make my day you
> could put out a maintenance release of 5.2 with both fixes included.)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]