Grails 3.0.9war在外部Tomcat8中的部署不起作用



我已经构建了一个在grails中运行良好的grails应用程序。我想把它放在tomcat 8网络服务器中"生产",为了做到这一点,我已经阅读了它应该如何在这里完成。生产Tomcat也在Windows7和开发环境中运行。在我构建了war文件(没有嵌入tomcat)并将其放在tomcat的webapps目录中之后,它就爆炸了。检查tomcat经理(http://localhost:9080/manager/html)显示应用程序已部署并正在运行。然而,当点击tomcat manager中的链接时,我会得到以下堆栈:

HTTP Status 500 - javax.servlet.ServletException: Could not resolve view with name '/error' in servlet with name 'grailsDispatcherServlet'
type Exception report
message javax.servlet.ServletException: Could not resolve view with name '/error' in servlet with name 'grailsDispatcherServlet'
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: javax.servlet.ServletException: Could not resolve view with name '/error' in servlet with name 'grailsDispatcherServlet'
    grails.plugin.cache.web.filter.AbstractFilter.logThrowable(AbstractFilter.java:116)
    grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:70)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
    org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:73)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
    org.springframework.boot.context.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:109)
    org.springframework.boot.context.web.ErrorPageFilter.forwardToErrorPage(ErrorPageFilter.java:184)
    org.springframework.boot.context.web.ErrorPageFilter.handleException(ErrorPageFilter.java:167)
    org.springframework.boot.context.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:131)
    org.springframework.boot.context.web.ErrorPageFilter.access$000(ErrorPageFilter.java:60)
    org.springframework.boot.context.web.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:91)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    org.springframework.boot.context.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:109)
root cause
javax.servlet.ServletException: Could not resolve view with name '/error' in servlet with name 'grailsDispatcherServlet'
    org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1227)
    org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1027)
    org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:971)
    org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
    org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:967)
    org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:858)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:622)
    org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:843)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
    org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
    grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:190)
    grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
    org.grails.web.servlet.mvc.GrailsWebRequestFilter.doFilterInternal(GrailsWebRequestFilter.java:73)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:101)
    org.springframework.boot.context.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:109)
    org.springframework.boot.context.web.ErrorPageFilter.forwardToErrorPage(ErrorPageFilter.java:184)
    org.springframework.boot.context.web.ErrorPageFilter.handleException(ErrorPageFilter.java:167)
    org.springframework.boot.context.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:131)
    org.springframework.boot.context.web.ErrorPageFilter.access$000(ErrorPageFilter.java:60)
    org.springframework.boot.context.web.ErrorPageFilter$1.doFilterInternal(ErrorPageFilter.java:91)
    org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
    org.springframework.boot.context.web.ErrorPageFilter.doFilter(ErrorPageFilter.java:109)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.28 logs.
Apache Tomcat/8.0.28

有人知道哪里出了问题吗?

也有同样的问题。Ubuntu 14.04/Tomcat 8

无法确定解决问题的关键是什么,我已经做了以下工作:

  • 在build.gradle中设置提供的"org.springframework.boot:spring-boot starter tomcat"
  • 再次下载tomcat8(tar.gz包)
  • 将tomcat从/root移动到/opt

希望这能有所帮助!

相关内容

  • 没有找到相关文章

最新更新