我想知道是否有人幸运地将Grails 2.3.5部署到Tomcat6
在BuildConfig中,我有grails. servlet.version="2.5"
插件块如下所示:
plugins {
build ":release:3.0.1"
build ":tomcat:7.0.50"
compile ":scaffolding:2.0.1"
compile ':cache:1.1.1'
runtime ":hibernate:3.6.10.7"
runtime ":database-migration:1.3.8"
runtime ":jquery:1.10.2.2"
runtime ":resources:1.2.1"
}
在启动时,我得到以下异常:
ERROR context. ContextLoader-Context初始化失败org.springframe.bean.工厂.BeanCreationException:在ServletContext资源[/WEB-INF/application ationContext.xml]中创建名称为“grailsApplication”的bean时出错:调用init方法失败;嵌套异常是java.lang.NoClassDefFoundError:javax/servlet/AsyncContext
它在Tomcat7上启动非常好。我怀疑hibernate插件正在拖动对Servlet 3的硬依赖,但这只是现阶段的猜测。
对我来说,升级到最新的小版本可以解决这个问题。
在这些更改之后,Grails up可以部署到Tomcat 6.0. x容器中。
希望对爱德华多有帮助