3

我使用的是 3.0.14v Grails,我对 heroku 做了一些部署。一切正常,但是我想尝试使用 Grails 3.1.1,但现在遇到了一些错误。

我正在关注这篇文章https://devcenter.heroku.com/articles/deploying-gradle-apps-on-heroku

我克隆了这个https://github.com/kissaten/grails3-example

我认为这与tomcat版本有关,但不确定。

有什么帮助吗?

heroku 日志

heroku 日志

4

2 回答 2

1

我不确定具体细节,但看起来 Grails 3.1.1 需要 Tomcat 8.x 行中的一些类。

我找到了一个解决方案,我使用“compile 'com.github.jsimone:webapp-runner:8.0.30.2'”而不是 '8.0.30.1' 并且现在运行良好。

我认为将“8.0.30.1”包含为编译时依赖项存在问题。

于 2016-02-17T20:57:48.890 回答
1

对于编译' com.github.jsimone:webapp-runner:8.0.30.1 '的麻烦,我通过从所有 test* 导入中删除httpclient模块来解决这个问题,并且我导入了该模块的一个好的版本(仅用于测试*)。

testCompile ("org.grails.plugins:geb"){
    exclude module: 'httpclient'
}
testCompile ('org.seleniumhq.selenium:selenium-firefox-driver:2.48.2'){
    exclude module: 'httpclient'
}
testCompile 'org.apache.httpcomponents:httpclient:4.3.5'

多亏了这一点,我可以导入“最后一个”webapp-runner(直接作为 jar)

compile 'com.github.jsimone:webapp-runner:8.0.30.1@jar'

也许那个版本的webapp-runner会解决这个问题,但我不确定。正如我在您的堆栈跟踪中看到的那样, org/apache/tomcat/util/descriptor/tld/TldParser有一个 NoClassDefFoundException 。

此类由tomcat-embed-core工件提供。该工件来自spring-boot-starter-tomcat(作为依赖项)。将“spring-boot-starter-tomcat”从提供更改为已编译或尝试其他版本(对于 Grails 3.0.9,spring-starter-tomcat 版本为 1.2.6)。

希望能帮助到你 ;)

于 2016-02-17T19:00:44.477 回答