-
Notifications
You must be signed in to change notification settings - Fork 160
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
java.lang.NoSuchMethodError caused by dependency conflict issue due to multiple versions of com.fasterxml.jackson.core:jackson-core:jar #540
Comments
@cogmission , May I pull a request to fix this issue? |
@LeoAugust19
Thank you for your interest in making HTM.java the best it can be! |
@cogmission Thanks a lot, I will do that. |
@cogmission Please forgive me for asking you a further question. We provide the above two types of information: Which type of information is more useful for you to confirm it's a bug? |
Hi, I’m on vacation right now. Will be back toward end of August... Please hold tight. Thanks, David |
Hi, there are multiple versions of com.fasterxml.jackson.core:jackson-core:jar in org.numenta:htm.java:jar:0.6.13. As shown in the following dependency tree, based on "Maven's nearest wins strategy", only com.fasterxml.jackson.core:jackson-core:jar:2.4.4 will be loaded and the other conflicting versions will be shadowed, during the packaging process.
However, method <com.fasterxml.jackson.core.JsonParser: java.lang.String nextFieldName()> only exists in jackson-core 2.5.3 and not included in the loaded jackson-core:jar:2.4.4. As a result, an exception will be thrown with the following stack trace, when your project invoking the missing method.
Stack trace
Exception in thread "main" java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonParser.nextFieldName()Ljava/lang/String;
at org.nustaq.serialization.coders.FSTJsonDecoder.readObjectHeaderTag(FSTJsonDecoder.java:329)
at org.nustaq.serialization.FSTObjectInput.readObjectWithHeader(FSTObjectInput.java:340)
at org.nustaq.serialization.FSTObjectInput.readObjectInternal(FSTObjectInput.java:327)
at org.nustaq.serialization.FSTObjectInput.readObject(FSTObjectInput.java:298)
at org.numenta.nupic.Parameters.readForNetwork(Parameters.java:1174)
Dependency tree
org.numenta:htm.java:jar:0.6.13
+- joda-time:joda-time:jar:2.5:compile
+- com.fasterxml.jackson.core:jackson-annotations:jar:2.4.4:compile
+- com.fasterxml.jackson.core:jackson-core:jar:2.4.4:compile
+- com.fasterxml.jackson.core:jackson-databind:jar:2.4.4:compile
| +- (com.fasterxml.jackson.core:jackson-annotations:jar:2.4.0:compile - omitted for conflict with 2.4.4)
| - (com.fasterxml.jackson.core:jackson-core:jar:2.4.4:compile - omitted for duplicate)
+- de.ruedigermoeller:fst:jar:2.45:compile
| +- (com.fasterxml.jackson.core:jackson-core:jar:2.5.3:compile - omitted for conflict with 2.4.4)
| +- org.javassist:javassist:jar:3.19.0-GA:compile
| - org.objenesis:objenesis:jar:2.1:compile
- algorithmfoundry:algorithmfoundry-shade-culled:jar:1.3:compile
Solution
Upgrade jackson (include jackson-annotations, jackson-core and jackson-databind) to version 2.5.3 to keep consistent with de.ruedigermoeller:fst.
Thanks
Regards,
Leo
The text was updated successfully, but these errors were encountered: