-
-
Notifications
You must be signed in to change notification settings - Fork 9.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
控制台文章查询列表报错 #2830
Labels
area/core
Issues or PRs related to the Halo Core
kind/bug
Categorizes issue or PR as related to a bug.
triage/needs-information
Indicates an issue needs more information in order to work on it.
Milestone
Comments
/kind bug /cc @guqing |
f2c-ci-robot
bot
added
kind/bug
Categorizes issue or PR as related to a bug.
area/core
Issues or PRs related to the Halo Core
labels
Dec 3, 2022
Hi @wushanghui,有更详细的异常堆栈吗,我基于你描述的复现步骤无法复现 |
/triage needs-information |
f2c-ci-robot
bot
added
the
triage/needs-information
Indicates an issue needs more information in order to work on it.
label
Dec 5, 2022
Hi, @guqing , 控制台没有看到打印堆栈信息, 只有下面这些报错, 2022-12-05T22:47:36.797+08:00 ERROR 7 --- [ parallel-2] a.w.r.e.AbstractErrorWebExceptionHandler : [1bee6b27-4327] 500 Server Error for HTTP GET "/apis/api.console.halo.run/v1alpha1/posts?keyword=&size=20&page=1&labelSelector=content.halo.run%2Fdeleted%3Dfalse"
java.lang.ClassCastException: null
2022-12-05T22:47:55.451+08:00 ERROR 7 --- [ parallel-2] h.a.i.e.h.GlobalErrorWebExceptionHandler : null
java.lang.ClassCastException: null
2022-12-05T22:47:55.452+08:00 ERROR 7 --- [ parallel-2] a.w.r.e.AbstractErrorWebExceptionHandler : [9265c947-4335] 500 Server Error for HTTP GET "/apis/api.console.halo.run/v1alpha1/posts?keyword=&size=20&page=1&labelSelector=content.halo.run%2Fdeleted%3Dfalse"
java.lang.ClassCastException: null
2022-12-05T22:48:13.928+08:00 ERROR 7 --- [ parallel-2] h.a.i.e.h.GlobalErrorWebExceptionHandler : null
java.lang.ClassCastException: null
2022-12-05T22:48:13.929+08:00 ERROR 7 --- [ parallel-2] a.w.r.e.AbstractErrorWebExceptionHandler : [392ee107-4349] 500 Server Error for HTTP GET "/apis/api.console.halo.run/v1alpha1/posts?keyword=&size=20&page=1&labelSelector=content.halo.run%2Fdeleted%3Dfalse"
java.lang.ClassCastException: null
|
@guqing 感觉是操作导致了脏数据导致的, 我换mysql方式试试, h2不容易用工具访问. |
好的,如果无法重复复现,可以把有问题的那份 h2 db文件清理一下敏感数据发出来如果数据不多的话 |
在 demo.halo.run 环境也遇到了,使用的 PostgreSQL,开启 debug 模式之后日志如下:
/cc @guqing |
/milestone 2.0.1 |
f2c-ci-robot bot
pushed a commit
that referenced
this issue
Dec 6, 2022
#### What type of PR is this? /kind bugfix /area core #### What this PR does / why we need it: 修复文章列表查询时的类型转换错误 文章列表查询将 collectList 错写为 collectSortedList 导致此 `Contributor cannot be cast to class java.lang.Comparable`, collectSortedList 会使用 `Arrays.sort(a, (Comparator) c)`,这需要目标类实现 Comparable 才行,而此处并不需要自然排序。 #### Which issue(s) this PR fixes: Fixes #2830 #### Special notes for your reviewer: 此 bug 的复现方式为: 编辑一篇文章保存后,在使用另一个用户账户编辑此文章并发布就会出现,而使用此 PR 后问题消失,此问题只对 Contributor 这个类型有效它不是自定义模型类,而 Tag 和 Category 都是自定义模型 继承了 AbstractExtension 而它 实现了 Comparable 接口。 /cc @halo-dev/sig-halo #### Does this PR introduce a user-facing change? ```release-note 修复文章列表查询时的类型转换错误 ```
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/core
Issues or PRs related to the Halo Core
kind/bug
Categorizes issue or PR as related to a bug.
triage/needs-information
Indicates an issue needs more information in order to work on it.
是什么版本出现了此问题?
2.0.0
使用的什么数据库?
H2
使用的哪种方式部署?
Docker
在线站点地址
https://blog.wushanghui.top/console/#/posts
发生了什么?
控制台-文章-查询, 报 服务器内部错误:Internal Server Error
访问地址: https://blog.wushanghui.top/console/#/posts
前置操作: 在文章修改的过程中, 使用Unsplash 保存了一张图片, 然后 点击文章列表查询就报错了.
相关日志输出
附加信息
The text was updated successfully, but these errors were encountered: