Tuesday, October 6, 2015

Make sure a corresponding org.thymeleaf.doctype.resolution.IDocTypeResolutionEntry implementation is provided by you dialect

When you use Thymeleaf with Spring Boot and use the following DOCTYPE:

<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">

you will get the following errors:

2015-10-07 10:19:45.957 ERROR 3301 --- [io-18080-exec-1] org.thymeleaf.TemplateEngine             : [THYMELEAF][http-nio-18080-exec-1] Exception processing template "restaurants/add": Unsupported entity requested with PUBLICID "null" and SYSTEMID "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd". Make sure a corresponding org.thymeleaf.doctype.resolution.IDocTypeResolutionEntry implementation is provided by you dialect
2015-10-07 10:19:45.964 ERROR 3301 --- [io-18080-exec-1] 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.TemplateProcessingException: Unsupported entity requested with PUBLICID "null" and SYSTEMID "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd". Make sure a corresponding org.thymeleaf.doctype.resolution.IDocTypeResolutionEntry implementation is provided by you dialect] with root cause
org.thymeleaf.exceptions.TemplateProcessingException: Unsupported entity requested with PUBLICID "null" and SYSTEMID "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd". Make sure a corresponding org.thymeleaf.doctype.resolution.IDocTypeResolutionEntry implementation is provided by you dialect
at org.thymeleaf.templateparser.EntityResolver.resolveEntity(EntityResolver.java:75) ~[thymeleaf-2.1.4.RELEASE.jar:2.1.4.RELEASE]
...

You should use the following DOCTYPE:

<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-spring4-4.dtd">

Reference:
http://stackoverflow.com/questions/25132189/thymleaf-unsupported-entity-requested-with-publicid-null

No comments:

Post a Comment