当前位置: 首页 > 知识库问答 >
问题:

Grails应用程序未在Tomcat中启动,但没有错误或警告

彭畅
2023-03-14

我在https://grails.org/wiki/Quick当我用“grails run app”启动应用程序时,它运行良好。

如果我使用“grails war”构建应用程序并将war部署到我的tomcat 8中,我只会收到404个错误。tomcat管理器应用程序将我的应用程序列为已启动,日志文件中没有错误。

 06-Oct-2016 12:07:30.655 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.27\webapps\my-project-0.1.war
 06-Oct-2016 12:07:39.114 INFO [localhost-startStop-2] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive C:\Program Files\Apache Software Foundation\Apache Tomcat 8.0.27\webapps\my-project-0.1.war has finished in 8,459 ms

我错过了什么?

我使用grails 3.2.0

这似乎是引导。未执行groovy。我这里有一个println,从tomcat开始时没有显示

添加了内部版本。格拉德尔

 buildscript {
     repositories {
         mavenLocal()
         maven { url "https://repo.grails.org/grails/core" }
     }
     dependencies {
         classpath "org.grails:grails-gradle-plugin:$grailsVersion"
         classpath "com.bertramlabs.plugins:asset-pipeline-gradle:2.11.1"
         classpath "org.grails.plugins:hibernate5:6.0.0"
     }
 }

 version "0.1"
 group "my.project"

 apply plugin:"eclipse"
 apply plugin:"idea"
 apply plugin:"war"
 apply plugin:"org.grails.grails-web"
 apply plugin:"org.grails.grails-gsp"
 apply plugin:"asset-pipeline"

 repositories {
     mavenLocal()
     maven { url "https://repo.grails.org/grails/core" }
 }

 dependencyManagement {
     imports {
         mavenBom "org.grails:grails-bom:$grailsVersion"
     }
     applyMavenExclusions false
 }

 dependencies {
     compile "org.springframework.boot:spring-boot-starter-logging"
     compile "org.springframework.boot:spring-boot-autoconfigure"
     compile "org.grails:grails-core"
     compile "org.springframework.boot:spring-boot-starter-actuator"
     provided "org.springframework.boot:spring-boot-starter-tomcat"
     compile "org.grails:grails-dependencies"
     compile "org.grails:grails-web-boot"
     compile "org.grails.plugins:cache"
     compile "org.grails.plugins:scaffolding"
     compile "org.grails.plugins:hibernate5"
     compile "org.hibernate:hibernate-core:5.1.1.Final"
     compile "org.hibernate:hibernate-ehcache:5.1.1.Final"
     console "org.grails:grails-console"
     profile "org.grails.profiles:web"
     provided "org.codehaus.groovy:groovy-ant"
     runtime "com.bertramlabs.plugins:asset-pipeline-grails:2.11.1"
     runtime "com.h2database:h2"
     testCompile "org.grails:grails-plugin-testing"
     testCompile "org.grails.plugins:geb"
     testRuntime "org.seleniumhq.selenium:selenium-htmlunit-driver:2.47.1"
     testRuntime "net.sourceforge.htmlunit:htmlunit:2.18"
 }


 assets {
     minifyJs = true
     minifyCss = true
 }

我更改了提供的“org.springframework.boot:spring-boot-starter-tomcat”,其余由grails生成。

共有1个答案

韩寂离
2023-03-14

嗯,经过反复试验,我发现我必须移除,

provided "org.codehaus.groovy:groovy-ant"

现在事情进展顺利。

 类似资料:
  • 当我试图从web.xml映射ApplicationContext.xml文件以使用spring ioc时,我的应用程序没有开始在catalina.out中显示以下错误

  • 我很沮丧...什么是Application EventMulticaster,如何初始化或刷新它?为什么需要它? 我必须如何或在哪里调用此刷新操作?!我没有胶水。这是我尝试在服务器上运行的第一个Grails应用程序。在Localhost中,一切都运行良好。 系统(开发、工作): Mac 系统(生产,不工作!) Ubuntu Server 14.04 LTS Grails版本:3.3.0 Groov

  • 我无法使用嵌入式Tomcat运行我的Spring Boot应用程序。到目前为止,它运行良好,我没有对配置进行任何更改。当我在eclipse中以Spring Boot App运行应用程序时,tomcat会在启动期间立即停止。 我试着重启机器,eclipse,刷新项目,重新创建。但是它并没有帮助我解决这个问题。 以下是我的配置信息: 主要类别 Pom。xml 应用属性

  • 我一直在尝试在Windows上使用jPackage打包java javafx桌面应用程序。 该应用程序在Netbeans下运行良好,但当我单击安装程序生成的快捷方式或尝试使用命令行界面运行它时,什么也没有发生(没有错误消息)。 我使用的是java版本17.0.1 2021-10-19 LTS 问题 我一直无法发现错误是什么。它在Netbean中运行得很好,所以我认为这与我设置JPackage参数的

  • 它永远不会结束,应用程序也不会响应: 我已经检查了以下几点: 我的应用程序扩展了SpringBootServletInitializer 我将初学者tomcat依赖项放在提供的中 war名为“EdgeCustomerOfferStorageWeb.war”,实例端口为10080,因此我使用:http://server:10080/EdgeCustomerOfferStorageWeb/It不响应,

  • 我正试图在我的tomcat manager上启动我的网络应用程序,但它没有启动。我正在读取webapp的日志文件,出现以下错误: 8-giu-2017 9.41.12org.apache.catalina.core.标准上下文启动GRAVE:错误listenerStart 8-giu-2017 9.41.12org.apache.catalina.core.标准上下文启动GRAVE: Contex