-
Notifications
You must be signed in to change notification settings - Fork 205
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
Missing jackson.databind in jar? #57
Comments
I don't understand. What is the error you are receiving? How are you installing this? If you are just loading the JAR, you will need to also load the other dependencies. There is a zip file with all of them on the releases page. |
I added the following to my pom.xml:
|
Sorry, that error message was a bad copy/paste. Fixed. |
Is it possible you are pulling in older version of |
Probably, although I'm not pulling it in explicitly in my pom. Is there a straightforward way for me to check where else it could be provided? Is there a setting that would allow me to ensure that geoIP is using the correct version of jackson-databind? |
If you want to figure out the problem, you could look at
I'd suggest the former as if you force the dependency, you'll need to update it manually with new versions of GeoIP2. |
If you check your dependency tree, you'll most likely find a version of jackson older than 2.7.0 pulled in by another library. (For example, I had to add this override for Jersey: com.fasterxml.jackson.jaxrs:jackson-jaxrs-json-provider:2.7.0) In any case, this is not a geoip issue, just a general dependency management problem. |
Got it, thanks. I'll close the issue and try to debug this a bit more. |
Hmm, so I thought I resolved this issue and after the tests successfully built and executed in Intellij, but in production I'm getting the same behavior I described in the initial post. I checked out the dependency tree and there are many instances of jackson-databind, all of them in packages I don't control.
How can I resolve these conflicts? Should I exclude jackson-databind from each of these dependencies? |
Hmm, the exclude removed all conflicts in the tree, yet I'm still getting the same error in production (but not running unit tests in intellij).
|
Moving issue to https://stackoverflow.com/questions/34958520/nosuchmethodexception-in-mvn-dependency-without-conflicts since it probably isn't a GeoIP issue. |
This probably isn't a GeoIP problem, but I did notice that the shaded jar I am providing to Apache Spark expands the jackson-databding jar provided by GeoIp into its constituent *.class files, instead of the jar itself. Is this normal? There's a bit more detail in the stackoverflow link, but the spark task fails at init while test cases outside of spark succeed. It seems like this there is something wrong either with the shaded jar or the spark classpath, but I'm not sure how to proceed debugging this issue. Has anyone else used GeoIP2 in a Spark task? I know there was a known issue with jackson-databind due to a very old version being used and the jar was not shaded, causing some issues in the dependency namespace, but that seems to have been patched in recent versions. |
I don't know much about Apache Spark. You might have better luck asking on the Spark user email list or a similar forum. |
THis was resolved in the shaded jar by relocating the jackson-databing. |
I have same problem and i do not have any other jackson-databind in the classpath.
Artifacts tree is:
What i could be doing wrong? |
@oschwald maven is so weird :-/ |
As this issue has come up so much, I have specified a hard minimum dependency on 2.7.0. The soft dependency in |
For people running into this on Spark, the hard minimum dependency in this library may be ignored at runtime because Spark provides its own version (2.4.4 as of Spark 1.6.1). For now I think @laxatives' solution is the way to get around this (though I'm not sure why you only had to shade core). For sbt I used the following
|
Although I am not familiar with Spark, if you are unable to provide your own Jackson version, you could try using a version of this library that doesn't use 2.7-specific functionality, e.g., |
I am having the same problem allocating the correct dependency version while using spark from Zeppelin. Any ideas ? |
While I'm using jackson dependency directly, I was surprised to see different versions of jackson in the outpu of evicted sbt command :
Pay attention that com.maxmind.geoip2:geoip2:2.12.0 and com.maxmind.db:maxmind-db:1.2.2 |
@constantOut, is this causing a particular issue? Maven uses nearest-first dependency resolution and you should end up with the newer version. |
I'm using SBT, this is causing issue when running on spark, however I'm not sure that this is a primary cause of the problem as other people had problem with jackson on Spark. |
|
I'll dig into that, thanks. |
I'm trying to use this library, but get the error below from the following line:
yields:
Does this indicate the source is missing the jackson.databind.jar? Is it possible I have two conflicting copies of this dependency?
The text was updated successfully, but these errors were encountered: