【发布时间】:2016-07-20 11:05:03
【问题描述】:
我刚刚迁移到新的 Grails 3.1,我在 Grails 中的第一个应用程序运行良好。但是当我创建另一个新的 Grails 3.1 应用程序时,我遇到了一个新问题;尝试在新的应用程序根目录中以交互方式使用run-app 运行时会出现问题:
| Running application...
Error: Could not find or load main class try3grails.Application
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':bootRun'.
> Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
| Error Failed to start server (Use --stacktrace to see the full trace)
try3grails.Application 类引用了我创建的第一个应用程序的主方法类;所以错误似乎是 Grails 不能“忘记”旧的应用程序类路径。有没有人对此有解决方案,或者我错过了什么?
运行grails --version 给出:
| Grails Version: 3.1.4
| Groovy Version: 2.4.6
| JVM Version: 1.8.0_77
使用 SDKMan 在 ubuntu linux 机器上安装 Grails。
【问题讨论】:
标签: grails grails-3.1 run-app