Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error with spring security plugin in grails 2.4.0.M1

i'm running into a compilation issue, using grails 2.4.0.M1 and spring-security-core:2.0-RC2

this is the error:

..../target/work/plugins/spring-security-core-2.0-RC2/src/groovy/grails/plugin/springsecurity/ReflectionUtils.groovy: 205: Apparent variable 'org' was found in a static scope but doesn't refer to a local variable, static field or class. Possible causes: You attempted to reference a variable in the binding or an instance variable from a static context. You misspelled a classname or statically imported field. Please check the spelling. You attempted to use a method 'org' but left out brackets in a place not allowed by the grammar. @ line 205, column 18. application = org.codehaus.groovy.grails.commons.ApplicationHolder.application ^

the problem seems to be around this method

private static GrailsApplication getApplication() { 
                if (!application) { 
                        application = org.codehaus.groovy.grails.commons.ApplicationHolder.application 
                } 
                application 
        } 

on the class ReflectionUtils.groovy,

does anyone else as ran into something like this? if so how do you fixed it?

like image 447
Bubuntux Avatar asked Oct 02 '22 09:10

Bubuntux


1 Answers

I fixed this today - https://github.com/grails-plugins/grails-spring-security-core/commit/ef3aab05bfb0eb2f2cbb2c5945f4fc9ca2f0697d

You can make the change that @Bubuntux showed as a temporary workaround, and I'll be releasing 2.0 final in a couple of weeks with this fixed. Hopefully you're not planning on using a Grails M1 release in production, so the delay shouldn't be too much of an issue.

like image 89
Burt Beckwith Avatar answered Oct 13 '22 11:10

Burt Beckwith