title: Spring ClassPathXmlApplicationContext NullPointerException
body: <p>Trying to use spring. The xml file is under src. I've searched and cannot find the problem. Seems it cant find the xml file.</p>
  
  <p>I get the following error:</p>
  
  <pre><code>    Exception in thread "main" 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.core.env.AbstractEnvironment.&lt;init&gt;(AbstractEnvironment.java:124)
  at org.springframework.core.env.StandardEnvironment.&lt;init&gt;(StandardEnvironment.java:54)
  at org.springframework.context.support.AbstractApplicationContext.createEnvironment(AbstractApplicationContext.java:444)
  at org.springframework.context.support.AbstractApplicationContext.getEnvironment(AbstractApplicationContext.java:283)
  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.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:137)
  at org.springframework.context.support.ClassPathXmlApplicationContext.&lt;init&gt;(ClassPathXmlApplicationContext.java:83)
  at org.hancock.javabrains.DrawingApp.main(DrawingApp.java:13)
  Caused by: java.lang.NullPointerException
  at org.springframework.core.SpringProperties.&lt;clinit&gt;(SpringProperties.java:58)
  ... 12 more
  </code></pre>
  
  <p>This is the line causing an error (By changing Beans.xml to an erroneous name I still get same error):</p>
  
  <pre><code>ApplicationContext context = new ClassPathXmlApplicationContext("Beans.xml");
  </code></pre>
  
  <p>The xml (Beans.xml):</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://www.springframework.org/schema/beans
  http://www.springframework.org/schema/beans/spring-beans-4.0.xsd"&gt;
  
  &lt;bean id="helloWorld" class="org.hancock.javabrains.HelloWorld"&gt;
     &lt;property name="message" value="Hello World!"/&gt;
  &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>