0
2019-05-15 14:14:39.760 ERROR 5700 --- [io-8080-exec-14] org.thymeleaf.TemplateEngine             : [THYMELEAF][http-nio-8080-exec-14] Exception processing template "Dashboard": An error happened during template parsing (template: "class path resource [templates/Dashboard.html]")

On my local computer, there is no problem.

And in the end of log, some other logs:

Caused by: org.thymeleaf.exceptions.TemplateInputException: Error resolving template [layouts/left-nav-bar], template might not exist or might not be accessible by any of the configured Template Resolvers (template: "layouts/Master" - line 99, col 14)

The error comes after here:

response.sendRedirect("/myPassword" + viewMyPasswordParam);

I used request.getContextPath()

instead of that but still error.

2019-05-15 14:44:20.228  INFO 5700 --- [io-8080-exec-14] c.b.g.backend.service.GenericService     : Redirecting to /myPassword

in onAuthenticationSuccess UNEXPECTED ERROR (this is custom message for /error) 404 could not find page: /error

this is code

        @Override
        public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException {
           .
    .
    .
    .
    .
        response.sendRedirect(request.getContextPath() + "/myPassword" + viewMyPasswordParam);
  GenericService.logger.info("Redirecting to {} in onAuthenticationSuccess");
//i tried also without request.getContextPath() + 

is it about thymeleaf? Should i give classpath to thymeleaf?

Caner Aydın
  • 195
  • 2
  • 6
  • 18
  • Try the solution here, something related to the template resolver: https://stackoverflow.com/questions/15777425/springmvcthymeleaf-error-message-is-template-might-not-exist-or-might-not-be/16302768 .... Probably if it is working in the IDE, open the JAR generated and see in which folder the templated are been placed. It sounds like a configuration issue. – Brother May 15 '19 at 12:43
  • @Brother i look in tomcat, folders are correct. I suspect thymeleaf – Caner Aydın May 15 '19 at 12:59
  • Can it be because we tested on windows but tomcat is on centos? windows- linux difference? like slashes – Caner Aydın May 15 '19 at 13:11
  • Take a look on this one as well: https://stackoverflow.com/questions/32936108/thymeleaf-template-not-found-with-embedded-tomcat. Sorry, I don't have a windows machine to replicate this issue. – Brother May 15 '19 at 13:17
  • It is because of case sensitivity. Windows does not care about capitals but linux cares so cant redirect to Test.html for example. now only error is ``Forwarding to error page from request [/add-money] due to exception [Can't find bundle for base name RESULT, locale tr]`` – Caner Aydın May 15 '19 at 13:59
  • https://stackoverflow.com/questions/31862248/case-sensitivity-issue-with-tomcat-8-resources-preresources i think it is about this. – Caner Aydın May 15 '19 at 14:22

0 Answers0