title: Exception while sending context initialized event to listener instance of class ContextLoaderListener
body: <p>I am trying to use Tomcat for my web application but I got this error running the app:</p>
  
  <pre><code>SEVERE: Context initialization failed
  java.lang.ExceptionInInitializerError
      at org.springframework.core.env.AbstractEnvironment.suppressGetenvAccess(AbstractEnvironment.java:406)
      at org.springframework.core.env.AbstractEnvironment.getSystemEnvironment(AbstractEnvironment.java:368)
      at org.springframework.core.env.StandardEnvironment.customizePropertySources(StandardEnvironment.java:79)
      at org.springframework.web.context.support.StandardServletEnvironment.customizePropertySources(StandardServletEnvironment.java:90)
      at org.springframework.core.env.AbstractEnvironment.&lt;init&gt;(AbstractEnvironment.java:124)
      at org.springframework.core.env.StandardEnvironment.&lt;init&gt;(StandardEnvironment.java:54)
      at org.springframework.web.context.support.StandardServletEnvironment.&lt;init&gt;(StandardServletEnvironment.java:44)
      at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.createEnvironment(AbstractRefreshableWebApplicationContext.java:156)
      at org.springframework.context.support.AbstractApplicationContext.getEnvironment(AbstractApplicationContext.java:288)
      at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.resolvePath(AbstractRefreshableConfigApplicationContext.java:122)
      at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.setConfigLocations(AbstractRefreshableConfigApplicationContext.java:80)
      at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.setConfigLocation(AbstractRefreshableConfigApplicationContext.java:68)
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:386)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:744)
  Caused by: java.lang.NullPointerException
      at org.springframework.core.SpringProperties.&lt;clinit&gt;(SpringProperties.java:58)
      ... 24 more
  
  abr 22, 2014 4:49:06 PM org.apache.catalina.core.StandardContext listenerStart
  SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
  java.lang.ExceptionInInitializerError
      at org.springframework.core.env.AbstractEnvironment.suppressGetenvAccess(AbstractEnvironment.java:406)
      at org.springframework.core.env.AbstractEnvironment.getSystemEnvironment(AbstractEnvironment.java:368)
      at org.springframework.core.env.StandardEnvironment.customizePropertySources(StandardEnvironment.java:79)
      at org.springframework.web.context.support.StandardServletEnvironment.customizePropertySources(StandardServletEnvironment.java:90)
      at org.springframework.core.env.AbstractEnvironment.&lt;init&gt;(AbstractEnvironment.java:124)
      at org.springframework.core.env.StandardEnvironment.&lt;init&gt;(StandardEnvironment.java:54)
      at org.springframework.web.context.support.StandardServletEnvironment.&lt;init&gt;(StandardServletEnvironment.java:44)
      at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.createEnvironment(AbstractRefreshableWebApplicationContext.java:156)
      at org.springframework.context.support.AbstractApplicationContext.getEnvironment(AbstractApplicationContext.java:288)
      at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.resolvePath(AbstractRefreshableConfigApplicationContext.java:122)
      at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.setConfigLocations(AbstractRefreshableConfigApplicationContext.java:80)
      at org.springframework.context.support.AbstractRefreshableConfigApplicationContext.setConfigLocation(AbstractRefreshableConfigApplicationContext.java:68)
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:386)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4887)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5381)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:744)
  Caused by: java.lang.NullPointerException
      at org.springframework.core.SpringProperties.&lt;clinit&gt;(SpringProperties.java:58)
      ... 24 more 
  </code></pre>
  
  <p>My web.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="ISO-8859-1"?&gt;
  
  &lt;web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
      version="2.4"&gt;
  
      &lt;display-name&gt;Archetype Created Web Application&lt;/display-name&gt;
  
      &lt;context-param&gt;
          &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
          &lt;param-value&gt;       
              classpath*:/META-INF/persistence-context.xml,
              classpath*:/META-INF/service-context.xml,
              classpath*:/META-INF/web-context.xml
          &lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;context-param&gt;
          &lt;param-name&gt;configuration&lt;/param-name&gt;
          &lt;param-value&gt;development&lt;/param-value&gt;
      &lt;/context-param&gt;
  
      &lt;listener&gt;
          &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
      &lt;/listener&gt;
  
      &lt;filter&gt;
          &lt;filter-name&gt;wicket.filter&lt;/filter-name&gt;
          &lt;filter-class&gt;org.apache.wicket.protocol.http.WicketFilter&lt;/filter-class&gt;
          &lt;init-param&gt;
              &lt;param-name&gt;applicationFactoryClassName&lt;/param-name&gt;
              &lt;param-value&gt;org.apache.wicket.spring.SpringWebApplicationFactory&lt;/param-value&gt;
          &lt;/init-param&gt;
      &lt;/filter&gt;
  
      &lt;filter-mapping&gt;
          &lt;filter-name&gt;wicket.filter&lt;/filter-name&gt;
          &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
          &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;
          &lt;dispatcher&gt;ERROR&lt;/dispatcher&gt;
      &lt;/filter-mapping&gt;
  
      &lt;session-config&gt;
          &lt;session-timeout&gt;7200&lt;/session-timeout&gt;
      &lt;/session-config&gt;
  
  &lt;/web-app&gt;
  </code></pre>