2014-03-07 3 views
5

Ich bin in eine Compilation Ausgabe ausgeführt wird, unter Verwendung von Grails 2.4.0.M1 und Feder-security-Kern: 2.0-RC2Fehler mit Feder Sicherheits-Plug-in Grails 2.4.0.M1

dies der Fehler ist:

..../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 ^

das Problem scheint, um dieses Verfahren

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

auf die Klasse ReflectionUtils.groovy,

zu sein läuft irgendjemand sonst in so etwas? Wenn ja, wie hast du es behoben?

Antwort

3

ich dieses Problem behoben Heute - https://github.com/grails-plugins/grails-spring-security-core/commit/ef3aab05bfb0eb2f2cbb2c5945f4fc9ca2f0697d

Sie können den @Bub ändern untux wurde als vorübergehender Workaround gezeigt, und ich werde 2.0 final in ein paar Wochen mit dieser behoben. Hoffentlich planen Sie nicht, eine Grails M1-Version in der Produktion zu verwenden, daher sollte die Verzögerung kein allzu großes Problem darstellen.

+0

Danke Mann! Ich suchte tatsächlich nach der Datei auf dem Git Repo, in der Hoffnung, in der Lage, eine Pull - Anfrage mit der Änderung einzureichen, leider war es schon da :( sowieso freue ich mich auf die Version 2.0 – Bubuntux

+0

btw ich bin auch in ein Problem mit der Statische Regeln (NPE) – Bubuntux

+0

Erstellen Sie ein Problem unter http://jira.grails.org/browse/GPSPRINGSECURITYCORE mit einer kleinen Test-App, die das Problem demonstriert - führen Sie 'grails bug-report' aus und hängen Sie diesen Zip an. –

1

scheint, wie die ApplicationHolder Klasse vor langer Zeit als veraltet war und jetzt entfernt auf Gral 2.4

so i

nur die Zeile
application = org.codehaus.groovy.grails.commons.ApplicationHolder.application 

zu

application = Holders.grailsApplication 
+4

lol. Die tatsächliche Bedeutung von Abwertung. nicht wie "Date.parse" in Java. ;) – dmahapatro

Verwandte Themen