[英]java.lang.NoSuchMethodError com.fasterxml.jackson.core.JsonParseException using dropbox v2 core api java
I have a program that is already working a couple of years but it is not working anymore now due to a jackson.core error and I can not figure out why it is thrown.我有一个程序已经运行了几年,但由于 jackson.core 错误,它现在不再运行了,我不知道为什么会抛出它。
Chunck of code that throws the error ( last line ):抛出错误的代码块(最后一行):
//Build inputstream
if(yearDirCheck == true && monthDirCheck == true){
//The folder already exists, upload the file directly
try (InputStream in = new FileInputStream(docname)) {
FileMetadata metadata = client.files().uploadBuilder(path + "/" + jaar + "/"+ maand +"/" + docname)
.uploadAndFinish(in);
}
catch (IOException ex) {
Logger.getLogger(maakPDF.class.getName()).log(Level.SEVERE, null, ex);
}
mail.verzendOverurenKaart(Technician, client.sharing().createSharedLinkWithSettings(path + "/" + jaar + "/"+ maand +"/" + docname).getUrl());
} }
The error i get:我得到的错误:
Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: 'void com.fasterxml.jackson.core.JsonParseException.<init>(com.fasterxml.jackson.core.JsonParser, java.lang.String)'
at com.dropbox.core.stone.StoneSerializer.expectEndObject(StoneSerializer.java:98)
at com.dropbox.core.v2.sharing.LinkPermissions$Serializer.deserialize(LinkPermissions.java:310)
at com.dropbox.core.v2.sharing.LinkPermissions$Serializer.deserialize(LinkPermissions.java:242)
at com.dropbox.core.stone.StructSerializer.deserialize(StructSerializer.java:21)
at com.dropbox.core.v2.sharing.FileLinkMetadata$Serializer.deserialize(FileLinkMetadata.java:455)
at com.dropbox.core.v2.sharing.SharedLinkMetadata$Serializer.deserialize(SharedLinkMetadata.java:494)
at com.dropbox.core.v2.sharing.SharedLinkMetadata$Serializer.deserialize(SharedLinkMetadata.java:381)
at com.dropbox.core.stone.StructSerializer.deserialize(StructSerializer.java:21)
at com.dropbox.core.stone.StoneSerializer.deserialize(StoneSerializer.java:66)
at com.dropbox.core.v2.DbxRawClientV2$1.execute(DbxRawClientV2.java:103)
at com.dropbox.core.v2.DbxRawClientV2.executeRetriable(DbxRawClientV2.java:252)
at com.dropbox.core.v2.DbxRawClientV2.rpcStyle(DbxRawClientV2.java:97)
I am using the jackson-core-2.6.1 library and thus the dorpbox v2 core api in java.我正在使用 jackson-core-2.6.1 库,因此在 java 中使用 dorpbox v2 核心 api。 Not using maven or gradle or anything.不使用 maven 或 gradle 或任何东西。
If you check your libs, you have two jackson-core
dependencies.如果你检查你的库,你有两个jackson-core
依赖项。 2.6.1 and 2.7.4. 2.6.1 和 2.7.4。 Usually this kind of exception is associated with dependencies conflicts, so removing one should fix it.通常这种异常与依赖冲突有关,因此删除一个应该修复它。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.