Json Parsing Error

public class Stock {
private String symbol = null;
private int quantity = 0;
private String tradeType = null;
private Date purchaseDate = null;

ObjectMapper objectMapper = getObjectMapper();
File file = resolveFileFromResources(args[0]);
try {
Stock[] stocks = objectMapper.readValue(file,Stock[].class);
} catch (IOException e) {

I have gone through all posts in forum still not able to figure out why mismatched error is raising.

I think you’re trying to create your own objects (Stock). Check out other files in the src directory and read more about DTO.

A pojo class is already provided by crio. Its name is portfoliotrade.java
For more information, checkout the FAQ section

As @AbhishekChd and @visargdesai said the pojo is provided already but for your doubt check the parameters of your Stock class change Date to LocalDate it’ll solve your problem

U don’t need to create a separate class for POJO. Thats’s already available as PortFolioTrade

Also are you returning a List<String> ?