gpt4 book ai didi

grails - grails run-app返回 “context initialization failed”的奇怪情况

转载 作者:行者123 更新时间:2023-12-02 14:18:06 26 4
gpt4 key购买 nike

我正在使用带有少量插件的grails 2.0.0.M1(spring-security-core-1.2.1,spring-cache-1.3.1)。清洁和组合应用程序,只运行它就没有问题。

这是执行“grails run-app --stacktrace”的结果:

ERROR [org.springframework.web.context.ContextLoader]: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: Unable to locate constructor with Class parameter for class org.codehaus.groovy.grails.commons.DefaultGrailsServiceClass
... 5 more
Caused by: java.lang.reflect.InvocationTargetException
... 5 more
Caused by: java.lang.ExceptionInInitializerError
... 5 more
Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '{}' with class 'groovy.util.ConfigObject' to class 'java.lang.Integer'
... 5 more

最佳答案

解决:我正在从服务中检索未在Config.groovy中声明的属性(仍然)的值(作为静态Integer变量,解释了强制转换异常)。

希望这对其他人有帮助。

关于grails - grails run-app返回 “context initialization failed”的奇怪情况,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7306812/

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