When I use a SpatialRepository repository on a cross-store entity I get a NullPointerException when I try to use the findWithinDistance method.
The error is that layer.getGeometryType() is NULL in GeoPipeline.startNearestNeighborLatLonSearch()
Please try the JUnit test RestaurantSpatialTest.testFindWithinDistance() in https://github.com/killersite/Neo4JSpatialTests
Thanks,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)
Ben


Reply With Quote