Tomcat 上的 Grails 部署错误

标签 grails tomcat7

我正在尝试使用命令在 tomcat 上部署 grails 应用程序

grails prod tomcat deploy --stacktrace

但是,我收到以下错误。知道如何解决这个问题吗?我是第一次部署它。应用程序在我的本地计算机 (mac) 上的开发模式下运行良好。

| Error Error executing script Tomcat: No such property: warName for class: Tomcat (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
groovy.lang.MissingPropertyException: No such property: warName for class: Tomcat
    at Tomcat$_run_closure1.doCall(Tomcat:30)
    at org.codehaus.gant.GantMetaClass.invokeMethod(GantMetaClass.java:133)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy:185)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16_closure18.doCall(GantBinding.groovy)
    at org.codehaus.gant.GantBinding.withTargetEvent(GantBinding.groovy:90)
    at org.codehaus.gant.GantBinding.this$4$withTargetEvent(GantBinding.groovy)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy:185)
    at org.codehaus.gant.GantBinding$_initializeGantBinding_closure5_closure16.doCall(GantBinding.groovy)
    at gant.Gant$_dispatch_closure5.doCall(Gant.groovy:381)
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy:415)
    at gant.Gant$_dispatch_closure7.doCall(Gant.groovy)
    at gant.Gant.withBuildListeners(Gant.groovy:427)
    at gant.Gant.this$2$withBuildListeners(Gant.groovy)
    at gant.Gant$this$2$withBuildListeners$0.callCurrent(Unknown Source)
    at gant.Gant.dispatch(Gant.groovy:415)
    at gant.Gant.this$2$dispatch(Gant.groovy)
    at gant.Gant.invokeMethod(Gant.groovy)
    at gant.Gant.executeTargets(Gant.groovy:591)
    at gant.Gant.executeTargets(Gant.groovy:590)
| Error Error executing script Tomcat: No such property: warName for class: Tomcat

最佳答案

我也刚刚遇到了这个问题,这是一个记录在案的已知问题 here 。短期解决方法是修改文件

~/.grails/<vers>/projects/<project-name>/plugins/tomcat-7.0.42/scripts.Tomcat.groovy

如图here .

关于Tomcat 上的 Grails 部署错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20872065/

相关文章:

tomcat - 连接 Websphere MQ 的 tomcat 中的多个 Web 应用程序

java - 是否可以仅在没有 tomcat 服务器的情况下使用 Nginx 服务器运行 Java Web 应用程序?

java - MariaDB 闲置一段时间后无法工作

java - 如何访问Tomcat中Jaas登录模块中的HttpServletRequest

grails - GORM映射 View

javascript - 如何在我的Grails应用程序的单个页面上使用AngularJS,并在其他页面上使用常规JS?

hibernate - 在 Grails/Tomcat 上的长批处理期间出现 OutOfMemoryError

grails - 在grails中设置全局变量

tomcat - 在 tomcat 8 中设置 sso/ssl 失败

eclipse - "starting Tomcat server 7 at localhost has encountered a prob"