2014-11-18 2 views
0

У меня есть приложение grails 2.2.4, которое отлично работает. Однако он не запускается, когда я пытаюсь интегрировать плагин spring-security-ui в приложение. Я добавил следующее к моему BuilConfig.groovyНеустранимая ошибка во время компиляции org.springframework.beans.factory.BeanDefinitionStoreException

compile ":spring-security-ui:1.0-RC2" 

После этого, когда я пытаюсь запустить приложение, я получаю следующее:

> You currently already have a version of the plugin installed [spring-security-core-1.2.7.3]. Do you want to update to [spring-security-core-2.0-RC3]? [y,n] n 
n 
| Plugin spring-security-core-2.0-RC3 install aborted 
> You currently already have a version of the plugin installed [jquery-1.7.2]. Do you want to update to [jquery-1.11.1]? [y,n] n 
n 
| Plugin jquery-1.11.1 install aborted 
> You currently already have a version of the plugin installed [jquery-ui-1.8.24]. Do you want to update to [jquery-ui-1.10.3]? [y,n] n 
n 
| Plugin jquery-ui-1.10.3 install aborted 
| Plugin jquery-ui-1.10.3 install aborted. 
| Error Fatal error during compilation org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: URL 
[jar:file:/Users/birdy/.grails/ivy-cache/org.grails/grails-core/jars/grails-core-2.2.4.jar!/org/codehaus/groovy/grails/compiler/DirectoryWatcher$FileChangeListener.class]; 
nested exception is java.lang.NoClassDefFoundError: org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor (Use --stacktrace to see the full trace) 

Когда я использую вариант --stacktrace я получаю следующую трассировку стека:

at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:290) 
    at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.doScan(ClassPathBeanDefinitionScanner.java:242) 
    at org.springframework.context.annotation.ClassPathBeanDefinitionScanner.scan(ClassPathBeanDefinitionScanner.java:220) 
    at _GrailsCompile_groovy$_run_closure3_closure8_closure9.doCall(_GrailsCompile_groovy:62) 
    at _GrailsCompile_groovy$_run_closure3_closure8_closure9.doCall(_GrailsCompile_groovy) 
    at _GrailsCompile_groovy.withCompilationErrorHandling(_GrailsCompile_groovy:69) 
    at _GrailsCompile_groovy.this$4$withCompilationErrorHandling(_GrailsCompile_groovy) 
    at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) 
    at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:168) 
    at _GrailsCompile_groovy$_run_closure3_closure8.doCall(_GrailsCompile_groovy:61) 
    at _GrailsCompile_groovy$_run_closure3_closure8.doCall(_GrailsCompile_groovy) 
    at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) 
    at _GrailsCompile_groovy$_run_closure3.doCall(_GrailsCompile_groovy:58) 
    at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) 
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185) 
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy) 
    at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90) 
    at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy) 
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185) 
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy) 
    at org.codehaus.gant.GantMetaClass.processClosure(GantMetaClass.java:81) 
    at org.codehaus.gant.GantMetaClass.processArgument(GantMetaClass.java:95) 
    at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:128) 
    at _GrailsCompile_groovy$_run_closure2.doCall(_GrailsCompile_groovy:45) 
    at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133) 
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185) 
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy) 
    at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90) 
    at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy) 
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185) 
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy) 
    at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381) 
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415) 
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy) 
    at gant.Gant.withBuildListeners(Gant.groovy:427) 
    at gant.Gant.this$2$withBuildListeners(Gant.groovy) 
    at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source) 
    at gant.Gant.dispatch(Gant.groovy:415) 
    at gant.Gant.this$2$dispatch(Gant.groovy) 
    at gant.Gant.invokeMethod(Gant.groovy) 
    at gant.Gant.executeTargets(Gant.groovy:591) 
    at gant.Gant.executeTargets(Gant.groovy:590) 
Caused by: java.lang.NoClassDefFoundError: org/springframework/core/type/classreading/AnnotationMetadataReadingVisitor 
    at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:63) 
    at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80) 
    at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102) 
    at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:266) 
    ... 41 more 
Caused by: java.lang.ClassNotFoundException: org.springframework.core.type.classreading.AnnotationMetadataReadingVisitor 
    ... 45 more 

То, что я пытался

  • Я пробовал grails compile --refresh-dependencies --stacktrace, но это приводит к такой же ошибке.
  • Я также модернизировал Spring плагин безопасности для spring-security-core-2.0-RC3 но получил ту же ошибку
+0

Не смотря на ваш полный BuildConfig, мое образованное предположение: «spring-security-ui: 1.0-RC2» имеет противоречивую переходную зависимость, которую плющ не выясняет, поэтому вам нужно добавить правильное «исключение», для обеспечения согласованного графика зависимости. – Raphael

ответ

0

У меня есть compile ":spring-security-core:2.0-RC4" в моем BuildConfig.groovy. Документация для плагина безопасности не самая лучшая.

Надеюсь, что это поможет.

Смежные вопросы