You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jesse Glick (JIRA)" <ji...@codehaus.org> on 2012/01/11 16:21:02 UTC

[jira] (MINDEXER-48) Assertions thrown when used with Lucene 3.1+

Jesse Glick created MINDEXER-48:
-----------------------------------

             Summary: Assertions thrown when used with Lucene 3.1+
                 Key: MINDEXER-48
                 URL: https://jira.codehaus.org/browse/MINDEXER-48
             Project: Maven Indexer
          Issue Type: Bug
    Affects Versions: 4.1.2
            Reporter: Jesse Glick
            Priority: Critical


{{NexusAnalyzer}} needs to be declared final to avoid an assertion error when using Lucene 3.5 (and probably as early as 3.1).

There may be other compatibility issues with 3.5, but this one completely prevents usage of Indexer.

Upstream change: https://issues.apache.org/jira/browse/LUCENE-2389

Downstream bug: http://netbeans.org/bugzilla/show_bug.cgi?id=207035

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MINDEXER-48) Assertions thrown when used with Lucene 3.1+

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MINDEXER-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy closed MINDEXER-48.
--------------------------------

    Resolution: Fixed

fixed r1293913.
Thanks!
                
> Assertions thrown when used with Lucene 3.1+
> --------------------------------------------
>
>                 Key: MINDEXER-48
>                 URL: https://jira.codehaus.org/browse/MINDEXER-48
>             Project: Maven Indexer
>          Issue Type: Bug
>    Affects Versions: 4.1.2
>            Reporter: Jesse Glick
>            Assignee: Olivier Lamy
>            Priority: Critical
>             Fix For: 4.1.3
>
>         Attachments: MINDEXER-48.diff
>
>
> {{NexusAnalyzer}} needs to be declared final to avoid an assertion error when using Lucene 3.5 (and probably as early as 3.1).
> There may be other compatibility issues with 3.5, but this one completely prevents usage of Indexer.
> Upstream change: https://issues.apache.org/jira/browse/LUCENE-2389
> Downstream bug: http://netbeans.org/bugzilla/show_bug.cgi?id=207035

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MINDEXER-48) Assertions thrown when used with Lucene 3.1+

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MINDEXER-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy updated MINDEXER-48:
---------------------------------

    Fix Version/s: 4.2.0
         Assignee: Olivier Lamy
    
> Assertions thrown when used with Lucene 3.1+
> --------------------------------------------
>
>                 Key: MINDEXER-48
>                 URL: https://jira.codehaus.org/browse/MINDEXER-48
>             Project: Maven Indexer
>          Issue Type: Bug
>    Affects Versions: 4.1.2
>            Reporter: Jesse Glick
>            Assignee: Olivier Lamy
>            Priority: Critical
>             Fix For: 4.2.0
>
>         Attachments: MINDEXER-48.diff
>
>
> {{NexusAnalyzer}} needs to be declared final to avoid an assertion error when using Lucene 3.5 (and probably as early as 3.1).
> There may be other compatibility issues with 3.5, but this one completely prevents usage of Indexer.
> Upstream change: https://issues.apache.org/jira/browse/LUCENE-2389
> Downstream bug: http://netbeans.org/bugzilla/show_bug.cgi?id=207035

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MINDEXER-48) Assertions thrown when used with Lucene 3.1+

Posted by "Jesse Glick (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MINDEXER-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=288025#comment-288025 ] 

Jesse Glick commented on MINDEXER-48:
-------------------------------------

Hah, coding by Google works again:

{code}
Index: indexer-core/src/main/java/org/apache/maven/index/context/DefaultIndexingContext.java
===================================================================
--- indexer-core/src/main/java/org/apache/maven/index/context/DefaultIndexingContext.java	(revision 1230088)
+++ indexer-core/src/main/java/org/apache/maven/index/context/DefaultIndexingContext.java	(working copy)
@@ -500,6 +500,8 @@
 
         indexWriter.setMergeScheduler( new SerialMergeScheduler() );
 
