Search code examples
spring-bootspring-tool-suite

There was an unexpected error (type=Not Found, status=404) spring STS


I am trying to built an E-commerce application using spring boot. I am working on two different laptops and both have spring sts install . when I try to run same project on my 2nd laptop I got following error .

Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Thu Apr 27 12:58:20 CDT 2017 There was an unexpected error (type=Not Found, status=404). No message available

But that same project is working perfectly on my 1st laptop .

my project structure is as bellow .

https://s15.postimg.org/bak02e67f/Capture.png


Solution

  • There are many things that could have caused it. In your project structure, it is visible you have Repository classes, so probably you are using a database. Do you connect to a local database or on a different server? Is it possible that you are connecting to a different database from any one of the laptop? If you are using a local database, maybe you have less data saved then in the other one? Maybe you have an application.property file in your filesystem overriding the ones from the project directory? Honestly, to find out you should probably set your logs at the debug level and have a look at them to see what is going on or -in case the logs are poor or nonexistent- use debugger tool to verify what method is causing 404 to be returned and why.