2017-09-05 2 views
0

Ich bin frustriert ... Was ist ApplicationEventMulticaster und wie kann ich es initialisieren oder aktualisieren? Warum wird es benötigt?Grails-App startet nicht - ApplicationEventMulticaster nicht initialisiert

# 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[email protected]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([email protected]/Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke([email protected]/NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke([email protected]/DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke([email protected]/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) 

Wie oder wo muss ich diese Aktualisierungsaktion nennen ?! Ich habe keinen Kleber. Es ist meine erste Grails-App, die ich auf einem Server ausführen möchte. In Localhost läuft alles gut.

System (Dev, funktioniert):

  • Mac
  • Grails 3.3.
  • MySQL
  • java version "1.8.0_112"

System (! Production, funktioniert nicht)

  • Ubuntu Server 14.04 LTS
  • Grails Version: 3.3.0
  • Groovy Version: 2.4.11
  • JVM Version: 9-intern
  • MySQL
+0

Bitte mehr Details zu Ihrer Frage hinzufügen:?, Welche Version von Grails verwenden Sie, was ist Ihr Setup verwenden Sie externe lib? – lifeisfoo

+0

'grails -Ausführung | Grails Version: 3.3.0 | Groovy Version: 2.4.11 | JVM Version: 9-interne ' –

+0

Mögliche Duplikat [ApplicationEventMulticaster nicht initialisiert - rufen 'Refresh' vor den Ereignissen über die Sammels Kontext] (https://stackoverflow.com/questions/45318618/applicationeventmulticaster-not-initialized-call-refresh-before-multicasting) – lifeisfoo

Antwort

0

Ich reparierte es dies wie:

  • deinstallieren tomcat/Java-Unterstützung in Plesk
  • apt-get remove java
  • apt-get remove openjdk *
  • apt-get install openjdk-8-jdk
  • cd [app-pfad]
  • grails run-app

und es hat funktioniert! so dass die Java "9-interne" Umgebung nicht mit Grails-Apps (3.3.0) funktionierte. :(

Nach diesem

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

auch ausgeführt wurde, perfekt

Verwandte Themen