+        indexWriter.commit(); // LUCENE-2386
+
         openAndWarmupReaders();
     }
 
{code}

Also need:

{code}
Index: indexer-core/src/main/java/org/apache/maven/index/context/NexusLegacyAnalyzer.java
===================================================================
--- indexer-core/src/main/java/org/apache/maven/index/context/NexusLegacyAnalyzer.java	(revision 1230088)
+++ indexer-core/src/main/java/org/apache/maven/index/context/NexusLegacyAnalyzer.java	(working copy)
@@ -36,7 +36,7 @@
  * 
  * @author Jason van Zyl
  */
-public class NexusLegacyAnalyzer
+public final class NexusLegacyAnalyzer
     extends Analyzer
 {
     private static Analyzer DEFAULT_ANALYZER = new StandardAnalyzer( Version.LUCENE_30 );
{code}
                
> Assertions thrown when used with Lucene 3.1+
> --------------------------------------------
>
>                 Key: MINDEXER-48
>                 URL: https://jira.codehaus.org/browse/MINDEXER-48
>             Project: Maven Indexer
>          Issue Type: Bug
>    Affects Versions: 4.1.2
>            Reporter: Jesse Glick
>            Priority: Critical
>
> {{NexusAnalyzer}} needs to be declared final to avoid an assertion error when using Lucene 3.5 (and probably as early as 3.1).
> There may be other compatibility issues with 3.5, but this one completely prevents usage of Indexer.
> Upstream change: https://issues.apache.org/jira/browse/LUCENE-2389
> Downstream bug: http://netbeans.org/bugzilla/show_bug.cgi?id=207035

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MINDEXER-48) Assertions thrown when used with Lucene 3.1+

Posted by "Olivier Lamy (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MINDEXER-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Olivier Lamy updated MINDEXER-48:
---------------------------------

    Fix Version/s:     (was: 4.2.0)
                   4.1.3

fix version 4.1.3 as this changes work with lucene 3.0.3 too.
                
> Assertions thrown when used with Lucene 3.1+
> --------------------------------------------
>
>                 Key: MINDEXER-48
>                 URL: https://jira.codehaus.org/browse/MINDEXER-48
>             Project: Maven Indexer
>          Issue Type: Bug
>    Affects Versions: 4.1.2
>            Reporter: Jesse Glick
>            Assignee: Olivier Lamy
>            Priority: Critical
>             Fix For: 4.1.3
>
>         Attachments: MINDEXER-48.diff
>
>
> {{NexusAnalyzer}} needs to be declared final to avoid an assertion error when using Lucene 3.5 (and probably as early as 3.1).
> There may be other compatibility issues with 3.5, but this one completely prevents usage of Indexer.
> Upstream change: https://issues.apache.org/jira/browse/LUCENE-2389
> Downstream bug: http://netbeans.org/bugzilla/show_bug.cgi?id=207035

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MINDEXER-48) Assertions thrown when used with Lucene 3.1+

Posted by "Jesse Glick (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MINDEXER-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=288017#comment-288017 ] 

Jesse Glick commented on MINDEXER-48:
-------------------------------------

{code:xml}

Index: indexer-core/pom.xml
===================================================================
--- indexer-core/pom.xml	(revision 1230088)
+++ indexer-core/pom.xml	(working copy)
@@ -35,7 +35,7 @@
   </description>
 
   <properties>
-    <lucene.version>3.0.3</lucene.version>
+    <lucene.version>3.5.0</lucene.version>
     <maven.version>3.0.1</maven.version>
     <aether.version>1.8</aether.version>
     <archetype.version>2.1</archetype.version>
{code}

indeed produces numerous test failures with the reported assertion.

{code}
Index: indexer-core/src/main/java/org/apache/maven/index/context/NexusAnalyzer.java
===================================================================
--- indexer-core/src/main/java/org/apache/maven/index/context/NexusAnalyzer.java	(revision 1230088)
+++ indexer-core/src/main/java/org/apache/maven/index/context/NexusAnalyzer.java	(working copy)
@@ -35,7 +35,7 @@
  * @author Eugene Kuleshov
  * @author cstamas
  */
