Skip to content

@JsonNaming strategy is not supported in GraalVM native image #29386

@sarathchand09

Description

@sarathchand09

Overview

I am using Spring Boot 3.0 RC1 and GraalVM latest.

My native image works fine.

@JsonNaming(PropertyNamingStrategies.UpperSnakeCaseStrategy.class)

Using the above annotation for upper case JSON field names works fine with jar,
but it doesn't work when running in the native image.

I am also using Lombok @Data on my POJO.

2022-10-26T14:42:15.875+02:00 WARN 1 --- [nio-8080-exec-4] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved [org.springframework.http.converter.HttpMessageNotWritableException: Could not write JSON: Error creating bean with name 'com.fasterxml.jackson.databind.PropertyNamingStrategies$UpperSnakeCaseStrategy': Failed to instantiate [com.fasterxml.jackson.databind.PropertyNamingStrategies$UpperSnakeCaseStrategy]: No default constructor found] |

Related Issues

Metadata

Metadata

Assignees

Labels

theme: aotAn issue related to Ahead-of-time processingtype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions