fofapro / fofa-java

A Java version of the SDK, based on the FOFA Pro API, makes it easy for Java developers to quickly integrate FOFA Pro into their projects.
Apache License 2.0
28 stars 2 forks source link

jackson-core版本不匹配 #6

Closed xfiftyone closed 3 years ago

xfiftyone commented 3 years ago

直接从maven导入1.0.3.RELEASE,jackson-cored的版本是2.9.9,会报ClassNotFound:

Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/exc/InputCoercionException
    at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.createTreeDeserializer(BasicDeserializerFactory.java:1472)
    at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:409)
    at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:349)
    at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
    at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
    at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
    at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:478)
    at com.fasterxml.jackson.databind.ObjectMapper._findRootDeserializer(ObjectMapper.java:4273)
    at com.fasterxml.jackson.databind.ObjectMapper._readTreeAndClose(ObjectMapper.java:4134)
    at com.fasterxml.jackson.databind.ObjectMapper.readTree(ObjectMapper.java:2652)
    at com.r4v3zn.fofa.core.client.FofaClient.getUser(FofaClient.java:84)
    at sample.TestClass.main(TestClass.java:14)
Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.core.exc.InputCoercionException
    at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    ... 12 more

手动替换成jackson-core-2.10.0.pr1.jar可以正常使用。 看了一下maven库中Jackson Databind » 2.10.0.pr1依赖的jackson-core是2.10.0.pr1。

xxxxbxxxxx commented 3 years ago

代码已经更新