gpt4 book ai didi

grails - 仅使用脚手架,Grails错误无法创建Bean

转载 作者:行者123 更新时间:2023-12-02 14:07:24 25 4
gpt4 key购买 nike

Cereal :2.4
Java:Oracle 1.7
操作系统:Ubuntu 14.04
你好 friend ,
我正在研究一个示例项目,以提高我对grails的了解。对于 Controller 文件,当我将def index(){}替换为
def scaffold = EventManagment,我收到一个错误,该错误在下面提到。如果我不添加该行,而转到本地主机页面,则看不到该Web应用程序正在运行。请让我知道该怎么办。谢谢。
Controller 文件为/grails-2.4.0/EventMg/grails-app/controllers/com/Evenmgmt.groovy。
日志:

| Running Grails application
| Error 2014-06-15 16:47:52,353 [localhost-startStop-1] ERROR context.GrailsContextLoaderListener - Error initializing the application: Error creating bean with name 'com.tekdays.TekEventController': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.tekdays.TekEventController]: Constructor threw exception; nested exception is java.lang.NullPointerException
Message: Error creating bean with name 'com.tekdays.TekEventController': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.tekdays.TekEventController]: Constructor threw exception; nested exception is java.lang.NullPointerException
Line | Method
->> 266 | run in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by BeanInstantiationException: Could not instantiate bean class [com.tekdays.TekEventController]: Constructor threw exception; nested exception is java.lang.NullPointerException
->> 266 | run in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
Caused by NullPointerException: null
->> 266 | run in java.util.concurrent.FutureTask
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 1142 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 617 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread
| Error Forked Grails VM exited with error

最佳答案

我可以通过全新安装旧版本的Ubuntu来解决此问题。相同的代码有效。对我来说,这个问题标记为已回答。

关于grails - 仅使用脚手架,Grails错误无法创建Bean,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24230912/

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