我正在尝试获取一些数据从谷歌分析使用谷歌分析报告v4api。我使用的是maven,所以包含了maven依赖中的所有9个模块。
但是,在运行https://developers.google.com/analytics/devguides/reporting/core/v4/quickstart/service-java
我没有发现任何错误。在进一步调试时,失败的实际行是utils.getdefaultjsonfactory();
Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/json/async/NonBlockingJsonParser
at com.google.api.client.json.jackson2.JacksonFactory.<init>(JacksonFactory.java:41)
at com.google.api.client.googleapis.util.Utils$JsonFactoryInstanceHolder.<clinit>(Utils.java:44)
at com.google.api.client.googleapis.util.Utils.getDefaultJsonFactory(Utils.java:36)
at com.google.api.client.googleapis.auth.oauth2.GoogleCredential.fromStream(GoogleCredential.java:232)
at com.dropbox.aem.common.services.GoogleAnalyticsReporting.initializeAnalyticsReporting(GoogleAnalyticsReporting.java:58)
at com.dropbox.aem.common.services.GoogleAnalyticsReporting.main(GoogleAnalyticsReporting.java:38)
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.json.async.NonBlockingJsonParser
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
... 6 more
1条答案
按热度按时间yzckvree1#
你错过了Jackson的核心。从这里开始
https://mvnrepository.com/artifact/com.fasterxml.jackson.core/jackson-core