-public class NexusAnalyzer
+public final class NexusAnalyzer
     extends Analyzer
 {
     public TokenStream tokenStream( String fieldName, Reader reader )
{code}

solves that problem but just gives way to numerous other test failures.
                
> Assertions thrown when used with Lucene 3.1+
> --------------------------------------------
>
>                 Key: MINDEXER-48
>                 URL: https://jira.codehaus.org/browse/MINDEXER-48
>             Project: Maven Indexer
>          Issue Type: Bug
>    Affects Versions: 4.1.2
>            Reporter: Jesse Glick
>            Priority: Critical
>
> {{NexusAnalyzer}} needs to be declared final to avoid an assertion error when using Lucene 3.5 (and probably as early as 3.1).
> There may be other compatibility issues with 3.5, but this one completely prevents usage of Indexer.
> Upstream change: https://issues.apache.org/jira/browse/LUCENE-2389
> Downstream bug: http://netbeans.org/bugzilla/show_bug.cgi?id=207035

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MINDEXER-48) Assertions thrown when used with Lucene 3.1+

Posted by "Jesse Glick (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MINDEXER-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=288023#comment-288023 ] 

Jesse Glick commented on MINDEXER-48:
-------------------------------------

Note that I get the {{IndexNotFoundException}} failures also using 3.1.0, just not with 3.0.3. (JDK 7, Ubuntu)
                
> Assertions thrown when used with Lucene 3.1+
> --------------------------------------------
>
>                 Key: MINDEXER-48
>                 URL: https://jira.codehaus.org/browse/MINDEXER-48
>             Project: Maven Indexer
>          Issue Type: Bug
>    Affects Versions: 4.1.2
>            Reporter: Jesse Glick
>            Priority: Critical
>
> {{NexusAnalyzer}} needs to be declared final to avoid an assertion error when using Lucene 3.5 (and probably as early as 3.1).
> There may be other compatibility issues with 3.5, but this one completely prevents usage of Indexer.
> Upstream change: https://issues.apache.org/jira/browse/LUCENE-2389
> Downstream bug: http://netbeans.org/bugzilla/show_bug.cgi?id=207035

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MINDEXER-48) Assertions thrown when used with Lucene 3.1+

Posted by "Jesse Glick (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MINDEXER-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=288029#comment-288029 ] 

Jesse Glick commented on MINDEXER-48:
-------------------------------------

Or http://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_3_5_0/lucene/CHANGES.txt for the aggregate list.
                
> Assertions thrown when used with Lucene 3.1+
> --------------------------------------------
>
>                 Key: MINDEXER-48
>                 URL: https://jira.codehaus.org/browse/MINDEXER-48
>             Project: Maven Indexer
>          Issue Type: Bug
>    Affects Versions: 4.1.2
>            Reporter: Jesse Glick
>            Priority: Critical
>         Attachments: MINDEXER-48.diff
>
>
> {{NexusAnalyzer}} needs to be declared final to avoid an assertion error when using Lucene 3.5 (and probably as early as 3.1).
> There may be other compatibility issues with 3.5, but this one completely prevents usage of Indexer.
> Upstream change: https://issues.apache.org/jira/browse/LUCENE-2389
> Downstream bug: http://netbeans.org/bugzilla/show_bug.cgi?id=207035

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MINDEXER-48) Assertions thrown when used with Lucene 3.1+

