Templateinputexception an error happened during template parsing

Русские Блоги org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template Информация об исключении Приведенная выше информация об исключении указывает на то, что есть ошибка в содержимом страницы list.html, и ошибка должна быть найдена на странице. Аномальный При просмотре страницы list.htm было обнаружено, что имя атрибута name user.dept на странице не соответствовало имени атрибута dname […]

Содержание

  1. Русские Блоги
  2. org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template
  3. Информация об исключении
  4. Аномальный
  5. Интеллектуальная рекомендация
  6. Реализация оценки приложения iOS
  7. JS функциональное программирование (е)
  8. PWN_JarvisOJ_Level1
  9. Установка и развертывание Kubernetes
  10. На стороне многопроцессорного сервера — (2) *
  11. Exception evaluating SpringEL expression: «_csrf.token» #110
  12. Comments

Русские Блоги

org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template

Информация об исключении

Приведенная выше информация об исключении указывает на то, что есть ошибка в содержимом страницы list.html, и ошибка должна быть найдена на странице.

Аномальный

При просмотре страницы list.htm было обнаружено, что имя атрибута name user.dept на странице не соответствовало имени атрибута dname класса сущности Dept. Имя атрибута страницы соответствовало имени атрибута класса сущности, и проблема была решена.

Сказанное выше — моя неосторожная ошибка, надеюсь, это поможет всем.

Интеллектуальная рекомендация

Реализация оценки приложения iOS

Есть два способа получить оценку приложения: перейти в App Store для оценки и оценка в приложении. 1. Перейдите в App Store, чтобы оценить ps: appid можно запросить в iTunes Connect 2. Встроенная оцен.

JS функциональное программирование (е)

Давайте рассмотрим простой пример, чтобы проиллюстрировать, как используется Reduce. Первый параметр Reduce — это то, что мы принимаем массив arrayOfNums, а второй параметр — функцию. Эта функция прин.

PWN_JarvisOJ_Level1

Nc первый Затем мы смотрим на декомпиляцию ida Перед «Hello, World! N» есть уязвимая_функция, проверьте эту функцию после ввода Видно, что только что появившийся странный адрес является пе.

Установка и развертывание Kubernetes

