gpt4 book ai didi

grails - Grails-App无法启动-ApplicationEventMulticaster未初始化

转载 作者:行者123 更新时间:2023-12-02 15:46:55 24 4
gpt4 key购买 nike

我感到沮丧...什么是ApplicationEventMulticaster,如何初始化或刷新它?为什么需要它?

# java -Dgrails.env=production -jar /root/myapp-0.4.war 

Configuring Spring Security Core ...
... finished configuring Spring Security Core

2017-09-05 22:46:07.948 ERROR --- [ main] o.s.b.f.s.DefaultListableBeanFactory : Destroy method on bean with name 'org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor' threw an exception

java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@46dffdc3: startup date [Tue Sep 05 22:45:58 CEST 2017]; root of context hierarchy
at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:414)
at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:97)
at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:961)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:523)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:968)
at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1030)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:556)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303)
at grails.boot.GrailsApp.run(GrailsApp.groovy:83)
at grails.boot.GrailsApp.run(GrailsApp.groovy:388)
at grails.boot.GrailsApp.run(GrailsApp.groovy:375)
at grails.boot.GrailsApp$run.call(Unknown Source)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:133)
at haselnuss3.Application.main(Application.groovy:8)
at sun.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:531)
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87)
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50)
at org.springframework.boot.loader.WarLauncher.main(WarLauncher.java:59)

我必须如何或在何处调用此刷新操作?!我没有胶水。这是我尝试在服务器上运行的第一个Grails应用程序。在Localhost中,一切运行正常。

系统(开发,工作):
  • Mac
  • Grails 3.3。
  • MySQL
  • Java版本“1.8.0_112”

  • 系统(生产,无法正常工作!)
  • Ubuntu服务器14.04 LTS
  • Grails版本:3.3.0
  • Groovy版本:2.4.11
  • JVM版本:9-内部
  • MySQL
  • 最佳答案

    我这样修复:

  • 卸载Plesk中的tomcat / java支持
  • apt-get删除Java
  • apt-get删除openjdk *
  • apt-get install openjdk-8-jdk
  • cd [应用程序路径]
  • grails运行应用程序

  • 而且有效!
    因此Java“9-internal”环境无法与grails-apps(3.3.0)一起使用。 :(

    之后
    java -Dgrails.env=production -jar /root/my-app.war 

    也完美运行!

    关于grails - Grails-App无法启动-ApplicationEventMulticaster未初始化,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46063225/

    24 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com