Build successful but getting this message

Build successful but getting this message and INFO:[] . @Rahul-Crio.do @sashi_Crio.Do

com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of java.time.LocalDate (no Creators, like default construct, exist): no String-argument constructor/factory method to deserialize from String value (‘2019-01-02’)
at [Source: (FileInputStream); line: 6, column: 21] (through reference chain: java.util.ArrayList[0]->com.crio.warmup.stock.dto.PortfolioTrade[“purchaseDate”])
at com.fasterxml.jackson.databind.exc.InvalidDefinitionException.from(InvalidDefinitionException.java:67)
at com.fasterxml.jackson.databind.DeserializationContext.reportBadDefinition(DeserializationContext.java:1589)
at com.fasterxml.jackson.databind.DeserializationContext.handleMissingInstantiator(DeserializationContext.java:1055)
at com.fasterxml.jackson.databind.deser.ValueInstantiator._createFromStringFallbacks(ValueInstantiator.java:371)
at com.fasterxml.jackson.databind.deser.std.StdValueInstantiator.createFromString(StdValueInstantiator.java:323)
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromString(BeanDeserializerBase.java:1373)
at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:171)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:161)
at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:288)
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:151)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:286)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)
at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:27)
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4202)
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3250)
at com.crio.warmup.stock.PortfolioManagerApplication.mainReadFile(PortfolioManagerApplication.java:78)
at com.crio.warmup.stock.PortfolioManagerApplication.main(PortfolioManagerApplication.java:175)
Mar 03, 2020 12:29:23 AM com.crio.warmup.stock.PortfolioManagerApplication printJsonObject
INFO: []

And then I’m iterating over pt and getting the symbol and adding it to a new string list and returning it.

Hi @NishanthR,

As a basic guideline, it’s always advised to not share the code on forum.

As for your doubt, clearly there is some issue with the method. I am guessing you aren’t returning the strings you have extracted or aren’t extracting the string properly. Just check your code using a debugger and see which is the case.

Let me know if you need help!

Hey I have edited your code out, we have a potential FAQ for your error.
https://forum.crio.do/t/error-com-fasterxml-jackson-databind-exc-invaliddefinitionexception/7119/2

I am closing this ticket, since it’s been more than 12 hours and I have not received any response from you.