title: java.lang.NullPointerException: parentLoader == null && !nullAllowed
body: <p>I am trying to use ehcache in my android app. It fails on the first line. So this isn't anything to do with a bad cache configuration. I am planning to configure cache programatically so I do not have any config files. All I did was add ehcache as a dependency and try calling the method below. Using ehcache 2.10.2</p>
  
  <pre><code>        CacheManager singletonManager = CacheManager.create();
  </code></pre>
  
  <p>Stacktrace:</p>
  
  <pre><code>W/System.err: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
  W/System.err: SLF4J: Defaulting to no-operation (NOP) logger implementation
  W/System.err: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
  E/AndroidRuntime: FATAL EXCEPTION: Thread-158
  Process: test.app, PID: 7275
  java.lang.ExceptionInInitializerError
  at net.sf.ehcache.config.Configuration.&lt;init&gt;(Configuration.java:208)
  at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:152)
  at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:103)
  at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:140)
  at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:892)
  at net.sf.ehcache.CacheManager.create(CacheManager.java:873)
  at test.app.MyCache.setup(MyCache.java:20)
  
  Caused by: java.lang.NullPointerException: parentLoader == null &amp;&amp; !nullAllowed
  at java.lang.ClassLoader.&lt;init&gt;(ClassLoader.java:210)
  at java.lang.ClassLoader.&lt;init&gt;(ClassLoader.java:202)
  at net.sf.ehcache.EhcacheDefaultClassLoader.&lt;init&gt;(EhcacheDefaultClassLoader.java:35)
  at net.sf.ehcache.EhcacheDefaultClassLoader.&lt;clinit&gt;(EhcacheDefaultClassLoader.java:26)
  at net.sf.ehcache.config.Configuration.&lt;init&gt;(Configuration.java:208) 
  at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:152) 
  at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:103) 
  at net.sf.ehcache.config.ConfigurationFactory.parseConfiguration(ConfigurationFactory.java:140) 
  at net.sf.ehcache.CacheManager.newInstance(CacheManager.java:892) 
  at net.sf.ehcache.CacheManager.create(CacheManager.java:873) 
  at test.app.MyCache.setup(MyCache.java:20) 
  </code></pre>