Home » Java » jackson: InvalidDefinitionException using [Ljava.lang.Double

jackson: InvalidDefinitionException using [Ljava.lang.Double

Posted by: admin June 30, 2018 Leave a comment


I’m using Jackson for mapping the following json into a Map<String, Class>:

    "keyA": "java.lang.Double",
    "keyB": "[Ljava.lang.Double"

But I am getting the following exception:

com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `java.lang.Class`, problem: [Ljava/lang/Double

Refering to the Java documentation for class file format the value should be correct.

Does anyone have an idea how to solve this?

I used “[L” as I want to have the class of an Double[].