java.lang.reflect.InvocationTargetException

Apache's JIRA Issue Tracker | Billow Gao | 4 years ago
  1. 0

    1. Start a NEW IndexWriterBuilder on an empty folder, add some documents to the index 2. Call commit 3. When the segments_1 file with 0 byte was created, kill the JVM We will end with a corrupted index with an empty segments_1. We only have issue with the first commit crash. Also, if you tried to open an IndexSearcher on a new index. And the first commit on the index was not finished yet. Then you will see exception like: =========================================================================== org.apache.lucene.index.IndexNotFoundException: no segments* file found in org.apache.lucene.store.MMapDirectory@C:\tmp\testdir lockFactory=org.apache.lucene.store.NativeFSLockFactory@6ee00df: files: [write.lock, _0.fdt, _0.fdx] at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:741) at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:52) at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:65) =========================================================================== So when a new index was created, we should first create an empty index. We should not wait for the commit/close call to create the segment file. If we had an empty index there. It won't leave a corrupted index when there were a power issue on the first commit. And a concurrent IndexSearcher can access to the index(No match is better than exception).

    Apache's JIRA Issue Tracker | 4 years ago | Billow Gao
    java.lang.reflect.InvocationTargetException
  2. 0

    {noformat} 11:00:04.497 INFO [main] org.mortbay.util.Container.start(Container.java:74) >09> Started org.mortbay.jetty.Server@aa0a15 2009-01-08 11:00:35,969 [http://localhost:8080/xwiki/bin/view/Main/] [P1-19] INFO .AbstractXWikiMigrationManager - Current storage version = [0] 2009-01-08 11:00:35,971 [http://localhost:8080/xwiki/bin/view/Main/] [P1-19] INFO .AbstractXWikiMigrationManager - List of migrations that will be executed: 2009-01-08 11:00:35,971 [http://localhost:8080/xwiki/bin/view/Main/] [P1-19] INFO .AbstractXWikiMigrationManager - R4340XWIKI883 - See http://jira.xwiki.org/jira/browse/XWIKI-883 2009-01-08 11:00:35,971 [http://localhost:8080/xwiki/bin/view/Main/] [P1-19] INFO .AbstractXWikiMigrationManager - R4359XWIKI1459 - See http://jira.xwiki.org/jira/browse/XWIKI-1459 2009-01-08 11:00:35,971 [http://localhost:8080/xwiki/bin/view/Main/] [P1-19] INFO .AbstractXWikiMigrationManager - R7345XWIKI2079 - See http://jira.xwiki.org/jira/browse/XWIKI-2079 2009-01-08 11:00:35,973 [http://localhost:8080/xwiki/bin/view/Main/] [P1-19] INFO .AbstractXWikiMigrationManager - Running migration [R4340XWIKI883] with version [4340] 2009-01-08 11:00:36,086 [http://localhost:8080/xwiki/bin/view/Main/] [P1-19] INFO .AbstractXWikiMigrationManager - New storage version is now [4341] 2009-01-08 11:00:36,086 [http://localhost:8080/xwiki/bin/view/Main/] [P1-19] INFO .AbstractXWikiMigrationManager - Running migration [R4359XWIKI1459] with version [4359] 2009-01-08 11:00:36,090 [http://localhost:8080/xwiki/bin/view/Main/] [P1-19] INFO .AbstractXWikiMigrationManager - New storage version is now [4360] 2009-01-08 11:00:36,090 [http://localhost:8080/xwiki/bin/view/Main/] [P1-19] INFO .AbstractXWikiMigrationManager - Skipping unneeded migration [R6079XWIKI1878] with version [6079] 2009-01-08 11:00:36,091 [http://localhost:8080/xwiki/bin/view/Main/] [P1-19] INFO .AbstractXWikiMigrationManager - New storage version is now [6080] 2009-01-08 11:00:36,091 [http://localhost:8080/xwiki/bin/view/Main/] [P1-19] INFO .AbstractXWikiMigrationManager - Skipping unneeded migration [R6405XWIKI1933] with version [6405] 2009-01-08 11:00:36,092 [http://localhost:8080/xwiki/bin/view/Main/] [P1-19] INFO .AbstractXWikiMigrationManager - New storage version is now [6406] 2009-01-08 11:00:36,122 [http://localhost:8080/xwiki/bin/view/Main/] [P1-19] INFO .AbstractXWikiMigrationManager - Running migration [R7345XWIKI2079] with version [7350] 2009-01-08 11:00:36,125 [http://localhost:8080/xwiki/bin/view/Main/] [P1-19] INFO .AbstractXWikiMigrationManager - New storage version is now [7351] 2009-01-08 11:00:37,421 [Lucene index rebuilder thread] [Lucene Index Rebuilder] ERROR lucene.IndexUpdater - IOException when opening Lucene Index for writing at /Users/vmassol/dev/xwiki/trunks/enterprise/distribution/jetty/hsqldb/target/xwiki-enterprise-jetty-hsqldb-1.8-SNAPSHOT/jetty/work/Jetty__8080__xwiki/lucene org.apache.lucene.index.CorruptIndexException: failed to locate current segments_N file at org.apache.lucene.index.IndexFileDeleter.<init>(IndexFileDeleter.java:207) at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:722) at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:502) at com.xpn.xwiki.plugin.lucene.IndexUpdater.openWriter(IndexUpdater.java:337) at com.xpn.xwiki.plugin.lucene.IndexUpdater.cleanIndex(IndexUpdater.java:466) at com.xpn.xwiki.plugin.lucene.IndexRebuilder.rebuildIndex(IndexRebuilder.java:187) at com.xpn.xwiki.plugin.lucene.IndexRebuilder.run(IndexRebuilder.java:160) at java.lang.Thread.run(Thread.java:613) 2009-01-08 11:00:37,425 [Lucene index rebuilder thread] [Lucene Index Rebuilder] ERROR lucene.IndexUpdater - Writer not open and closeWriter called {noformat} This happens if xwiki has not been shutdown properly and the lucene index locks not removed.

    XWiki.org JIRA | 8 years ago | Vincent Massol
    org.apache.lucene.index.CorruptIndexException: failed to locate current segments_N file
  3. 0

    Re: [Neo4j] Recover of unresolved transactions failed.

    Google Groups | 5 years ago | Mattias Persson
    org.apache.lucene.index.CorruptIndexException: unrecognized format -3 in file "_0.fnm"
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Help talk:CirrusSearch - MediaWiki

    mediawiki.org | 1 year ago
    org.apache.lucene.index.CorruptIndexException: codec header mismatch: actual header=0 vs expected header=1071082519 (resource: BufferedChecksumIndexInput(MMapIndexInput(path="C:\elasticsearch\data\elasticsearch\nodes\0\indices\eblwiki-eblw__content_first\2\index\_ky.fnm")))
  6. 0

    problems to reindex by elasticsearch on Help talk:CirrusSearch

    mediawiki.org | 8 months ago
    org.apache.lucene.index.CorruptIndexException: codec header mismatch: actual header=0 vs expected header=1071082519 (resource: BufferedChecksumIndexInput(MMapIndexInput(path="C:\elasticsearch\data\elasticsearch\nodes\0\indices\eblwiki-eblw__content_first\2\index\_ky.fnm")))

    1 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.lucene.index.CorruptIndexException

      failed to locate current segments_N file

      at org.apache.lucene.index.IndexFileDeleter.<init>()
    2. Lucene
      IndexWriter.<init>
      1. org.apache.lucene.index.IndexFileDeleter.<init>(IndexFileDeleter.java:223)
      2. org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:670)
      2 frames
    3. test.indexer_common.writer
      IndexWriterBuilder.<init>
      1. test.indexer_common.writer.IndexWriterBuilder.<init>(IndexWriterBuilder.java:80)
      1 frame
    4. test.indexer.writer
      IndexCorruptionTest.main
      1. test.indexer.writer.IndexCorruptionTest.startIndex(IndexCorruptionTest.java:136)
      2. test.indexer.writer.IndexCorruptionTest.main(IndexCorruptionTest.java:52)
      2 frames
    5. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:601)
      4 frames
    6. org.eclipse.jdt
      JarRsrcLoader.main
      1. org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
      1 frame