java.lang.NullPointerException

Hibernate JIRA | Yoann Rodière | 4 months ago
  1. 0

    Given an index with a spatial field (say, "location"), it seems that indexing a document with missing location in a separate transaction will prevent the sort from working properly. If we index it in a transaction where other documents are indexed, everything works well, though. We get that kind of stack trace: {code} java.lang.NullPointerException at org.hibernate.search.spatial.impl.CoordinateHelper.coordinate(CoordinateHelper.java:23) at org.hibernate.search.spatial.impl.DistanceCollector$DistanceLeafCollector.collect(DistanceCollector.java:149) at org.apache.lucene.search.MultiCollector$MultiLeafCollector.collect(MultiCollector.java:174) at org.apache.lucene.search.MatchAllDocsQuery$1$1.score(MatchAllDocsQuery.java:57) at org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:821) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:535) at org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:523) at org.hibernate.search.query.engine.impl.LazyQueryState.search(LazyQueryState.java:103) at org.hibernate.search.query.engine.impl.QueryHits.updateTopDocs(QueryHits.java:241) at org.hibernate.search.query.engine.impl.QueryHits.<init>(QueryHits.java:136) at org.hibernate.search.query.engine.impl.QueryHits.<init>(QueryHits.java:114) at org.hibernate.search.query.engine.impl.LuceneHSQuery.getQueryHits(LuceneHSQuery.java:308) at org.hibernate.search.query.engine.impl.LuceneHSQuery.queryEntityInfos(LuceneHSQuery.java:143) at org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.list(FullTextQueryImpl.java:202) at org.hibernate.search.jpa.impl.FullTextQueryImpl.getResultList(FullTextQueryImpl.java:157) at org.hibernate.search.test.jpa.SpatialQueryingJPATest.testDistanceSortMissingCoordinatesWholeSegment(SpatialQueryingJPATest.java:260) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) 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.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70) 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.junit.runners.ParentRunner.run(ParentRunner.java:309) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192) {code} Test case here: https://github.com/hibernate/hibernate-search/pull/1136

    Hibernate JIRA | 4 months ago | Yoann Rodière
    java.lang.NullPointerException
  2. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    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.NullPointerException

      No message provided

      at org.hibernate.search.spatial.impl.CoordinateHelper.coordinate()
    2. Hibernate Search Engine
      DistanceCollector$DistanceLeafCollector.collect
      1. org.hibernate.search.spatial.impl.CoordinateHelper.coordinate(CoordinateHelper.java:23)
      2. org.hibernate.search.spatial.impl.DistanceCollector$DistanceLeafCollector.collect(DistanceCollector.java:149)
      2 frames
    3. Lucene
      IndexSearcher.search
      1. org.apache.lucene.search.MultiCollector$MultiLeafCollector.collect(MultiCollector.java:174)
      2. org.apache.lucene.search.MatchAllDocsQuery$1$1.score(MatchAllDocsQuery.java:57)
      3. org.apache.lucene.search.BulkScorer.score(BulkScorer.java:39)
      4. org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:821)
      5. org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:535)
      6. org.apache.lucene.search.IndexSearcher.search(IndexSearcher.java:523)
      6 frames
    4. Hibernate Search Engine
      LuceneHSQuery.queryEntityInfos
      1. org.hibernate.search.query.engine.impl.LazyQueryState.search(LazyQueryState.java:103)
      2. org.hibernate.search.query.engine.impl.QueryHits.updateTopDocs(QueryHits.java:241)
      3. org.hibernate.search.query.engine.impl.QueryHits.<init>(QueryHits.java:136)
      4. org.hibernate.search.query.engine.impl.QueryHits.<init>(QueryHits.java:114)
      5. org.hibernate.search.query.engine.impl.LuceneHSQuery.getQueryHits(LuceneHSQuery.java:308)
      6. org.hibernate.search.query.engine.impl.LuceneHSQuery.queryEntityInfos(LuceneHSQuery.java:143)
      6 frames
    5. Hibernate Search ORM
      FullTextQueryImpl.getResultList
      1. org.hibernate.search.query.hibernate.impl.FullTextQueryImpl.list(FullTextQueryImpl.java:202)
      2. org.hibernate.search.jpa.impl.FullTextQueryImpl.getResultList(FullTextQueryImpl.java:157)
      2 frames
    6. org.hibernate.search
      SpatialQueryingJPATest.testDistanceSortMissingCoordinatesWholeSegment
      1. org.hibernate.search.test.jpa.SpatialQueryingJPATest.testDistanceSortMissingCoordinatesWholeSegment(SpatialQueryingJPATest.java:260)
      1 frame
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:498)
      4 frames
    8. JUnit
      ParentRunner.run
      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)
      5. org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
      6. org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
      7. org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      8. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      9. org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      10. org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      11. org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      12. org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      13. org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      14. org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      15. org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      15 frames
    9. JUnit4 Runner
      JUnit4TestReference.run
      1. org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
      1 frame
    10. JUnit3 Runner
      RemoteTestRunner.main
      1. org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
      2. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
      3. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:678)
      4. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
      5. org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
      5 frames