2016-02-17 160 views
3

我使用的是3.0.14v Grails,并对heroku进行了一些部署。一切工作正常,但我想尝试使用Grails 3.1.1,现在我收到了一些错误。将Grails 3.1.1部署到Heroku

我下面这篇文章https://devcenter.heroku.com/articles/deploying-gradle-apps-on-heroku

我克隆此https://github.com/kissaten/grails3-example

我认为这是一些关于Tomcat的版本,但不能肯定。

任何帮助?

heroku logs

heroku logs

+1

你的'Procfile'看起来像什么? –

+0

Procfile: “web:cd build; java $ JAVA_OPTS -Dgrails.env = prod -jar ../build/server/webapp-runner-*.jar --expand-war --port $ PORT libs/*。战争“ –

+0

我试着使用编译'com.github.jsimone:webapp-runner:8.0.30.1'而不是7.0.57.2,但我得到一个错误:错误无法解析配置':testRuntime'的所有依赖关系。输入'gradle dependencies'以获取更多信息 我不确定我是否缺少有关Tomcat 8配置的信息。任何想法 ? –

回答

1

对于编译你的麻烦 'com.github.jsimone:web应用亚军:8.0.30.1',我理解了它从去除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亚军(直接作为一个jar)

compile 'com.github.jsimone:webapp-runner:[email protected]' 

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

本课程由tomcat嵌入式核心神器提供。这个神器来自spring-boot-starter-tomcat(作为依赖)。将“spring-boot-starter-tomcat”从提供的更改为编译或尝试其他版本(对于Grails 3.0.9,spring-starter-tomcat版本为1.2.6)。

希望它帮助;)

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'作为编译时间依赖包含在一个问题中。