0

I tried to deploy the application on Heroku, but after connecting ClearDB mySQL I get an error 500.

heroku logs:

2022-01-18 18:09:20.331 ERROR 4 --- [io-57013-exec-3] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template [home], template might not exist or might not be accessible by any of the configured Template Resolvers] with root cause
2022-01-18T18:09:20.332252+00:00 app[web.1]:
2022-01-18T18:09:20.332253+00:00 app[web.1]: org.thymeleaf.exceptions.TemplateInputException: Error resolving template [home], template might not exist or might not be accessible by any of the configured Template Resolvers
Niroshan
  • 2,064
  • 6
  • 35
  • 60
  • 1
    Welcome to Stack Overflow. [HTTP 500](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#5xx_Server_Error) is a generic server-side error message. On its own it doesn't tell us anything useful. Any time you see this your first step should be to check your error logs for more detail. On Heroku, you can do this by running [`heroku logs`](https://devcenter.heroku.com/articles/heroku-cli-commands#heroku-logs). – ChrisGPT was on strike Jan 18 '22 at 17:29
  • @Chris, Thank you, but ERROR 4[io-57013-exec-3] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template [home], template might not exist or might not be accessible by any of the configured Template Resolvers] with root cause. **My home.html is locate default src/main/resources/Templates/home.html and thymeleaf have connecting . I don`t see promblem here.** – Aleksandr Kasyuk Jan 18 '22 at 18:19
  • 1
    You might not see a problem, but that's why you're here asking a question. Others might see something you missed. Please [edit] that into your question as a code block along with any other error messages that might precede it. – ChrisGPT was on strike Jan 18 '22 at 18:46
  • @Chris, Thank you very much. Edited the question :) – Aleksandr Kasyuk Jan 18 '22 at 18:53

1 Answers1

0

Problem solved by changing the folder structure:

src/main/resources/Templates -> src/main/resources/templates

PS: Folder names must be strictly followed for Heroku in this case.

  • As it’s currently written, your answer is unclear. Please [edit] to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 18 '22 at 23:26