Build failure with an exception :no such element found

Task :qmoney:run
Mar 05, 2020 3:05:34 PM com.crio.warmup.stock.PortfolioManagerApplication printJsonObject
INFO: [“AAPL”,“MSFT”,“GOOGL”]
[main] ERROR com.crio.warmup.stock.log.UncaughtExceptionHandler - {“stacktrace”:[“java.util.Optional.get(Optional
.java:135)”,“com.crio.warmup.stock.PortfolioManagerApplication.mainReadQuotes(PortfolioManagerApplication.java:114)”,“com.crio
.warmup.stock.PortfolioManagerApplication.main(PortfolioManagerApplication.java:208)”],“cause”:“java.util.NoSuchElementException: No value present”}
java.util.NoSuchElementException: No value present
at java.util.Optional.get(Optional.java:135) ~[?:1.8.0_242]
at com.crio.warmup.stock.PortfolioManagerApplication.mainReadQuotes(PortfolioManagerApplication.java:114) ~[main/:?]
at com.crio.warmup.stock.PortfolioManagerApplication.main(PortfolioManagerApplication.java:208) ~[main/:?]

Task :qmoney:run FAILED

FAILURE: Build failed with an exception.

How do I deal with this?

You are getting a noSuchElementException, which implies you are trying to fetch an element which does not exist in your data structure.

1 Like

I’m closing this topic due to no response from anyone since last 15 hours. If your query is resolved you can mark any reply as a solution. If you still have the query, please create a new topic paste the link of this topic in the description.