You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After running the web server with Gretty and accessing the layout page, the following exception is exposed and nothing is displayed on the web browser screen.
Exception Log
...
Caused by: groovy.lang.MissingMethodException: No signature of method: org.thymeleaf.engine.Model.first() is applicable for argument types: () values: []
Possible solutions: print(java.io.PrintWriter), print(java.lang.Object), find(), find(groovy.lang.Closure), is(java.lang.Object), write(java.io.Writer)
...
My project environment looks like this:
Spring 6 (Not Spring Boot): 6.0.11
Thymeleaf
thymeleaf-spring6: 3.1.2.RELEASE
thymeleaf-layout-dialect: 3.2.1
Gretty: 4.1.0
Tomcat: 10.1.11
Gradle: 8.2.1
Java: 17
When I run the web project, I run it with the command below.
gradle clean appRun
I ran Gretty and accessed the page with the layout applied, and I definitely got the exception mentioned above.
However, when I deploy and run it directly into Tomcat without using Gretty, I get no errors. I'm not sure why.
✨ Example project to see the problem
I created an example project for you to check the problem.
What I see is that this first method doesn't generally exist on IModel/Model - here. It is defined in an extension in the other library here. And there is a Groovy extension module defined here. I guess Gretty doesn't read it for some reason or doesn't pass it on the classpath.
Hello.
After running the web server with Gretty and accessing the layout page, the following exception is exposed and nothing is displayed on the web browser screen.
Exception Log
My project environment looks like this:
6.0.11
3.1.2.RELEASE
3.2.1
4.1.0
10.1.11
8.2.1
17
When I run the web project, I run it with the command below.
I ran Gretty and accessed the page with the layout applied, and I definitely got the exception mentioned above.
However, when I deploy and run it directly into Tomcat without using Gretty, I get no errors. I'm not sure why.
✨ Example project to see the problem
I created an example project for you to check the problem.
Example Project Zip File
Example project GitHub address
How to run
Run with Gretty
Accessing the layout page in a web browser
http://localhost:8090/main
Have a nice day. 👍
The text was updated successfully, but these errors were encountered: