Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-1462

Jetty + Logback > Stack Overflow during logging framework initialization

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 1.1.1
    • logback-classic
    • None
    • JDK 11.0.2

      logback-classic 1.1.1

      jetty 9.4.14

    Description

      Hello, my app cannot be initialized due to stack overflow error caused by recursive calls between jetty and logback initialization. 

       

      Application classes were intentionally renamed.

       

       

      java.lang.RuntimeException: ApplicationBootstrap : Error occurred during initialization
      at com.xxx.app.ApplicationBootstrap.init
      at com.xxx.app.ApplicationBootstrap.contextInitialized
      at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:957)
      at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:552)
      at org.eclipse.jetty.server.handler.ContextHandler.startContext(ContextHandler.java:922)
      at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:364)
      at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1497)
      at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1459)
      at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:852)
      at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:278)
      at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:545)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:138)
      at org.eclipse.jetty.server.Server.start(Server.java:415)
      at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:108)
      at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:113)
      at org.eclipse.jetty.server.Server.doStart(Server.java:382)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
      at com.xxx.EmbeddedJetty.startServer(EmbeddedJetty.java:235)
      at com.xxx.EmbeddedJetty.run(EmbeddedJetty.java:92)
      at com.xxx.EmbeddedJetty.main(EmbeddedJetty.java:76)
      Caused by: java.lang.StackOverflowError
      at java.base/java.net.URL.<init>(URL.java:656)
      at java.base/java.net.URL.<init>(URL.java:523)
      at java.base/jdk.internal.loader.URLClassPath$FileLoader.getResource(URLClassPath.java:1176)
      at java.base/jdk.internal.loader.URLClassPath$FileLoader.findResource(URLClassPath.java:1165)
      at java.base/jdk.internal.loader.URLClassPath.findResource(URLClassPath.java:291)
      at java.base/java.net.URLClassLoader$2.run(URLClassLoader.java:655)
      at java.base/java.net.URLClassLoader$2.run(URLClassLoader.java:653)
      at java.base/java.security.AccessController.doPrivileged(Native Method)
      at java.base/java.net.URLClassLoader.findResource(URLClassLoader.java:652)
      at org.eclipse.jetty.webapp.WebAppClassLoader.loadAsResource(WebAppClassLoader.java:635)
      at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:546)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.loadClass(PackagingDataCalculator.java:207)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.bestEffortLoadClass(PackagingDataCalculator.java:232)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.computeBySTEP(PackagingDataCalculator.java:138)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.populateUncommonFrames(PackagingDataCalculator.java:113)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.populateFrames(PackagingDataCalculator.java:105)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.calculate(PackagingDataCalculator.java:57)
      at ch.qos.logback.classic.spi.ThrowableProxy.calculatePackagingData(ThrowableProxy.java:147)
      at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:124)
      at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:440)
      at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:396)
      at ch.qos.logback.classic.Logger.log(Logger.java:788)
      at org.eclipse.jetty.util.log.JettyAwareLogger.log(JettyAwareLogger.java:668)
      at org.eclipse.jetty.util.log.JettyAwareLogger.warn(JettyAwareLogger.java:474)
      at org.eclipse.jetty.util.log.Slf4jLog.warn(Slf4jLog.java:73)
      at org.eclipse.jetty.util.log.Slf4jLog.warn(Slf4jLog.java:67)
      at org.eclipse.jetty.webapp.ClasspathPattern.match(ClasspathPattern.java:706)
      at org.eclipse.jetty.webapp.WebAppContext.isServerClass(WebAppContext.java:829)
      at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:558)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.loadClass(PackagingDataCalculator.java:207)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.bestEffortLoadClass(PackagingDataCalculator.java:232)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.computeBySTEP(PackagingDataCalculator.java:138)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.populateUncommonFrames(PackagingDataCalculator.java:113)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.populateFrames(PackagingDataCalculator.java:105)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.calculate(PackagingDataCalculator.java:57)
      at ch.qos.logback.classic.spi.ThrowableProxy.calculatePackagingData(ThrowableProxy.java:147)
      at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:124)
      at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:440)
      at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:396)
      at ch.qos.logback.classic.Logger.log(Logger.java:788)
      at org.eclipse.jetty.util.log.JettyAwareLogger.log(JettyAwareLogger.java:668)
      at org.eclipse.jetty.util.log.JettyAwareLogger.warn(JettyAwareLogger.java:474)
      at org.eclipse.jetty.util.log.Slf4jLog.warn(Slf4jLog.java:73)
      at org.eclipse.jetty.util.log.Slf4jLog.warn(Slf4jLog.java:67)
      at org.eclipse.jetty.webapp.ClasspathPattern.match(ClasspathPattern.java:706)
      at org.eclipse.jetty.webapp.WebAppContext.isServerClass(WebAppContext.java:829)
      at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:558)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.loadClass(PackagingDataCalculator.java:207)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.bestEffortLoadClass(PackagingDataCalculator.java:232)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.computeBySTEP(PackagingDataCalculator.java:138)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.populateUncommonFrames(PackagingDataCalculator.java:113)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.populateFrames(PackagingDataCalculator.java:105)
      at ch.qos.logback.classic.spi.PackagingDataCalculator.calculate(PackagingDataCalculator.java:57)
      at ch.qos.logback.classic.spi.ThrowableProxy.calculatePackagingData(ThrowableProxy.java:147)
      at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:124)
      at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:440)
      at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:396)
      at ch.qos.logback.classic.Logger.log(Logger.java:788)
      at org.eclipse.jetty.util.log.JettyAwareLogger.log(JettyAwareLogger.java:668)
      at org.eclipse.jetty.util.log.JettyAwareLogger.warn(JettyAwareLogger.java:474)
      at org.eclipse.jetty.util.log.Slf4jLog.warn(Slf4jLog.java:73)
      at org.eclipse.jetty.util.log.Slf4jLog.warn(Slf4jLog.java:67)
      at org.eclipse.jetty.webapp.ClasspathPattern.match(ClasspathPattern.java:706)
      at org.eclipse.jetty.webapp.WebAppContext.isServerClass(WebAppContext.java:829)
      at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:558)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)

      .....

      Attachments

        Activity

          People

            logback-dev Logback dev list
            dstibor Daniel Stibor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: