Skip to content

Improve EntityInstantiator error message if the to be instantiated type is abstract #2348

Closed
@mp911de

Description

@mp911de

Right now, the failure looks like:

java.lang.InstantiationError: com.example.demo.CustomDto
	at com.example.demo.CustomDto_Instantiator_ddeq8t.newInstance(Unknown Source) ~[main/:na]
	at org.springframework.data.mapping.model.ClassGeneratingEntityInstantiator$EntityInstantiatorAdapter.createInstance(ClassGeneratingEntityInstantiator.java:238) ~[spring-data-commons-2.4.5.jar:2.4.5]
	at org.springframework.data.mapping.model.ClassGeneratingEntityInstantiator.createInstance(ClassGeneratingEntityInstantiator.java:87) ~[spring-data-commons-2.4.5.jar:2.4.5]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions