GStringImpl cannot be passed to java.lang.String

I got the error below using Grails and Spring Security. Has anyone else had such a problem? If so, what is your decision?

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' 
+6
source share
1 answer

You created all classes (User, Role ...). What does your team look like? How is grails s2-quickstart com.testapp User Role ? Check your configuration and try, as in this tutorial. Spring Security Plugin Tutorials

In fact, this error means in groovy that you are using a GString like "$ {my_var}" and some class is expecting a String. It cannot be started automatically. If you have such code, you should convert it to String as follows: "${my_var}".toString() .

+20
source

Source: https://habr.com/ru/post/983874/


All Articles