Error com.fasterxml.jackson.databind.JsonMappingException when using Java 8 date types with JAX-RS services in JBoss EAP 7.1

Solution Verified - Updated -

Issue

The client system (using EAP 7.1) is unable to deserialize an instance of the new LocalDateTime from one of the backend entities via RESTEasy. When it tries to read the JSON response using the client the following exception is thrown:

com.fasterxml.jackson.databind.JsonMappingException: Can not construct instance of java.time.LocalDateTime: no suitable constructor found, can not deserialize from Object value

Is it needed to have to write a custom ObjectMapper? If so, what is the recommended way to do this?

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 7.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content