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

Jackson版本导致引入cloud-tencent依赖后无法启动问题 #1285

Closed
fwdragon opened this issue Apr 30, 2024 · 5 comments
Closed

Jackson版本导致引入cloud-tencent依赖后无法启动问题 #1285

fwdragon opened this issue Apr 30, 2024 · 5 comments
Labels
dependencies Pull requests that update a dependency file

Comments

@fwdragon
Copy link

The calling method's class was loaded from the following location:

file:/C:/Users/fwdragon/.m2/repository/com/fasterxml/jackson/dataformat/jackson-dataformat-yaml/2.13.5/jackson-dataformat-yaml-2.13.5.jar

The called method's class, org.yaml.snakeyaml.parser.ParserImpl, is available from the following locations:

jar:file:/C:/Users/fwdragon/.m2/repository/org/yaml/snakeyaml/2.0/snakeyaml-2.0.jar!/org/yaml/snakeyaml/parser/ParserImpl.class
jar:file:/C:/Users/fwdragon/.m2/repository/com/tencent/cloud/spring-cloud-starter-tencent-all/1.12.4-2021.0.8/spring-cloud-starter-tencent-all-1.12.4-2021.0.8.jar!/org/yaml/snakeyaml/parser/ParserImpl.class

The called method's class hierarchy was loaded from the following locations:

org.yaml.snakeyaml.parser.ParserImpl: file:/C:/Users/fwdragon/.m2/repository/org/yaml/snakeyaml/2.0/snakeyaml-2.0.jar

Action:

Correct the classpath of your application so that it contains compatible versions of the classes com.fasterxml.jackson.dataformat.yaml.YAMLParser and org.yaml.snakeyaml.parser.ParserImpl

查找了历史lssues,遂升级版本,但依然无效
依赖版本如下:
spring-cloud-starter-tencent-all:1.12.4-2021.0.8
spring.boot:2.7.11
spring.cloud:2021.0.7
期待您的回答,感谢

@fwdragon fwdragon added the question Further information is requested label Apr 30, 2024
@fwdragon fwdragon changed the title Jackson版本导致引入Cloudtencent依赖后无法启动问题 Jackson版本导致引入cloud-tencent依赖后无法启动问题 Apr 30, 2024
@SkyeBeFreeman SkyeBeFreeman added bug Something isn't working and removed question Further information is requested labels Apr 30, 2024
@SkyeBeFreeman
Copy link
Collaborator

@fwdragon 看了下,这个问题是snakeyaml 2.0引入的。

  1. 可以先尝试不使用sct-all包的引入方式,例如引入discovery、config这些模块。
  2. jackson 2.13.5不支持snakeyaml 2.0,所以jackson也需要升级到2.14.3。

后续版本会考虑修复这个问题。

@SkyeBeFreeman
Copy link
Collaborator

也可以使用2022版本sct,支持snakeyaml 2.0版本。

@SkyeBeFreeman SkyeBeFreeman added dependencies Pull requests that update a dependency file and removed bug Something isn't working labels Apr 30, 2024
@fwdragon
Copy link
Author

fwdragon commented Apr 30, 2024

也可以使用2022版本sct,支持snakeyaml 2.0版本。

好的 收到 十分感谢 我这边再试试

@fwdragon
Copy link
Author

jackson

排除jackson之后解决了 感谢

@SkyeBeFreeman
Copy link
Collaborator

spring boot 2.7.18版本默认引入的jackson版本是2.13.5,不支持snakeyaml 2.0及以上版本。如果需要使用snakeyaml 2.0及以上版本,需要同步手动升级jackson版本到2.14.3及以上版本。
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file
Projects
None yet
Development

No branches or pull requests

2 participants