gpt4 book ai didi

java - Grails动态脚手架错误

转载 作者:行者123 更新时间:2023-11-30 11:17:54 25 4
gpt4 key购买 nike

我是 Grails 的新手,我在 Ubuntu 14.04 上安装了 Grails 2.4

我有这个 Grails 域:

class EndUser {

String username
String password
String fullName

String toString() {
"$fullName"
}

static hasMany = [projects: Project, tasks: Task]

static constraints = {
fullName()
username()
password()
}
}

它的 Controller :

class EndUserController {

static scaffold = true

def index = {
// redirect(action: "list")
}
}

我收到以下错误,每次我创建一个新的 EndUser 时,我都会收到一个显示此消息的错误页面:

Error 500: Internal Server Error
URI
/ProjectTracker/endUser/create
Class
java.lang.NullPointerException
Message
null

我做错了什么?我该如何解决?如果我需要提供更多信息,请告诉我。

|Running Grails application
|Server running. Browse to http://localhost:8080/ProjectTracker
| Error 2014-06-09 01:59:47,663 [http-bio-8080-exec-7] ERROR errors.GrailsExceptionResolver - NullPointerException occurred when processing request: [GET] /ProjectTracker/endUser/edit/1
Stacktrace follows:
Message: Error processing GroovyPageView: Error executing tag <g:form>: Error executing tag <g:render>: null
Line | Method
->> 527 | doFilter in /endUser/edit
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Caused by GrailsTagException: Error executing tag <g:form>: Error executing tag <g:render>: null
->> 38 | doCall in /endUser/edit
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Caused by GrailsTagException: Error executing tag <g:render>: null
->> 33 | doCall in /endUser/edit
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


Caused by NullPointerException: null
->> 333 | hash in java.util.concurrent.ConcurrentHashMap
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 988 | get in ''
| 141 | getValue in grails.util.CacheEntry
| 81 | getValue in ''
| 33 | doCall . in endUser_edit$_run_closure2_closure27
| 38 | doCall in endUser_edit$_run_closure2
| 40 | run . . . in endUser_edit
| 189 | doFilter in grails.plugin.cache.web.filter.PageFragmentCachingFilter
| 63 | doFilter in grails.plugin.cache.web.filter.AbstractFilter
| 1145 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 615 | run . . . in java.util.concurrent.ThreadPoolExecutor$Worker
^ 745 | run in java.lang.Thread

谢谢,哈利勒。

最佳答案

看起来你遇到了这个错误:https://jira.grails.org/browse/GRAILS-11430 .它将在 Grails 2.4.1 中修复;您可以等到该版本发布或尝试该链接的评论中提供的解决方法,据报道该方法可以工作。

关于java - Grails动态脚手架错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24111824/

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