question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

com.fasterxml.jackson.databind.util.BeanUtil.okNameForGetter

See original GitHub issue

I am getting this error while using the newest version of jackson core and databind:

java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.util.BeanUtil.okNameForGetter(Lcom/fasterxml/jackson/databind/introspect/AnnotatedMethod;Z)Ljava/lang/String;

java.lang.NoSuchMethodError: com.fasterxml.jackson.databind.util.BeanUtil.okNameForGetter(Lcom/fasterxml/jackson/databind/introspect/AnnotatedMethod;Z)Ljava/lang/String; at com.fasterxml.jackson.module.jaxb.JaxbAnnotationIntrospector.findNameForSerialization(JaxbAnnotationIntrospector.java:824) at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector._addGetterMethod(POJOPropertiesCollector.java:519) at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector._addMethods(POJOPropertiesCollector.java:482) at com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.collect(POJOPropertiesCollector.java:234) at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.collectProperties(BasicClassIntrospector.java:142) at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.forSerialization(BasicClassIntrospector.java:68) at com.fasterxml.jackson.databind.introspect.BasicClassIntrospector.forSerialization(BasicClassIntrospector.java:11) at com.fasterxml.jackson.databind.SerializationConfig.introspect(SerializationConfig.java:530) at com.fasterxml.jackson.databind.ser.BeanSerializerFactory.createSerializer(BeanSerializerFactory.java:133) at com.fasterxml.jackson.databind.SerializerProvider._createUntypedSerializer(SerializerProvider.java:1077) at com.fasterxml.jackson.databind.SerializerProvider._createAndCacheUntypedSerializer(SerializerProvider.java:1037) at com.fasterxml.jackson.databind.SerializerProvider.findValueSerializer(SerializerProvider.java:445) at com.fasterxml.jackson.databind.SerializerProvider.findTypedValueSerializer(SerializerProvider.java:599) at com.fasterxml.jackson.databind.ser.DefaultSerializerProvider.serializeValue(DefaultSerializerProvider.java:93) at com.fasterxml.jackson.databind.ObjectMapper._configAndWriteValue(ObjectMapper.java:2818) at com.fasterxml.jackson.databind.ObjectMapper.writeValueAsString(ObjectMapper.java:2275)

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
cowtowncodercommented, Mar 10, 2017

This means that version of jackson-module-jaxb-annotations you have differs from jackson-databind so that they have different minor versions. While some mismatch versions work, in this case difference is too big; jackson-module-jaxb-annotations was compiled with version of databind different from one you are including.

So you need to check which versions are deployed. Note also that “newest” is not necessarily very clear; I assume you mean 2.8.7 (latest stable), but it could also mean 2.9.0.pr1. Regardless you have to ensure compatible versions are used.

One thing that may be useful is to use jackson-bom dependencty (it’s pom, so needs scope “import”), which contains full set of consistent versions of all standard Jackson components. This should prevent problems like one you describe.

0reactions
trajanocommented, Sep 19, 2017

When I use the current version I get the same error as @dAkado I found that the old version worked correctly. Hopefully this may help people experiencing the same problem. At least as a quick workaround.

Read more comments on GitHub >

github_iconTop Results From Across the Web

com.fasterxml.jackson.databind.util.BeanUtil ... - Tabnine
Best Java code snippets using com.fasterxml.jackson.databind.util.BeanUtil.okNameForSetter (Showing top 15 results out of 315).
Read more >
BeanUtil (jackson-databind 2.9.5 API) - javadoc.io
Method called to figure out name of the property, given corresponding suggested name based on a method or field name. static String ·...
Read more >
BeanUtil (jackson-databind 2.12.0 API) - FasterXML
Method called to figure out name of the property, given corresponding suggested name based on a method or field name. static String ·...
Read more >
What are the Jersey versions compatible with Jackson 2.9.2
Jersey supports Jackson via the jersey-media-json-jackson ... The BeanUtil. ... NoSuchMethodError: com.fasterxml.jackson.databind.util.
Read more >
com.fasterxml.jackson.databind.util.BeanUtil Java Examples
This page shows Java code examples of com.fasterxml.jackson.databind.util.BeanUtil.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found