首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >当war文件部署到Heroku (工厂方法'requestMappingHandlerAdapter‘抛出异常)时,Grails出现了错误

当war文件部署到Heroku (工厂方法'requestMappingHandlerAdapter‘抛出异常)时,Grails出现了错误
EN

Stack Overflow用户
提问于 2019-11-28 07:34:42
回答 1查看 253关注 0票数 0

我需要一些帮助,谁知道如何解决我在部署war文件到Heroku时遇到的问题。

如果有人能帮我解决这个问题,我会很高兴的。

  • Grails 4
  • Java 8
  • Gradle 5.1.1

谢谢:),快乐编码

代码语言:javascript
复制
Configuring Spring Security Core ...
2019-11-28T07:23:12.993707+00:00 app[web.1]: ... finished configuring Spring Security Core
2019-11-28T07:23:12.993720+00:00 app[web.1]:
2019-11-28T07:23:13.112063+00:00 app[web.1]:
2019-11-28T07:23:13.112094+00:00 app[web.1]: Configuring Spring Security REST 3.0.0.RC1...
2019-11-28T07:23:13.169216+00:00 app[web.1]: ... finished configuring Spring Security REST
2019-11-28T07:23:13.169225+00:00 app[web.1]:
2019-11-28T07:23:13.170510+00:00 app[web.1]: ... with GORM support
2019-11-28T07:23:22.340522+00:00 app[web.1]: 2019-11-28 07:23:22.336 ERROR --- [ost-startStop-1] o.s.boot.SpringApplication               : Application run failed
2019-11-28T07:23:22.340542+00:00 app[web.1]:
2019-11-28T07:23:22.340547+00:00 app[web.1]: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' defined in org.springframework.web.servlet.config.annotation.DelegatingWebMvcConfiguration: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Factory method 'requestMappingHandlerAdapter' threw exception; nested exception is java.lang.BootstrapMethodError: java.lang.IllegalAccessError: no such method: reactor.core.publisher.Mono.from(Publisher)Mono/invokeStatic
2019-11-28T07:23:22.340549+00:00 app[web.1]: at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:627)
2019-11-28T07:23:22.340551+00:00 app[web.1]: at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:456)
2019-11-28T07:23:22.340554+00:00 app[web.1]: at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321)
2019-11-28T07:23:22.340557+00:00 app[web.1]: at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160)
2019-11-28T07:23:22.340560+00:00 app[web.1]: at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
2019-11-28T07:23:22.340562+00:00 app[web.1]: at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)
2019-11-28T07:23:22.340564+00:00 app[web.1]: at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
2019-11-28T07:23:22.340566+00:00 app[web.1]: at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
2019-11-28T07:23:22.340569+00:00 app[web.1]: at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
2019-11-28T07:23:22.340570+00:00 app[web.1]: at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
2019-11-28T07:23:22.340572+00:00 app[web.1]: at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:845)
2019-11-28T07:23:22.340573+00:00 app[web.1]: at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)
2019-11-28T07:23:22.340575+00:00 app[web.1]: at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
2019-11-28T07:23:22.340577+00:00 app[web.1]: at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
2019-11-28T07:23:22.340578+00:00 app[web.1]: at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:742)
2019-11-28T07:23:22.340580+00:00 app[web.1]: at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:389)
2019-11-28T07:23:22.340581+00:00 app[web.1]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:311)
2019-11-28T07:23:22.340583+00:00 app[web.1]: at grails.boot.GrailsApp.run(GrailsApp.groovy:97)
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-04-12 17:19:14

我已经解决了这个问题,在Heroku上,他们有一个名为heroku-cli-deploy的插件,如果您部署了一个war文件,特别是如果这个由grails生成的war文件,请确保为您的war文件选择合适的webapp运行程序版本。Grails war文件已经包含tomcat,并确保tomcat版本与Heroku webapp-runner.匹配。在我的例子中,我选择了一个8.5.11.0 webapp-runner版本。

代码语言:javascript
复制
heroku war:deploy warfile.war --webapp-runner 8.5.11.0 -a herokuAppName
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/59083768

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档