java.lang.RuntimeException: java.lang.NoSuchMethodException: org.apache.lucene.search.MatchAllDocsQuery.getField()

Spring JIRA | Wouter de Vaal | 3 years ago
  1. 0

    When I have a class that is indexed and I call a query to search through all nodes on it, I get a NoSuchMethodException on lucene. See stacktrace below. When I search lucene for the method involved, I did not find it, it seemed they removed it after deprecating it earlier Attached is a maven project to reproduce the issue. PS: I know that I could do findAll, but the query I use in my own environment is more complicated, this is just to show the issue. java.lang.RuntimeException: java.lang.NoSuchMethodException: org.apache.lucene.search.MatchAllDocsQuery.getField() at org.neo4j.index.impl.lucene.FullTxData.getFieldViaReflection(FullTxData.java:293) at org.neo4j.index.impl.lucene.FullTxData.extractTermField(FullTxData.java:274) at org.neo4j.index.impl.lucene.FullTxData.injectOrphans(FullTxData.java:244) at org.neo4j.index.impl.lucene.FullTxData.includeOrphans(FullTxData.java:223) at org.neo4j.index.impl.lucene.FullTxData.internalQuery(FullTxData.java:200) at org.neo4j.index.impl.lucene.FullTxData.query(FullTxData.java:185) at org.neo4j.index.impl.lucene.ExactTxData.query(ExactTxData.java:135) at org.neo4j.index.impl.lucene.TxDataHolder.query(TxDataHolder.java:51) at org.neo4j.index.impl.lucene.LuceneTransaction.getRemovedIds(LuceneTransaction.java:157) at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:259) at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:227) at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:238) at org.neo4j.cypher.internal.spi.gdsimpl.GDSBackedQueryContext$$anon$1.indexQuery(GDSBackedQueryContext.scala:87) at org.neo4j.cypher.internal.executionplan.builders.IndexQueryBuilder$$anonfun$getNodeGetter$2.apply(IndexQueryBuilder.scala:83) at org.neo4j.cypher.internal.executionplan.builders.IndexQueryBuilder$$anonfun$getNodeGetter$2.apply(IndexQueryBuilder.scala:81) at org.neo4j.cypher.internal.pipes.StartPipe$$anonfun$internalCreateResults$1.apply(StartPipe.scala:36) at org.neo4j.cypher.internal.pipes.StartPipe$$anonfun$internalCreateResults$1.apply(StartPipe.scala:35) at scala.collection.Iterator$$anon$13.hasNext(Iterator.scala:371) at org.neo4j.cypher.internal.ClosingIterator$$anonfun$hasNext$1.apply$mcZ$sp(ClosingIterator.scala:36) at org.neo4j.cypher.internal.ClosingIterator$$anonfun$hasNext$1.apply(ClosingIterator.scala:35) at org.neo4j.cypher.internal.ClosingIterator$$anonfun$hasNext$1.apply(ClosingIterator.scala:35) at org.neo4j.cypher.internal.ClosingIterator.failIfThrows(ClosingIterator.scala:86) at org.neo4j.cypher.internal.ClosingIterator.hasNext(ClosingIterator.scala:35) at org.neo4j.cypher.PipeExecutionResult.hasNext(PipeExecutionResult.scala:157) at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327) at scala.collection.convert.Wrappers$IteratorWrapper.hasNext(Wrappers.scala:29) at org.neo4j.cypher.PipeExecutionResult$$anon$1.hasNext(PipeExecutionResult.scala:73) at org.neo4j.helpers.collection.IteratorWrapper.hasNext(IteratorWrapper.java:42) at QueryTest.testQuery(QueryTest.java:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) at org.junit.runner.JUnitCore.run(JUnitCore.java:160) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: java.lang.NoSuchMethodException: org.apache.lucene.search.MatchAllDocsQuery.getField() at java.lang.Class.getMethod(Class.java:1655) at org.neo4j.index.impl.lucene.FullTxData.getFieldViaReflection(FullTxData.java:288) ... 59 more

    Spring JIRA | 3 years ago | Wouter de Vaal
    java.lang.RuntimeException: java.lang.NoSuchMethodException: org.apache.lucene.search.MatchAllDocsQuery.getField()
  2. 0

    When I have a class that is indexed and I call a query to search through all nodes on it, I get a NoSuchMethodException on lucene. See stacktrace below. When I search lucene for the method involved, I did not find it, it seemed they removed it after deprecating it earlier Attached is a maven project to reproduce the issue. PS: I know that I could do findAll, but the query I use in my own environment is more complicated, this is just to show the issue. java.lang.RuntimeException: java.lang.NoSuchMethodException: org.apache.lucene.search.MatchAllDocsQuery.getField() at org.neo4j.index.impl.lucene.FullTxData.getFieldViaReflection(FullTxData.java:293) at org.neo4j.index.impl.lucene.FullTxData.extractTermField(FullTxData.java:274) at org.neo4j.index.impl.lucene.FullTxData.injectOrphans(FullTxData.java:244) at org.neo4j.index.impl.lucene.FullTxData.includeOrphans(FullTxData.java:223) at org.neo4j.index.impl.lucene.FullTxData.internalQuery(FullTxData.java:200) at org.neo4j.index.impl.lucene.FullTxData.query(FullTxData.java:185) at org.neo4j.index.impl.lucene.ExactTxData.query(ExactTxData.java:135) at org.neo4j.index.impl.lucene.TxDataHolder.query(TxDataHolder.java:51) at org.neo4j.index.impl.lucene.LuceneTransaction.getRemovedIds(LuceneTransaction.java:157) at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:259) at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:227) at org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:238) at org.neo4j.cypher.internal.spi.gdsimpl.GDSBackedQueryContext$$anon$1.indexQuery(GDSBackedQueryContext.scala:87) at org.neo4j.cypher.internal.executionplan.builders.IndexQueryBuilder$$anonfun$getNodeGetter$2.apply(IndexQueryBuilder.scala:83) at org.neo4j.cypher.internal.executionplan.builders.IndexQueryBuilder$$anonfun$getNodeGetter$2.apply(IndexQueryBuilder.scala:81) at org.neo4j.cypher.internal.pipes.StartPipe$$anonfun$internalCreateResults$1.apply(StartPipe.scala:36) at org.neo4j.cypher.internal.pipes.StartPipe$$anonfun$internalCreateResults$1.apply(StartPipe.scala:35) at scala.collection.Iterator$$anon$13.hasNext(Iterator.scala:371) at org.neo4j.cypher.internal.ClosingIterator$$anonfun$hasNext$1.apply$mcZ$sp(ClosingIterator.scala:36) at org.neo4j.cypher.internal.ClosingIterator$$anonfun$hasNext$1.apply(ClosingIterator.scala:35) at org.neo4j.cypher.internal.ClosingIterator$$anonfun$hasNext$1.apply(ClosingIterator.scala:35) at org.neo4j.cypher.internal.ClosingIterator.failIfThrows(ClosingIterator.scala:86) at org.neo4j.cypher.internal.ClosingIterator.hasNext(ClosingIterator.scala:35) at org.neo4j.cypher.PipeExecutionResult.hasNext(PipeExecutionResult.scala:157) at scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327) at scala.collection.convert.Wrappers$IteratorWrapper.hasNext(Wrappers.scala:29) at org.neo4j.cypher.PipeExecutionResult$$anon$1.hasNext(PipeExecutionResult.scala:73) at org.neo4j.helpers.collection.IteratorWrapper.hasNext(IteratorWrapper.java:42) at QueryTest.testQuery(QueryTest.java:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71) at org.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174) at org.junit.runner.JUnitCore.run(JUnitCore.java:160) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) Caused by: java.lang.NoSuchMethodException: org.apache.lucene.search.MatchAllDocsQuery.getField() at java.lang.Class.getMethod(Class.java:1655) at org.neo4j.index.impl.lucene.FullTxData.getFieldViaReflection(FullTxData.java:288) ... 59 more

    Spring JIRA | 3 years ago | Wouter de Vaal
    java.lang.RuntimeException: java.lang.NoSuchMethodException: org.apache.lucene.search.MatchAllDocsQuery.getField()
  3. 0

    Regression in handling of Oracle ARRAY types

    GitHub | 2 years ago | lukaseder
    java.lang.NoSuchMethodException: com.jolbox.bonecp.ConnectionHandle.createARRAY(java.lang.String, [Lcom.tlc.dbcore.database.udt.records.MyObjectRecord;)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    MFR registry problem?

    GitHub | 3 years ago | iarspider
    java.lang.NoSuchMethodException: powercrystals.minefactoryreloaded.MFRRegistry.registerGrindable(powercrystals.minefactoryreloaded.api.IFactoryGrindable)
  6. 0

    Initialization exception when using multiple asset routes

    GitHub | 3 years ago | danielkza
    java.lang.NoSuchMethodException: controllers.ReverseAssets.at(java.lang.String)

  1. bmacedo 3 times, last 1 week ago
  2. kjhdofjosvs 4 times, last 1 month ago
  3. eti22 1 times, last 1 month ago
  4. filpgame 11 times, last 3 weeks ago
  5. rube 3 times, last 2 months ago
41 more registered users
32 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. java.lang.NoSuchMethodException

    org.apache.lucene.search.MatchAllDocsQuery.getField()

    at java.lang.Class.getMethod()
  2. Java RT
    Class.getMethod
    1. java.lang.Class.getMethod(Class.java:1655)
    1 frame
  3. Neo4j - Lucene Index
    LuceneIndex.query
    1. org.neo4j.index.impl.lucene.FullTxData.getFieldViaReflection(FullTxData.java:288)
    2. org.neo4j.index.impl.lucene.FullTxData.getFieldViaReflection(FullTxData.java:293)
    3. org.neo4j.index.impl.lucene.FullTxData.extractTermField(FullTxData.java:274)
    4. org.neo4j.index.impl.lucene.FullTxData.injectOrphans(FullTxData.java:244)
    5. org.neo4j.index.impl.lucene.FullTxData.includeOrphans(FullTxData.java:223)
    6. org.neo4j.index.impl.lucene.FullTxData.internalQuery(FullTxData.java:200)
    7. org.neo4j.index.impl.lucene.FullTxData.query(FullTxData.java:185)
    8. org.neo4j.index.impl.lucene.ExactTxData.query(ExactTxData.java:135)
    9. org.neo4j.index.impl.lucene.TxDataHolder.query(TxDataHolder.java:51)
    10. org.neo4j.index.impl.lucene.LuceneTransaction.getRemovedIds(LuceneTransaction.java:157)
    11. org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:259)
    12. org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:227)
    13. org.neo4j.index.impl.lucene.LuceneIndex.query(LuceneIndex.java:238)
    13 frames
  4. org.neo4j.cypher
    StartPipe$$anonfun$internalCreateResults$1.apply
    1. org.neo4j.cypher.internal.spi.gdsimpl.GDSBackedQueryContext$$anon$1.indexQuery(GDSBackedQueryContext.scala:87)
    2. org.neo4j.cypher.internal.executionplan.builders.IndexQueryBuilder$$anonfun$getNodeGetter$2.apply(IndexQueryBuilder.scala:83)
    3. org.neo4j.cypher.internal.executionplan.builders.IndexQueryBuilder$$anonfun$getNodeGetter$2.apply(IndexQueryBuilder.scala:81)
    4. org.neo4j.cypher.internal.pipes.StartPipe$$anonfun$internalCreateResults$1.apply(StartPipe.scala:36)
    5. org.neo4j.cypher.internal.pipes.StartPipe$$anonfun$internalCreateResults$1.apply(StartPipe.scala:35)
    5 frames
  5. Scala
    Iterator$$anon$13.hasNext
    1. scala.collection.Iterator$$anon$13.hasNext(Iterator.scala:371)
    1 frame
  6. Neo4j - Cypher
    PipeExecutionResult.hasNext
    1. org.neo4j.cypher.internal.ClosingIterator$$anonfun$hasNext$1.apply$mcZ$sp(ClosingIterator.scala:36)
    2. org.neo4j.cypher.internal.ClosingIterator$$anonfun$hasNext$1.apply(ClosingIterator.scala:35)
    3. org.neo4j.cypher.internal.ClosingIterator$$anonfun$hasNext$1.apply(ClosingIterator.scala:35)
    4. org.neo4j.cypher.internal.ClosingIterator.failIfThrows(ClosingIterator.scala:86)
    5. org.neo4j.cypher.internal.ClosingIterator.hasNext(ClosingIterator.scala:35)
    6. org.neo4j.cypher.PipeExecutionResult.hasNext(PipeExecutionResult.scala:157)
    6 frames
  7. Scala
    Wrappers$IteratorWrapper.hasNext
    1. scala.collection.Iterator$$anon$11.hasNext(Iterator.scala:327)
    2. scala.collection.convert.Wrappers$IteratorWrapper.hasNext(Wrappers.scala:29)
    2 frames
  8. Neo4j - Cypher
    PipeExecutionResult$$anon$1.hasNext
    1. org.neo4j.cypher.PipeExecutionResult$$anon$1.hasNext(PipeExecutionResult.scala:73)
    1 frame
  9. Neo4j - Graph Database Kernel
    IteratorWrapper.hasNext
    1. org.neo4j.helpers.collection.IteratorWrapper.hasNext(IteratorWrapper.java:42)
    1 frame
  10. Unknown
    QueryTest.testQuery
    1. QueryTest.testQuery(QueryTest.java:33)
    1 frame
  11. Java RT
    DelegatingMethodAccessorImpl.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    3 frames
  12. JUnit
    InvokeMethod.evaluate
    1. org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
    2. org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    3. org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
    4. org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
    4 frames
  13. Spring TestContext
    SpringJUnit4ClassRunner.runChild
    1. org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
    2. org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
    3. org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
    4. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
    4 frames
  14. JUnit
    ParentRunner$2.evaluate
    1. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
    2. org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
    3. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
    4. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
    5. org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
    6. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
    6 frames
  15. Spring TestContext
    RunAfterTestClassCallbacks.evaluate
    1. org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
    2. org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
    2 frames
  16. JUnit
    ParentRunner.run
    1. org.junit.runners.ParentRunner.run(ParentRunner.java:309)
    1 frame
  17. Spring TestContext
    SpringJUnit4ClassRunner.run
    1. org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
    1 frame
  18. JUnit
    JUnitCore.run
    1. org.junit.runner.JUnitCore.run(JUnitCore.java:160)
    1 frame
  19. IntelliJ junit4 module
    JUnit4IdeaTestRunner.startRunnerWithArgs
    1. com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:77)
    1 frame
  20. IDEA
    JUnitStarter.main
    1. com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:195)
    2. com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:63)
    2 frames
  21. Java RT
    NativeMethodAccessorImpl.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    2 frames
  22. IDEA
    AppMain.main
    1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
    1 frame