На самом деле, я опубликовал статью в этом разделе давным -давно, но она не достаточно подробно, и уровень не является ясным. Когда я развернулся сегодня, я увидел его достаточно (хотя это было успешн.

На стороне многопроцессорного сервера — (2) *

Обработка сигнала Родительский процесс часто очень занят, поэтому вы не можете просто вызвать функцию waitpid, чтобы дождаться завершения дочернего процесса. Затем обсудите решение. Обратитесь .

Источник

Exception evaluating SpringEL expression: «_csrf.token» #110

I am trying out Thymeleaf 3 in my Spring Boot (1.3.5) application with Spring Security and getting an exception which did not happen in Thymeleaf 2.1.

My page template has this code:

The exception is thrown when a page is requested while the user has no active session. When a user has a session, there is no exception.

I think the very last exception is the most relevant:

Caused by: java.lang.IllegalStateException: Cannot create a session after the response has been committed

Evaluating the SpEL expression _csrf.token causes a session to be created if there is not one already.

I suspect that the new Throttled template execution (thymeleaf/thymeleaf#487) which does «not start processing the template until the output channels are ready to transmit output» causes this error. In Thymeleaf 2, the response was not committed when the template was processed while in Thymeleaf 3, the template is processed much later when the response is committed.

There might also be other expressions or dialects which have side-effects that are completely incompatible with this new (late) template processing model.

The text was updated successfully, but these errors were encountered:

I use this workaround for now:

with hasSession populated with:

When Thymeleaf automatically adds a hidden CSRF input field to a form, there is no problem with creating a session by trying to access the CSRF token value.

I assume this ordering of processors (and pre and posti processors) is by design so as to avoid writing to the http response too soon. I’m still posting some more details in case this case only works by chance rather than by design.

Stack trace (shortened) when the CSRF token is accessed for populating the hidden csrf input:

It’s not exactly engine throttling that is causing this. Throttling is only used in reactive environments, and Spring Boot isn’t one.

However, it has to do with the new architecture: Thymeleaf’s new architecture tries to reduce latency to the minimum by producing template output as the template is being processed. So by the time it reaches your tag, output for the part of your template that goes before that tag will have already been generated, potentially having caused the web server’s output buffer to fill and therefore to flush towards the client. This is why, when the offending code is executed, the web server considers your response to have already been committed and therefore does fail when your code tries to create a new session.

I’m afraid this is an architectural constraint (actually, it’s the way most other template engines work). In v2.1, all output was generated in memory before output started to be produced, and therefore this scenario would never happen. However, this was changed because latency-wise it was at best obviously «sub-optimal».

If your workaround works for you —if you don’t really have to create any new sessions there—, I’d stick to it as a valid fix. Actually, not creating sessions if you don’t need them will certainly benefit your applications performance and memory usage.

If you really need to create sessions at that point in your template, I’d try to move that fragment of code further up in the template in order to avoid the response already committed part, or if that is not possible, create a post-processor (see org.thymeleaf.postprocessor.IPostProcessor : http://www.thymeleaf.org/apidocs/thymeleaf/3.0.0.RELEASE/org/thymeleaf/postprocessor/IPostProcessor.html ) that simply caches all the events launched by the engine in a List , and sends them all to output when the ITemplateEnd event is received (when execution is finished). That will make v3.0 emulate the behaviour in v2.1 —not creating output until all processing has been done—, but of course you’d lose an important part of the performance advantage of Thymeleaf 3.

Oh, and an even easier solution would be to process your template into a String by calling the TemplateEngine directly, and then writing that String to output. Or, instead, tweaking the HttpServletResponse#getWriter (by adding a web filter like URL-rewriting filters do) so that the writer caches all the output before sending to the real response writer.

Thank you for the detailed explanation.

Since we posted our comments at about the same time, I’ll ask this bit again. Is there a potential problem with the hidden csrf field added to forms? Is everything wired up so the response is not written to before the csrf token value is accessed?

My simple test (login form) shows that it works fine, but I can certainly have missed an error condition.

p.s. Before encountering this issue, I had not realized that I was needlessly creating sessions. You are of indeed right that it’s better to avoid creating sessions if possible.

To rephrase my last question, this worries me from thymeleaf/thymeleaf#389

In order to achieve these goals, Thymeleaf 3.0 abandons most of its DOM-oriented processing mechanisms and turns into an event-based template processor that responds to template parser/cache events by processing the template markup or text and immediately producing its output, even before new events coming from input for the same template are processed.

If some output was written to the response (from a previous element block) before the template processor gets to a

I understand. The basic repository strategy for storing the CSRF token between HTTP requests in Spring Security involves using an HttpSession , so in some sense an application using CSRF protection should be already creating sessions for its users/visitors as a security requirement (unless there is a stateless part of the application, like seems to be your case, which in this case will probably go CSRF-unprotected). Anyway, the view layer doesn’t seem like the right place to create user sessions in most cases.

Thymeleaf however does not deal with CSRF tokens. All it does is ask Spring Web’s (not Spring Security’s) RequestDataValueProcessor mechanism whether it should include any additional hidden fields inside a form. If this mechanism answers yes it will provide Thymeleaf with the fields to be added, but at no point Thymeleaf has any specific code for CSRF or understands the specificities of CSRF-handling. It’s simply that Spring Security injects itself into this RequestDataValueProcessor mechanism and makes it return the CSRF-related fields, including its token. This is completely transparent to Thymeleaf.

It is therefore the responsibility of Spring Security or the application developer to make sure that when Thymeleaf reaches the point of having to write a CSRF token, a session already exists (or a different token-storing strategy not involving the session is being used).

Actually, this behaviour in Thymeleaf is completely equivalent to what Spring’s own JSP tag library does (see org.springframework.web.servlet.tags.form.FormTag ). No CSRF-specific code there either. If a session is created at this point it is a (maybe undesired) lateral effect. And JSP also writes output as the template is processed, so the scenario is equivalent to that of Thymeleaf.

What could be called the «stateless» part of the application is the login form. I say stateless because it’s accessible without a session, but In fact, it’s not really stateless since it’s protected by CSRF which triggers the creation of a session. Something somewhere has to trigger the first session creation.

In my tests, I found 2 conditions which trigger output flushing which in turn marks the response as «committed»:

  1. Having 16kb in the buffer (with Spring Boot embedded Tomcat)
  2. Thymeleaf’s inline serializing uses Jackson. Jackson flushes its buffer after serialization.

(this list is probably not exhaustive)

So it seems, I will indeed need to ensure a session is present in the login controller (the GET part) instead of having it implicitly created when requesting the CSRF token value.

I guess this issue can be closed then. Thanks for your insight.

Источник

I’m using Spring Boot, Thymeleaf, and thymeleaf-layout-dialect.
I’ve got a custom template for error, at /templates/error.html

While rendering my view explore I get a TemplateInputException as expected due to failure to resolve th:replace="explore/foo.html". This exception is correctly caught by the servlet dispatcher and forwarded to /error. However, while rendering the error page this cause gets thrown again, resulting in a broken version of the original page instead of the error page.

org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/error.html]")
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1013) ~[spring-webmvc-5.1.7.RELEASE.jar:5.1.7.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:897) ~[spring-webmvc-5.1.7.RELEASE.jar:5.1.7.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:645) ~[javax.servlet-api-4.0.1.jar:4.0.1]
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:882) ~[spring-webmvc-5.1.7.RELEASE.jar:5.1.7.RELEASE]
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:750) ~[javax.servlet-api-4.0.1.jar:4.0.1]
	at io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74) ~[undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:129) ~[undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:320) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:116) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:84) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:209) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:186) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.saml.metadata.MetadataGeneratorFilter.doFilter(MetadataGeneratorFilter.java:87) ~[spring-security-saml2-core-1.0.9.RELEASE.jar:1.0.9.RELEASE]
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178) ~[spring-security-web-5.1.5.RELEASE.jar:5.1.5.RELEASE]
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357) ~[spring-web-5.1.7.RELEASE.jar:5.1.7.RELEASE]
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270) ~[spring-web-5.1.7.RELEASE.jar:5.1.7.RELEASE]
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at org.springframework.web.servlet.resource.ResourceUrlEncodingFilter.doFilter(ResourceUrlEncodingFilter.java:64) ~[spring-webmvc-5.1.7.RELEASE.jar:5.1.7.RELEASE]
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at org.springframework.session.web.http.SessionRepositoryFilter.doFilterInternal(SessionRepositoryFilter.java:151) ~[spring-session-core-2.1.6.RELEASE.jar:2.1.6.RELEASE]
	at org.springframework.session.web.http.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:81) ~[spring-session-core-2.1.6.RELEASE.jar:2.1.6.RELEASE]
	at io.undertow.servlet.core.ManagedFilter.doFilter(ManagedFilter.java:61) ~[undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.FilterHandler$FilterChainImpl.doFilter(FilterHandler.java:131) ~[undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.FilterHandler.handleRequest(FilterHandler.java:84) ~[undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62) ~[undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:68) ~[undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36) ~[undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43) ~[undertow-core-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.SessionRestoringHandler.handleRequest(SessionRestoringHandler.java:119) ~[undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:274) [undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchToPath(ServletInitialHandler.java:209) [undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.spec.RequestDispatcherImpl.error(RequestDispatcherImpl.java:501) ~[undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.spec.RequestDispatcherImpl.error(RequestDispatcherImpl.java:427) ~[undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:331) [undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81) [undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138) [undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135) [undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48) [undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) [undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272) [undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81) [undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104) [undertow-servlet-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.server.Connectors.executeRootHandler(Connectors.java:364) [undertow-core-2.0.20.Final.jar:2.0.20.Final]
	at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) [undertow-core-2.0.20.Final.jar:2.0.20.Final]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_191]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_191]
	at java.lang.Thread.run(Thread.java:748) [na:1.8.0_191]
Caused by: org.thymeleaf.exceptions.TemplateInputException: An error happened during template parsing (template: "class path resource [templates/error.html]")
	at org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parse(AbstractMarkupTemplateParser.java:241) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parseStandalone(AbstractMarkupTemplateParser.java:100) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.engine.TemplateManager.parseAndProcess(TemplateManager.java:666) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1098) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.TemplateEngine.process(TemplateEngine.java:1072) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.spring5.view.ThymeleafView.renderFragment(ThymeleafView.java:362) ~[thymeleaf-spring5-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.spring5.view.ThymeleafView.render(ThymeleafView.java:189) ~[thymeleaf-spring5-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1371) ~[spring-webmvc-5.1.7.RELEASE.jar:5.1.7.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1117) ~[spring-webmvc-5.1.7.RELEASE.jar:5.1.7.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1056) ~[spring-webmvc-5.1.7.RELEASE.jar:5.1.7.RELEASE]
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:942) ~[spring-webmvc-5.1.7.RELEASE.jar:5.1.7.RELEASE]
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1005) ~[spring-webmvc-5.1.7.RELEASE.jar:5.1.7.RELEASE]
	... 65 common frames omitted
Caused by: org.attoparser.ParseException: Error resolving template [explore/foo.html], template might not exist or might not be accessible by any of the configured Template Resolvers (template: "explore" - line 13, col 8)
	at org.attoparser.MarkupParser.parseDocument(MarkupParser.java:393) ~[attoparser-2.0.5.RELEASE.jar:2.0.5.RELEASE]
	at org.attoparser.MarkupParser.parse(MarkupParser.java:257) ~[attoparser-2.0.5.RELEASE.jar:2.0.5.RELEASE]
	at org.thymeleaf.templateparser.markup.AbstractMarkupTemplateParser.parse(AbstractMarkupTemplateParser.java:230) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	... 76 common frames omitted
Caused by: org.thymeleaf.exceptions.TemplateInputException: Error resolving template [explore/foo.html], template might not exist or might not be accessible by any of the configured Template Resolvers (template: "explore" - line 13, col 8)
	at org.thymeleaf.engine.TemplateManager.resolveTemplate(TemplateManager.java:869) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.engine.TemplateManager.parseStandalone(TemplateManager.java:250) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.standard.expression.FragmentExpression.resolveExecutedFragmentExpression(FragmentExpression.java:588) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.standard.processor.AbstractStandardFragmentInsertionTagProcessor.computeFragment(AbstractStandardFragmentInsertionTagProcessor.java:379) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.standard.processor.AbstractStandardFragmentInsertionTagProcessor.doProcess(AbstractStandardFragmentInsertionTagProcessor.java:110) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.processor.element.AbstractAttributeTagProcessor.doProcess(AbstractAttributeTagProcessor.java:74) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.processor.element.AbstractElementTagProcessor.process(AbstractElementTagProcessor.java:95) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.util.ProcessorConfigurationUtils$ElementTagProcessorWrapper.process(ProcessorConfigurationUtils.java:633) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.engine.ProcessorTemplateHandler.handleOpenElement(ProcessorTemplateHandler.java:1314) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.engine.OpenElementTag.beHandled(OpenElementTag.java:205) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.engine.Model.process(Model.java:282) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.engine.ProcessorTemplateHandler.handleOpenElement(ProcessorTemplateHandler.java:1587) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.engine.OpenElementTag.beHandled(OpenElementTag.java:205) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.engine.Model.process(Model.java:282) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.engine.ProcessorTemplateHandler.handleOpenElement(ProcessorTemplateHandler.java:1587) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.engine.OpenElementTag.beHandled(OpenElementTag.java:205) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.engine.Model.process(Model.java:282) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.engine.Model.process(Model.java:290) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.engine.GatheringModelProcessable.process(GatheringModelProcessable.java:78) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.engine.ProcessorTemplateHandler.handleCloseElement(ProcessorTemplateHandler.java:1640) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.engine.TemplateHandlerAdapterMarkupHandler.handleCloseElementEnd(TemplateHandlerAdapterMarkupHandler.java:388) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.templateparser.markup.InlinedOutputExpressionMarkupHandler$InlineMarkupAdapterPreProcessorHandler.handleCloseElementEnd(InlinedOutputExpressionMarkupHandler.java:322) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.standard.inline.OutputExpressionInlinePreProcessorHandler.handleCloseElementEnd(OutputExpressionInlinePreProcessorHandler.java:220) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.thymeleaf.templateparser.markup.InlinedOutputExpressionMarkupHandler.handleCloseElementEnd(InlinedOutputExpressionMarkupHandler.java:164) ~[thymeleaf-3.0.11.RELEASE.jar:3.0.11.RELEASE]
	at org.attoparser.HtmlElement.handleCloseElementEnd(HtmlElement.java:169) ~[attoparser-2.0.5.RELEASE.jar:2.0.5.RELEASE]
	at org.attoparser.HtmlMarkupHandler.handleCloseElementEnd(HtmlMarkupHandler.java:412) ~[attoparser-2.0.5.RELEASE.jar:2.0.5.RELEASE]
	at org.attoparser.MarkupEventProcessorHandler.handleCloseElementEnd(MarkupEventProcessorHandler.java:473) ~[attoparser-2.0.5.RELEASE.jar:2.0.5.RELEASE]
	at org.attoparser.ParsingElementMarkupUtil.parseCloseElement(ParsingElementMarkupUtil.java:201) ~[attoparser-2.0.5.RELEASE.jar:2.0.5.RELEASE]
	at org.attoparser.MarkupParser.parseBuffer(MarkupParser.java:725) ~[attoparser-2.0.5.RELEASE.jar:2.0.5.RELEASE]
	at org.attoparser.MarkupParser.parseDocument(MarkupParser.java:301) ~[attoparser-2.0.5.RELEASE.jar:2.0.5.RELEASE]
	... 78 common frames omitted

I’m guessing perhaps there’s some request-local parsing state or something that doesn’t get cleared properly?

  • Object
    • Throwable
      • Exception
        • RuntimeException
          • org.thymeleaf.exceptions.TemplateEngineException
            • org.thymeleaf.exceptions.TemplateProcessingException
              • org.thymeleaf.exceptions.TemplateInputException
  • All Implemented Interfaces:
    Serializable

    public class TemplateInputException
    extends TemplateProcessingException
    Since:
    1.0
    Author:
    Daniel Fernández
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 

      Constructor and Description
      TemplateInputException(String message) 
      TemplateInputException(String message,
      String templateName,
      int line,
      int col)
       
      TemplateInputException(String message,
      String templateName,
      int line,
      int col,
      Throwable cause)
       
      TemplateInputException(String message,
      String templateName,
      Throwable cause)
       
      TemplateInputException(String message,
      Throwable cause)
       
    • Method Summary

      • Methods inherited from class org.thymeleaf.exceptions.TemplateProcessingException

        getCol, getLine, getMessage, getTemplateName, hasLineAndCol, hasTemplateName, setLineAndCol, setTemplateName

      • Methods inherited from class Throwable

        addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString

      • Methods inherited from class Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    • Constructor Detail

      • TemplateInputException

        public TemplateInputException(String message)
      • TemplateInputException

        public TemplateInputException(String message,
                                      Throwable cause)
      • TemplateInputException

        public TemplateInputException(String message,
                                      String templateName,
                                      Throwable cause)
      • TemplateInputException

        public TemplateInputException(String message,
                                      String templateName,
                                      int line,
                                      int col)
        Parameters:
        message — The message of the exception
        templateName — The name of the template for which the exception is thrown
        line — line position of the event that caused the exception
        col — columns position of the event that caused the exception
        Since:
        3.0.0
      • TemplateInputException

        public TemplateInputException(String message,
                                      String templateName,
                                      int line,
                                      int col,
                                      Throwable cause)
        Parameters:
        message — The message of the exception
        templateName — The name of the template for which the exception is thrown
        line — line position of the event that caused the exception
        col — columns position of the event that caused the exception
        cause — cause to be nested inside the exception
        Since:
        3.0.0

Понравилась статья? Поделить с друзьями:
  • Task host window при выключении windows 10 как исправить
  • Template kit install error
  • Temperature error пишет при запуске компьютера
  • Task handler raised error valueerror not enough values to unpack expected 3 got 0
  • Temperature error shutting down перевод