title: org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start
body: <p>I work on a <code>Java/Spring/ Apache Cxf</code> web app and suddenly, I get the error while I made some apparently naive changes, </p>
  
  <pre><code>25-Aug-2017 11:48:43.036 INFO [RMI TCP Connection(2)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
  log4j:WARN No appenders could be found for logger (org.apache.cxf.common.logging.LogUtils).
  log4j:WARN Please initialize the log4j system properly.
  log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
  25-Aug-2017 11:48:43.540 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
  25-Aug-2017 11:48:43.554 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
  [2017-08-25 11:48:43,586] Artifact jaxrs-tutorials:war exploded: Error during artifact deployment. See server log for details.
  25-Aug-2017 11:48:49.258 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/Applications/Tomcat-8.5.16/webapps/manager]
  25-Aug-2017 11:48:49.310 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/Applications/Tomcat-8.5.16/webapps/manager] has finished in [51] ms
  </code></pre>
  
  <p>I guess this is the main <code>info</code> of the error, </p>
  
  <pre><code>25-Aug-2017 11:48:43.540 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
  25-Aug-2017 11:48:43.554 SEVERE [RMI TCP Connection(2)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors
  </code></pre>
  
  <p>The project structure is provided, </p>
  
  <p><a href="https://i.stack.imgur.com/rfwun.png" rel="noreferrer"><img src="https://i.stack.imgur.com/rfwun.png" alt="enter image description here"></a></p>
  
  <p>The <code>config</code> directory is utilized for the <code>Java annotation based config</code> and code is provided below. </p>
  
  <p>The <code>AppConfig</code> file, </p>
  
  <pre><code>@Configuration
  @ComponentScan(AppConfig.SERVICE_PACKAGE)
  public class AppConfig {
  
      public static final String BASE_PACKAGE = "mobi.puut";
      public static final String SERVICE_PACKAGE = BASE_PACKAGE + ".services";
      private static final String RESOURCES_PACKAGE = BASE_PACKAGE + ".rest";
      private static final String PROVIDER_PACKAGE = BASE_PACKAGE + ".rest.provider";
  
      public static final String API_BASE = "/api/*";
  
      @ApplicationPath("/")
      public class JaxRsApiApplication extends Application {
      }
  
      @Bean(destroyMethod = "shutdown")
      public SpringBus cxf() {
          return new SpringBus();
      }
  
      @Bean
      @DependsOn("cxf")
      public Server jaxRsServer(ApplicationContext appContext) {
          JAXRSServerFactoryBean factory = RuntimeDelegate.getInstance().createEndpoint(jaxRsApiApplication(), JAXRSServerFactoryBean.class);
          factory.setServiceBeans(restServiceList(appContext));
          factory.setAddress("/" + factory.getAddress());
          factory.setProviders(restProviderList(appContext, jsonProvider()));
          return factory.create();
      }
  
      @Bean
      public JaxRsApiApplication jaxRsApiApplication() {
          return new JaxRsApiApplication();
      }
  
      @Bean
      public JacksonJsonProvider jsonProvider() {
          return new JacksonJsonProvider();
      }
  
      private List&lt;Object&gt; restServiceList(ApplicationContext appContext) {
          return RestServiceBeanScanner.scan(appContext, AppConfig.RESOURCES_PACKAGE);
      }
  
      private List&lt;Object&gt; restProviderList(final ApplicationContext appContext,
                                            final JacksonJsonProvider jsonProvider) {
          final List&lt;Object&gt; providers = RestProviderBeanScanner.scan(appContext, PROVIDER_PACKAGE);
          providers.add(jsonProvider);
          return providers;
      }
  
  }
  </code></pre>
  
  <p>The <code>WebInitializer</code> is provided, </p>
  
  <pre><code>public class WebAppInitializer implements WebApplicationInitializer {
  
      @Override
      public void onStartup(ServletContext servletContext) throws ServletException {
          servletContext.addListener(new ContextLoaderListener(createWebAppContext()));
          addApacheCxfServlet(servletContext);
      }
  
      private void addApacheCxfServlet(ServletContext servletContext) {
          CXFServlet cxfServlet = new CXFServlet();
  
          ServletRegistration.Dynamic appServlet = servletContext.addServlet("CXFServlet", cxfServlet);
          appServlet.setLoadOnStartup(1);
  
          Set&lt;String&gt; mappingConflicts = appServlet.addMapping(AppConfig.API_BASE);
      }
  
      private WebApplicationContext createWebAppContext() {
          AnnotationConfigWebApplicationContext appContext = new AnnotationConfigWebApplicationContext();
          appContext.register(AppConfig.class);
          return appContext;
      }
  
  }
  </code></pre>
  
  <p>I have seen the similar questions to the platform and those don't help me out and I have so little info to solve the issue. </p>
  
  <p>How can I use <code>logger</code> to get more info and where I should utilize them? Also, any insight about solving the issue will be helpful. I have updated the <code>JAR</code> files with <code>mvn clean install</code> and <code>mvn idea:idea</code> commands. </p>
  
  <p><code>UPDATE</code></p>
  
  <p><code>Tomcat Localhost Log</code></p>
  
  <p><a href="https://i.stack.imgur.com/hVU6B.png" rel="noreferrer"><img src="https://i.stack.imgur.com/hVU6B.png" alt="enter image description here"></a></p>
  
  <p><code>Tomcat Catalina Log</code></p>
  
  <p><a href="https://i.stack.imgur.com/kkMd5.png" rel="noreferrer"><img src="https://i.stack.imgur.com/kkMd5.png" alt="enter image description here"></a></p>