Posted by "Jesse Glick (JIRA)" <ji...@codehaus.org>.
    [ https://jira.codehaus.org/browse/MINDEXER-48?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=288021#comment-288021 ] 

Jesse Glick commented on MINDEXER-48:
-------------------------------------

All of the form:

{code}

org.apache.lucene.index.IndexNotFoundException: no segments* file found in org.apache.lucene.store.NIOFSDirectory@.../index lockFactory=org.apache.lucene.store.NativeFSLockFactory@140cc82: files: [write.lock]
	at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:712)
	at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:75)
	at org.apache.lucene.index.IndexReader.open(IndexReader.java:462)
	at org.apache.lucene.index.IndexReader.open(IndexReader.java:322)
	at org.apache.maven.index.context.DefaultIndexingContext.openAndWarmupReaders(DefaultIndexingContext.java:515)
...
{code}

Note that {{NexusIndexerCliTest}} will actually fail with an NPE in a {{finally}} block due to a misuse of {{finally}} which masks the root exception:

{code}
Index: indexer-core/src/main/java/org/apache/maven/index/cli/NexusIndexerCli.java
===================================================================
--- indexer-core/src/main/java/org/apache/maven/index/cli/NexusIndexerCli.java	(revision 1230088)
+++ indexer-core/src/main/java/org/apache/maven/index/cli/NexusIndexerCli.java	(working copy)
@@ -342,16 +342,12 @@
         }
 
         NexusIndexer indexer = plexus.lookup( NexusIndexer.class );
-        IndexingContext context = null;
-
         // this is a CLI/batch invocation, don't coggle it with threads
         DefaultIndexingContext.BLOCKING_COMMIT = true;
 
-        try
-        {
             long tstart = System.currentTimeMillis();
 
-            context = indexer.addIndexingContext( //
+        IndexingContext context = indexer.addIndexingContext( //
                                                   repositoryName, // context id
                                                   repositoryName, // repository id
                                                   repositoryFolder, // repository folder
@@ -360,6 +356,8 @@
                                                   null, // index update url
                                                   indexers );
 
+        try
+        {
             IndexPacker packer = plexus.lookup( IndexPacker.class );
 
             ArtifactScanningListener listener = new IndexerListener( context, debug, quiet );
{code}
                
> Assertions thrown when used with Lucene 3.1+
> --------------------------------------------
>
>                 Key: MINDEXER-48
>                 URL: https://jira.codehaus.org/browse/MINDEXER-48
>             Project: Maven Indexer
>          Issue Type: Bug
>    Affects Versions: 4.1.2
>            Reporter: Jesse Glick
>            Priority: Critical
>
> {{NexusAnalyzer}} needs to be declared final to avoid an assertion error when using Lucene 3.5 (and probably as early as 3.1).
> There may be other compatibility issues with 3.5, but this one completely prevents usage of Indexer.
> Upstream change: https://issues.apache.org/jira/browse/LUCENE-2389
> Downstream bug: http://netbeans.org/bugzilla/show_bug.cgi?id=207035

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] (MINDEXER-48) Assertions thrown when used with Lucene 3.1+

Posted by "Jesse Glick (JIRA)" <ji...@codehaus.org>.
     [ https://jira.codehaus.org/browse/MINDEXER-48?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jesse Glick updated MINDEXER-48:
--------------------------------

    Attachment: MINDEXER-48.diff

Ignoring any subtle problems that might be pointed out by http://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_3_1/lucene/CHANGES.txt etc., the attached patch at least makes all tests pass.
                
> Assertions thrown when used with Lucene 3.1+
> --------------------------------------------
>
>                 Key: MINDEXER-48
>                 URL: https://jira.codehaus.org/browse/MINDEXER-48
>             Project: Maven Indexer
>          Issue Type: Bug
>    Affects Versions: 4.1.2
>            Reporter: Jesse Glick
>            Priority: Critical
>         Attachments: MINDEXER-48.diff
>
>
> {{NexusAnalyzer}} needs to be declared final to avoid an assertion error when using Lucene 3.5 (and probably as early as 3.1).
> There may be other compatibility issues with 3.5, but this one completely prevents usage of Indexer.
> Upstream change: https://issues.apache.org/jira/browse/LUCENE-2389
> Downstream bug: http://netbeans.org/bugzilla/show_bug.cgi?id=207035

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira