Announcement Announcement Module
Collapse
No announcement yet.
[NPE] Neo4j cross-store ERROR Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • [NPE] Neo4j cross-store ERROR

    HELP - my Neo4j-spatial junit test is not passing with cross-store Entities.

    https://github.com/killersite/Neo4JS...atialTest.java

    cross-store entities are causing NPE errors with the following tests.

    Code:
        	restaurant = new Restaurant();
        	restaurant.setName("test");
        	restaurant.setWkt("POINT ( 16.5 56.5 )");
        	restaurantService.saveRestaurant(restaurant);
    
                  @Test
    	public void testFindWithinDistance() {
        	Iterable<Restaurant> venus = restaurantService.findWithinDistance(16,56,70);
            assertThat(asCollection(venus), hasItems(restaurant));
    	}
    The error is that layer.getGeometryType() is NULL in GeoPipeline.startNearestNeighborLatLonSearch()

    Code:
    java.lang.NullPointerException
    	at org.neo4j.gis.spatial.pipes.GeoPipeline.startNearestNeighborLatLonSearch(GeoPipeline.java:363)
    	at org.neo4j.gis.spatial.indexprovider.LayerNodeIndex.query(LayerNodeIndex.java:249)
    	at org.springframework.data.neo4j.repository.AbstractGraphRepository.geoQuery(AbstractGraphRepository.java:81)
    	at org.springframework.data.neo4j.repository.AbstractGraphRepository.findWithinDistance(AbstractGraphRepository.java:71)
    	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    	at java.lang.reflect.Method.invoke(Method.java:597)
    	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:334)
    	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:319)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:155)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
    	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
    	at $Proxy41.findWithinDistance(Unknown Source)
    Please help.
Working...
X