gpt4 book ai didi

spring - 编译期间发生 fatal error org.springframework.beans.factory.BeanDefinitionStoreException

转载 作者:行者123 更新时间:2023-12-02 16:04:22 24 4
gpt4 key购买 nike

我有一个grails 2.2.4应用程序,可以正常运行。但是,当我尝试将spring-security-ui插件集成到应用程序中时,它没有启动。我将以下内容添加到了BuilConfig.groovy

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选项时,将获得以下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,但是得到了相同的错误
  • 最佳答案

    我的 BuildConfig.groovy 中有compile ":spring-security-core:2.0-RC4"。安全插件的文档不是最好的。

    希望能有所帮助。

    关于spring - 编译期间发生 fatal error org.springframework.beans.factory.BeanDefinitionStoreException,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26999614/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com