spring data with elasticsearch fails on findTopByOrderBy -


i'm using spring data elastic search. repository class has method latest insert in index.

product findtop1byorderbyiddesc(); 

by fails following exception.

java.lang.nullpointerexception: null @ org.springframework.data.elasticsearch.core.elasticsearchtemplate.queryforpage(elasticsearchtemplate.java:307) ~[spring-data-elasticsearch-2.0.1.release.jar:na] @ org.springframework.data.elasticsearch.core.elasticsearchtemplate.queryforobject(elasticsearchtemplate.java:251) ~[spring-data-elasticsearch-2.0.1.release.jar:na] @ org.springframework.data.elasticsearch.repository.query.elasticsearchpartquery.execute(elasticsearchpartquery.java:78) ~[spring-data-elasticsearch-2.0.1.release.jar:na] @ org.springframework.data.repository.core.support.repositoryfactorysupport$queryexecutormethodinterceptor.doinvoke(repositoryfactorysupport.java:482) ~[spring-data-commons-1.12.1.release.jar:na] @ org.springframework.data.repository.core.support.repositoryfactorysupport$queryexecutormethodinterceptor.invoke(repositoryfactorysupport.java:460) ~[spring-data-commons-1.12.1.release.jar:na] @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) ~[spring-aop-4.3.0.rc2.jar:4.3.0.rc2] @ org.springframework.data.projection.defaultmethodinvokingmethodinterceptor.invoke(defaultmethodinvokingmethodinterceptor.java:61) ~[spring-data-commons-1.12.1.release.jar:na] @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) ~[spring-aop-4.3.0.rc2.jar:4.3.0.rc2] @ org.springframework.aop.interceptor.exposeinvocationinterceptor.invoke(exposeinvocationinterceptor.java:92) ~[spring-aop-4.3.0.rc2.jar:4.3.0.rc2] @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:179) ~[spring-aop-4.3.0.rc2.jar:4.3.0.rc2] @ org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:213) ~[spring-aop-4.3.0.rc2.jar:4.3.0.rc2] @ com.sun.proxy.$proxy92.findtop1byorderbyiddesc(unknown source) ~[na:na]

i've debugged spring-data code , found 'query' null method elasticsearchtemplate.queryforpage

can me in resolving this?

try product findtopbyorderbyiddesc();


Comments

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -