gpt4 book ai didi

java - 无法运行Grails,解决类错误

转载 作者:行者123 更新时间:2023-12-02 15:53:25 27 4
gpt4 key购买 nike

我是grails的新手,需要帮助弄清为什么由于以下错误而无法运行grails:

grails> run-app
| Running application...
startup failed:
C:\DIR\grails-inventory\grails-app\controllers\harbor\AssetController.groovy: 3: unable to resolve class org.apache.jasper.compiler.Node.ParamsAction
@ line 3, column 1.
import org.apache.jasper.compiler.Node.ParamsAction;
^
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':compileGroovy'.
> Compilation failed; see the compiler error output for details.

如果我要注释掉AssetController中的特定行,则将执行grails,但是整个应用程序将出现NullPointer错误

最佳答案

尝试将其添加到Gradle依赖项中:

dependencies { 
// specify dependencies here under either 'build', 'compile', 'runtime', 'test' or 'provided' scopes e.g.
// runtime 'mysql:mysql-connector-java:5.1.22'
compile 'tomcat:jasper-compiler:5.5.9'
}

您可以在Grails 2.x中找到jasper: https://grails.org/plugin/jasper和Grails 3.x的插件在这里: https://bintray.com/grails/plugins,但是正如我所见,Grails 3没有Jasper插件,因此请尝试如上所述直接添加依赖项。

关于java - 无法运行Grails,解决类错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35744641/

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