Error in milestone 1

i assigned the value of symbol to the instance of PortfoliomanagerApplication class using readValue function
but i am getting this error

Task :qmoney:run FAILED
16:29:22.777 [main] ERROR com.crio.warmup.stock.log.UncaughtExceptionHandler - {“stacktrace”:[“com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59)”,“com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1442)”,“com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1216)”,“com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1168)”,“com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromArray(BeanDeserializerBase.java:1460)”,“com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:185)”,“com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:161)”,“com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4202)”,“com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3070)”,“com.crio.warmup.stock.PortfolioManagerApplication.mainReadFile(PortfolioManagerApplication.java:56)”,“com.crio.warmup.stock.PortfolioManagerApplication.main(PortfolioManagerApplication.java:140)”],“cause”:“com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of com.crio.warmup.stock.PortfolioManagerApplication out of START_ARRAY token\n at [Source: (File); line: 1, column: 1]”}
com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of com.crio.warmup.stock.PortfolioManagerApplication out of START_ARRAY token
at [Source: (File); line: 1, column: 1]
at com.fasterxml.jackson.databind.exc.MismatchedInputException.from(MismatchedInputException.java:59) ~[jackson-databind-2.10.1.jar:2.10.1]
at com.fasterxml.jackson.databind.DeserializationContext.reportInputMismatch(DeserializationContext.java:1442) ~[jackson-databind-2.10.1.jar:2.10.1]
at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1216) ~[jackson-databind-2.10.1.jar:2.10.1]
at com.fasterxml.jackson.databind.DeserializationContext.handleUnexpectedToken(DeserializationContext.java:1168) ~[jackson-databind-2.10.1.jar:2.10.1]
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromArray(BeanDeserializerBase.java:1460) ~[jackson-databind-2.10.1.jar:2.10.1]
at com.fasterxml.jackson.databind.deser.BeanDeserializer._deserializeOther(BeanDeserializer.java:185) ~[jackson-databind-2.10.1.jar:2.10.1]
at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:161) ~[jackson-databind-2.10.1.jar:2.10.1]
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4202) ~[jackson-databind-2.10.1.jar:2.10.1]
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3070) ~[jackson-databind-2.10.1.jar:2.10.1]
at com.crio.warmup.stock.PortfolioManagerApplication.mainReadFile(PortfolioManagerApplication.java:56) ~[main/:?]
at com.crio.warmup.stock.PortfolioManagerApplication.main(PortfolioManagerApplication.java:140) ~[main/:?]

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ‘:qmoney:run’.

Process ‘command ‘/usr/lib/jvm/java-8-openjdk-amd64/bin/java’’ finished with non-zero exit value 1

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use ‘–warning-mode all’ to show the individual deprecation warnings.
See https://docs.gradle.org/5.2.1/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 5s
3 actionable tasks: 1 executed, 2 up-to-date

brother look at the line numbers they are mentioned, so we can use them to remove errors .
please try removing them one by one

@agentsam007, one of the important skills a developer can have is debugging skills. Try to understand what the error message is telling you. Then try to google the error message.

can you give me a hint about the error?
I figured out which line is causing the error i am not able to figure out how to solve that error
do i have to create an instance of PortfolioManagerApplication class and read the values of trades.json into the instance right?

Have a look at these lines and see what’s wrong.


Looks like it somwhat.