Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-14771

14.6 breaks log4j configuration parameter parsing

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Fixed
    • 14.6.0
    • 14.6.1, 14.7.0
    • None
    • None

    Description

      As of 14.6, it looks as if the CMS fails to start when spring booth tries to parse a comma separated value of the log4j.configurationFile property, as it tries to parse it as a URL.

      This is valid configuration, see the section 'Composite Configuration' or 'System Properties' here: https://logging.apache.org/log4j/2.x/manual/configuration.html

       03.06.2021 13:15:32 +0200 INFO [org.apache.catalina.core.ApplicationContext log] 2 Spring WebApplicationInitializers detected on classpath  
      03.06.2021 13:15:36 +0200 SEVERE [org.apache.catalina.startup.HostConfig deployWAR] Error deploying web application archive [/home/cms/tomcat/webapps/cms.war] 
      java.lang.IllegalStateException: Error starting child
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:720)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
              at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
              at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1849)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
              at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)
              at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:773)
              at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
              at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576)
              at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
              at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
              at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
              at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
              at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:936)
              at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:841)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
              at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
              at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
              at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134)
              at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:909)
              at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
              at org.apache.catalina.core.StandardService.startInternal(StandardService.java:421)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
              at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:930)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
              at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:498)
              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:343)
              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:474)
      Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/cms]]
              at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:198)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)
              ... 37 more
      Caused by: java.lang.IllegalStateException: java.lang.IllegalStateException: Could not initialize Log4J2 logging from file:///path/to/conf/log4j2.xml,file:///home/cms/tomcat/conf/log4j2.xml
              at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:327)
              at org.springframework.boot.context.logging.LoggingApplicationListener.initialize(LoggingApplicationListener.java:281)
              at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEnvironmentPreparedEvent(LoggingApplicationListener.java:239)
              at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:216)
              at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
              at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
              at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
              at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:131)
              at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:82)
              at org.springframework.boot.SpringApplicationRunListeners.lambda$environmentPrepared$2(SpringApplicationRunListeners.java:63)
              at java.util.ArrayList.forEach(ArrayList.java:1257)
              at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:117)
              at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:111)
              at org.springframework.boot.SpringApplicationRunListeners.environmentPrepared(SpringApplicationRunListeners.java:62)
              at org.springframework.boot.SpringApplication.prepareEnvironment(SpringApplication.java:362)
              at org.springframework.boot.SpringApplication.run(SpringApplication.java:320)
              at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.run(SpringBootServletInitializer.java:173)
              at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.createRootApplicationContext(SpringBootServletInitializer.java:153)
              at org.springframework.boot.web.servlet.support.SpringBootServletInitializer.onStartup(SpringBootServletInitializer.java:95)
              at org.springframework.web.SpringServletContainerInitializer.onStartup(SpringServletContainerInitializer.java:174)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5140)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
              ... 38 more
      Caused by: java.lang.IllegalStateException: Could not initialize Log4J2 logging from file:///path/to/conf/log4j2.xml,file:///home/cms/tomcat/conf/log4j2.xml
              at org.springframework.boot.logging.log4j2.Log4J2LoggingSystem.loadConfiguration(Log4J2LoggingSystem.java:193)
              at org.springframework.boot.logging.log4j2.Log4J2LoggingSystem.loadConfiguration(Log4J2LoggingSystem.java:181)
              at org.springframework.boot.logging.AbstractLoggingSystem.initializeWithSpecificConfig(AbstractLoggingSystem.java:66)
              at org.springframework.boot.logging.AbstractLoggingSystem.initialize(AbstractLoggingSystem.java:57)
              at org.springframework.boot.logging.log4j2.Log4J2LoggingSystem.initialize(Log4J2LoggingSystem.java:163)
              at org.springframework.boot.context.logging.LoggingApplicationListener.initializeSystem(LoggingApplicationListener.java:315)
              ... 59 more
      Caused by: java.io.FileNotFoundException: /path/to/conf/log4j2.xml,file:/home/cms/tomcat/conf/log4j2.xml (No such file or directory)
              at java.io.FileInputStream.open0(Native Method)
              at java.io.FileInputStream.open(FileInputStream.java:195)
              at java.io.FileInputStream.<init>(FileInputStream.java:138)
              at java.io.FileInputStream.<init>(FileInputStream.java:93)
              at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
              at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
              at java.net.URL.openStream(URL.java:1045)
              at org.springframework.boot.logging.log4j2.Log4J2LoggingSystem.getConfigurationSource(Log4J2LoggingSystem.java:198)
              at org.springframework.boot.logging.log4j2.Log4J2LoggingSystem.loadConfiguration(Log4J2LoggingSystem.java:189)
              ... 64 more

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              boudekerk Bartosz Oudekerk
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: