Skip to content
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

反序列化Java8 日期问题 #869

Closed
HeZhanfeng opened this issue Mar 14, 2024 · 5 comments
Closed

反序列化Java8 日期问题 #869

HeZhanfeng opened this issue Mar 14, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@HeZhanfeng
Copy link

版本4.3.9
MapReduce拆分子任务对象中含有LocalDateTime类型的属性,
执行偶发错误:
ERROR tech.powerjob.common.serialize.JsonUtils - [PowerJob] toJSONString failed
com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Java 8 date/time type java.time.LocalDateTime not supported by default: add Module "com.fasterxml.jackson.datatype:jackson-datatype-jsr310" to enable handling (through reference chain: cn.piesat.sdc.provider.api.domain.dto.relation.calculate.GlobalAreaAccessDistributedTaskDTO["taskStart"])

企业微信截图_17103974382909

@HeZhanfeng HeZhanfeng added the bug Something isn't working label Mar 14, 2024
@HeZhanfeng
Copy link
Author

表象是任务实例详情中Task查询结果记录中的taskContent一列为空

@KFCFans
Copy link
Member

KFCFans commented Mar 15, 2024

哎,感觉 Jackson 也不是什么好东西...问题也一大堆hhh
已收到,后续版本修复

@KFCFans
Copy link
Member

KFCFans commented Mar 15, 2024

不过这个错误提示也很明确了,你可以自己在 worker 工程中添加 "com.fasterxml.jackson.datatype:jackson-datatype-jsr310“ 依赖,注意版本和工程的 jackson 版本一致即可。

@HeZhanfeng
Copy link
Author

哎,类属性涉及日期还是字符串靠谱hhh

@KFCFans
Copy link
Member

KFCFans commented Mar 16, 2024

5.0.1已修复

@KFCFans KFCFans closed this as completed Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants