gpt4 book ai didi

java.lang.NoClassDefFoundError : com/fasterxml/jackson/core/JsonFactory

转载 作者:IT老高 更新时间:2023-10-28 21:22:04 28 4
gpt4 key购买 nike

我正在研究 YouTube 广播 示例。我创建了一个示例 Java Project 并添加了所需的 jar。但是,当我尝试运行该项目时,它会抛出异常。

异常(exception):

Throwable: com/fasterxml/jackson/core/JsonFactory
java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonFactory
at com.google.api.client.json.jackson2.JacksonFactory.<init>(JacksonFactory.java:44)
at com.google.api.services.samples.youtube.cmdline.live.Auth.<clinit>(Auth.java:35)
at com.google.api.services.samples.youtube.cmdline.live.CreateBroadcast.main(CreateBroadcast.java:55)
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.JsonFactory
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
... 3 more

我从 this GitHub repository 下载了项目.

最佳答案

将以下依赖项添加到您的 pom.xml

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.5.2</version>
</dependency>

关于java.lang.NoClassDefFoundError : com/fasterxml/jackson/core/JsonFactory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30367045/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com