java.lang.IllegalArgumentException: ApplicationContext has not been initialized in resource resolver. TemplateResolver or ResourceResolver might not have been correctly configured by the Spring Application Context.

Stack Overflow | Fiftoine | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Spring Boot - multiple template location

    Stack Overflow | 6 months ago | Fiftoine
    java.lang.IllegalArgumentException: ApplicationContext has not been initialized in resource resolver. TemplateResolver or ResourceResolver might not have been correctly configured by the Spring Application Context.

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      ApplicationContext has not been initialized in resource resolver. TemplateResolver or ResourceResolver might not have been correctly configured by the Spring Application Context.

      at org.thymeleaf.util.Validate.notNull()
    2. thymeleaf
      Validate.notNull
      1. org.thymeleaf.util.Validate.notNull(Validate.java:37)
      1 frame
    3. thymeleaf-spring4
      SpringResourceResourceResolver.getResourceAsStream
      1. org.thymeleaf.spring4.resourceresolver.SpringResourceResourceResolver.getResourceAsStream(SpringResourceResourceResolver.java:81)
      1 frame
    4. thymeleaf
      TemplateEngine.process
      1. org.thymeleaf.TemplateRepository.getTemplate(TemplateRepository.java:221)
      2. org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1104)
      3. org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1060)
      4. org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1011)
      4 frames
    5. thymeleaf-spring4
      ThymeleafView.render
      1. org.thymeleaf.spring4.view.ThymeleafView.renderFragment(ThymeleafView.java:335)
      2. org.thymeleaf.spring4.view.ThymeleafView.render(ThymeleafView.java:190)
      2 frames
    6. Spring MVC
      FrameworkServlet.doGet
      1. org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1257)
      2. org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1037)
      3. org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:980)
      4. org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:897)
      5. org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:970)
      6. org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:861)
      6 frames
    7. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
      1 frame
    8. Spring MVC
      FrameworkServlet.service
      1. org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:846)
      1 frame