Runni Qmoney Springboot app

App after running shows this error
{“message”:“Request failed with status code 500”,“name”:“Error”,“stack”:“Error: Request failed with status code 500\n at e.exports (http://skiran252-zvzz.ws.crio.do:8081/static/js/2.3658a489.chunk.js:2:497965)\n at e.exports (http://skiran252-zvzz.ws.crio.do:8081/static/js/2.3658a489.chunk.js:2:1099522)\n at XMLHttpRequest.p.onreadystatechange (http://skiran252-zvzz.ws.crio.do:8081/static/js/2.3658a489.chunk.js:2:496798)”,“config”:{“url”:"/portfolio/analyze",“method”:“post”,“data”:"{“name”:“Anand”,“portfolioTrades”:[{“symbol”:“AAPL”,“quantity”:100,“tradeType”:“BUY”,“purchaseDate”:“2019-01-02”,“tableData”:{“id”:0}},{“symbol”:“MSFT”,“quantity”:10,“tradeType”:“BUY”,“purchaseDate”:“2019-01-02”,“tableData”:{“id”:1}},{“symbol”:“GOOGL”,“quantity”:50,“tradeType”:“BUY”,“purchaseDate”:“2019-01-02”,“tableData”:{“id”:2}}]}",“headers”:{“Accept”:“application/json, text/plain, /”,“Content-Type”:“application/json;charset=utf-8”},“transformRequest”:[null],“transformResponse”:[null],“timeout”:0,“xsrfCookieName”:“XSRF-TOKEN”,“xsrfHeaderName”:“X-XSRF-TOKEN”,“maxContentLength”:-1}}

Hey @saikiran0802 if you will observe it you will get to know about in which function and in which file you are getting this mainly it occurs in PortfoliomanagerImpl.java getStockQuote() function where the error is commonly

ArrayIndexOutOfBoundsException
Nullpointerexception

so observe stacktrace and you will get the line number in which its occurring and then debug near to that

Yes the response from api is coming null

Yes i m trying now i got ArrayIndexOutOfBoundsException

Close to resolve it try to debug it once more i am sure you will get it done and for hint check for URL and check for case when there is ticker which is invalid.

how to debug when its invoked by external inputs

the error is in portfoliomanageimpl getOpen()

Size: 0]
{
“Note”: “Thank you for using Alpha Vantage! Our standard API call frequency is 5 calls per minute and 500 calls per day. Please visit
https://www.alphavantage.co/premium/ if you would like to target a higher API call frequency.”
}
am i going right.is it my why the ap runs and again it fails

Hey @saikiran0802 looking into your workspace but when i am running ./gradlew bootrun it’s throwing some compilejava errors fix those first.

its in annual return app it asks to throw exception when thrown doesnt recognize it cannot find symbol
throws InterruptedException,JsonProcessingException

i have solved it sir can you have a look at it

your port number 8081 is already in use resolve make it free then run

./gradlew bootrun

shall i close the tab the output on spring app on tab doesnt change

Sir i am idle ,i think i might have interrupted you by running here.were you able to access it

Thanks @amanagar i was able to solved module 7 i thought visually it should change in bootrun app is it change handling exception

1 Like

Closing this topic as your issue is resolved by the mentor. If it is still not resolved, please feel free to create a new topic and post this question as a reference link in the description of the new topic.