You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
2024-04-19 14:02:28 [XNIO-1 task-18] ERROR o.d.c.s.h.GlobalExceptionHandler
- 请求地址'/es/list',发生未知异常.
java.lang.reflect.UndeclaredThrowableException: null
at jdk.proxy2/jdk.proxy2.$Proxy162.getSearchSourceBuilder(Unknown Source)
at org.dromara.es.service.impl.CourseServiceImpl.pageList(CourseServiceImpl.java:57)
at org.dromara.es.controller.CourseController.pageList(CourseController.java:58)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:205)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:150)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)
Caused by: java.lang.IllegalArgumentException: fieldName must not be null
at org.elasticsearch.search.sort.FieldSortBuilder.<init>(FieldSortBuilder.java:130)
at org.dromara.easyes.core.core.WrapperProcessor.lambda$setSort$16(WrapperProcessor.java:449)
at java.base/java.util.Collections$SingletonList.forEach(Collections.java:4966)
at org.dromara.easyes.core.core.WrapperProcessor.setSort(WrapperProcessor.java:447)
at org.dromara.easyes.core.core.WrapperProcessor.initSearchSourceBuilder(WrapperProcessor.java:332)
at org.dromara.easyes.core.core.WrapperProcessor.buildSearchSourceBuilder(WrapperProcessor.java:61)
at org.dromara.easyes.core.core.BaseEsMapperImpl.getSearchSourceBuilder(BaseEsMapperImpl.java:224)
问题描述
这是我的
controller
代码然后是post的参数
CourseQueryBo
当传来的参数中
orderByParam
不为null,但是orderByParam
的order
和sort
为null。我的Service代码如下,可以看到我的wrapper中orderBy添加了condition来保证
orderByParam
必需有效。然后开始debug,如图是service收到的参数,可以看到
orderByParam
的order和sort都是null。但是却能看到
wrapper
中有orderByParam
属性?随后就是进行到
SearchSourceBuilder searchSourceBuilder = courseBaseMapper.getSearchSourceBuilder(queryWrapper);
这一步报错,报错如下,CourseServiceImpl.java:57
指的就是getSearchSourceBuilder行。有两种猜想:
暂行解决方法
手动判断
The text was updated successfully, but these errors were encountered: