exception - 时髦的 : deploying a war file

标签 exception grails war-filedeployment

我在我的桌面上本地运行了一个 groovy 应用程序。
显然它运行时没有错误。至少我写的所有单元测试都完成了。
我想使用 部署应用程序 war 文件。为此,我使用命令

grails war

在应用程序的主目录中。这样做时,我收到以下异常:
Error executing script War: java.lang.NullPointerException
gant.TargetExecutionException: java.lang.NullPointerException
    at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:331)
    at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
    at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
    at gant.Gant.withBuildListeners(Gant.groovy:344)
    at gant.Gant.this$2$withBuildListeners(Gant.groovy)
    at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
    at gant.Gant.dispatch(Gant.groovy:334)
    at gant.Gant.this$2$dispatch(Gant.groovy)
    at gant.Gant.invokeMethod(Gant.groovy)
    at gant.Gant.processTargets(Gant.groovy:495)
    at gant.Gant.processTargets(Gant.groovy:480)
Caused by: java.lang.NullPointerException
    at        _GrailsWar_groovy$_run_closure5_closure25_closure26_closure28.doCall(_GrailsWar_groovy:289)
    at _GrailsWar_groovy$_run_closure5_closure25_closure26_closure28.doCall(_GrailsWar_groovy)
    at _GrailsWar_groovy$_run_closure5_closure25_closure26.doCall(_GrailsWar_groovy:282)
    at _GrailsWar_groovy$_run_closure5_closure25_closure26.doCall(_GrailsWar_groovy)
    at _GrailsWar_groovy$_run_closure5_closure25.doCall(_GrailsWar_groovy:258)
    at _GrailsWar_groovy$_run_closure5.doCall(_GrailsWar_groovy:256)
    at _GrailsWar_groovy$_run_closure4.doCall(_GrailsWar_groovy:239)
    at War$_run_closure1.doCall(War.groovy:38)
    at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324)
    ... 10 more

任何提示为什么?

非常感谢提前

最佳答案

我想你必须找到Gant.groovy的来源。看看它在那条线上做了什么。显然,您的项目的特定配置导致了一些问题(因为如果总是发生这样的显示停止错误会被捕获),但错误消息不包含太多信息。

或者,您可以尝试将 Grails 升级到最新版本 1.1.1(如果您还没有的话)。

关于exception - 时髦的 : deploying a war file,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1000240/

相关文章:

Python:即使在 try/except 子句中捕获也会引发异常

php - Laravel 处理异常

eclipse - Rest 应用程序(Jersey/JAX-RS)通过 Eclipse 在 glassfish 中运行,但在部署在 tomcat 中时却没有

java - 创建可执行的 WAR 文件

C#:从变量中重新抛出异常,同时保留堆栈跟踪

java - JMeter负载测试: ClassNotFoundException: com. blazemeter.jmeter.threads.concurrency.ConcurrencyThreadGroup

grails - Grails:如何制作g:textfield来加载一些数据并将其显示在其他g:textfield中?

rest - 功能测试:通过Grails中的REST API上传文件

grails - Grails域类中的OneToMany关联