-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.ClassCastException #221
Comments
Hmm, haven't encountered this before, but the error message sounds like you're running the layout dialect as a Java module on the module path instead of the classpath? I only just gave it an automatic module name in 3.x. Also, are you able to share a bit more of the stack trace? Especially any lines in the layout dialect where it might be trying to cast EventIterator into a Map? I can go looking through the codebase and make some guesses but anything more concrete will help. |
Tried to run more features, for example:
Those two are supposed to do exactly the same thing, BUT the first one works as expected and the second doesn't, Here is part of the stacktrace: Nov 18, 2021 10:52:55 AM org.apache.catalina.core.StandardWrapperValve invoke Somewhere here: As for the original exception, part of the stacktrace is: java.lang.ClassCastException: class nz.net.ultraq.thymeleaf.models.extensions.EventIterator cannot be cast to class [Ljava.lang.Object; (nz.net.ultraq.thymeleaf.models.extensions.EventIterator is in unnamed module of loader java.net.URLClassLoader @a9c5b75; [Ljava.lang.Object; is in module java.base of loader 'bootstrap') It seems the casting is being carried out in Groovy. |
The errors were related to using the Groovy version of this project in a Java project, All went away after switching to the Java version of this project at: |
also facing same problem but no encouraging answer found |
Just upgraded to version 3.0.0 (from 1.2.4) and having this exception whenever am processing a template:
class nz.net.ultraq.thymeleaf.layoutdialect.models.extensions.EventIterator cannot be cast to class java.util.Map (nz.net.ultraq.thymeleaf.layoutdialect.models.extensions.EventIterator is in unnamed module of loader java.net.URLClassLoader @a9c5b75; java.util.Map is in module java.base of loader 'bootstrap')...
Currently, running on JDK 14 (Note: I have already tried 2.x.x and even more complications).
The text was updated successfully, but these errors were encountered: