Failed to instantiate java.util.List using constructor NO_CONSTRUCTOR with arguments
Report errors
MappingInstantiationException: Failed to instantiate java.util.List using constructor NO_CONSTRUCTOR with arguments
Reason
Entity classes mapped by a set in Mongo Library
@Data
@NoArgsConstructor
@AllArgsConstructor
@Document(collection = "a")
public class A {
private List<B> b; // this is list
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public static class B {
private String bb;
}
}
A data format of set
{
"_id" : ObjectId("62df884326d4311d9c80de8d"),
"b" : {
"bb" : "test" //this is object
}
}
Solution:
Modify entity classes or process problem data.
Read More:
- [Solved] Hibernate Error: java.lang.StackOverflowError at java.lang.Integer.toString(Integer.java:402)
- How to Solve the Primary Key of mybatisPlus Inserted Data is too Large Issue
- Asynchronous processing of HTTP request by Java_ Method 2: through deferredresult
- Hibernate Error: Error executing DDL “create table course (xxx)“
- I/O error while reading input message; nested exception is java.io.IOException: Stream closed
- [Solved] Java.util.linkedhashmap cannot be cast to entity class
- org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘testApplicat
- [Solved] Springboot2.x ElasticSearch Error: availableProcessors is already set to [4], rejecting [4]
- Spring boot uses thread pool to realize asynchronous processing without return and asynchronous processing with return
- JAVA 8: How to Convert List to Map
- How to convert a Java string into a number (stringtonumber)
- Implementation of retrial mechanism in Java
- [Solved] JSON parse error: Cannot construct instance of
- Java uses single thread pool to realize multi thread sequential execution (non alternating, non synchronous)
- How to Solve Flick operate Error: not serialized
- [Solved] Method threw ‘java.lang.StackOverflowError‘ exception. Cannot evaluate
- The thread implementation of timer in Java
- Extracting JDBC tool class: JDBC utils
- Java Error: No enclosing instance of type Main is accessible. Must qualify the allocation with an encl
- The problem of date format conversion between springboot and front end