I got the error below using Grails and Spring Security. Has anyone else had a problem like this? If so, what was your fix?
Error |
Exception in thread "Thread-15"
Error |
java.lang.ClassCastException: org.codehaus.groovy.runtime.GStringImpl cannot be cast to java.lang.String
Error |
at org.codehaus.groovy.grails.project.compiler.GrailsProjectWatcher.run(GrailsProjectWatcher.java:114)
And
java.lang.IllegalArgumentException: Failed to evaluate expression 'User_name'
Did you generate all the classes (User, Role ...).
How does your command looks like?
Like this grails s2-quickstart com.testapp User Role
?
Check your configuration and try it like in this tutorial.
Spring Security Plugin Tutorials
Actually this error means in groovy that you use a GString like "${my_var}" and some class expects String. It can't be cast automatically. If you have some code like this, you have to convert it to String like this: "${my_var}".toString()
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With