[ https://issues.apache.org/jira/browse/LUCENE-2688?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12917953#action_12917953 ]
Michael McCandless commented on LUCENE-2688: -------------------------------------------- {quote} I don't think this is a bug. We are talking about android... its not actually Java... {quote} I agree! This is not a bug, and we do not support Android (there are many things besides this usage of j.l.management that cause problems for Lucene on Android, right?). But, separately, I think when possible Lucene should use simpler code, fewer APIs, etc., to minimize the risk of problems. This usage of j.l.management seems frivolous? Can't we simply do a better job seeding Random (eg with System.nanoTime()), instead? Or, make the usage of j.l.management dynamic? Note that this was added for LUCENE-2421, which was only to make sure our tests don't make conflicting locks. It seems very unlikely a "real" app would hit this (the lock files live in the index dir). Maybe we can fix it for tests only (eg swap in different impl when tests are running...)? > NativeFSLockFactory throws an exception on Android 2.2 platform as > java.lang.management package is not available on android. > ---------------------------------------------------------------------------------------------------------------------------- > > Key: LUCENE-2688 > URL: https://issues.apache.org/jira/browse/LUCENE-2688 > Project: Lucene - Java > Issue Type: Bug > Components: Store > Affects Versions: 3.0, 3.0.1, 3.0.2 > Environment: Android 2.2 Froyo Nexus One > Reporter: Surinder Pal Singh Bindra > Fix For: 2.9.4, 3.0.3, 3.1, 4.0 > > > NativeFSLockFactory throws an exception on Android 2.2 platform as > java.lang.management package is not available on android. > Looks like FSDirectory defaults to NativeFSLockFactory, and this class > refers to java.lang.management package to generate a unique lock. > java.lang.management is not available in Android 2.2 and hence a runtime > exception is raised. The workaround is to use another custom LockFactory or > SimpleFSLockFactory, but Fixing NativeFSLockFactroy will help. > Thanks, > Surinder -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org