java.lang.IllegalStateException: Servlets cannot be added to context as the context has been initialised

GitHub | philwebb | 9 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    GitHub comment 6178#229451907

    GitHub | 9 months ago | philwebb
    java.lang.IllegalStateException: Servlets cannot be added to context as the context has been initialised
  2. 0

    /restart endpoint fails with 'IllegalStateException: Servlets can not be added to context'

    GitHub | 1 year ago | rshan2
    org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.IllegalStateException: Servlets can not be added to context /demo as the context has been initialised
  3. 0

    /restart endpoint fails with non-embedded container

    GitHub | 1 year ago | rshan2
    org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is java.lang.IllegalStateException: Servlets can not be added to context /demo as the context has been initialised
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Servlets cannot be added to context as the context has been initialised

      at org.apache.catalina.core.ApplicationContext.addServlet()
    2. Glassfish Core
      ApplicationContext.addServlet
      1. org.apache.catalina.core.ApplicationContext.addServlet(ApplicationContext.java:843)[tomcat-embed-core-8.5.3.jar:8.5.3]
      1 frame