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.

jacksonObjectMapper not found

See original GitHub issue

After defining a riptide client in the application.yml the application start fails due to missing bean definition jacksonObjectMapper

riptide:
  defaults:
    connection-timeout: 1 seconds
    socket-timeout: 2 seconds
    connection-time-to-live: 30 seconds
    record-metrics: true
  clients:
    myclient:
      base-url: https://example.org
2017-12-05 16:10:41,627 {WARN} [restartedMain] [] [org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myclientHttpMessageConverters': Cannot create inner bean '(inner bean)#1bd5293e' of type [org.springframework.http.converter.json.MappingJackson2HttpMessageConverter] while setting constructor argument with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#1bd5293e': Cannot resolve reference to bean 'jacksonObjectMapper' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'jacksonObjectMapper' available

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
lukasniemeier-zalandocommented, Dec 5, 2017

At the point the Riptide starter is generating beans full type information is not yet available to the context. I think it is not possible to search the context by bean type during this phase.

Maybe look into Jackson2ObjectMapperBuilder and Jackson2ObjectMapperBuilderCustomizer of spring-boot in order to rather customize the default ObjectMapper bean.

0reactions
jmatusewiczcommented, Dec 5, 2017

Thanks, I did it already and it solved the issue. I thought maybe riptide could auto discover a present ObjectMapper bean, regardless of the bean name.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jackson Object Mapper in Spring not working - Stack Overflow
I have Spring MVC app which receives JSON POSTed from Javascript frontend. Using Jackson 2, custom object mapper only to set ...
Read more >
Java JSON deserialization problems with the Jackson ... - Snyk
Learn how Jackson ObjectMapper deserialization vulnerabilities work and how to make sure you are not affected by them.
Read more >
Jackson Support for Kotlin - Baeldung
We can create one using jacksonObjectMapper(): ... While deserializing, if a field is missing from JSON String, the mapper will use the ...
Read more >
ObjectMapper (jackson-databind 2.7.0 API) - FasterXML
If the specific kind of configurability is not available via ObjectReader and ObjectWriter , you may need to use multiple ObjectMapper instead (for...
Read more >
Jackson - ObjectMapper Class - Tutorialspoint
Jackson - ObjectMapper Class, ObjectMapper is the main actor class of Jackson library. ... field, constructor) can be auto-detected or not.
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