Hi there,
if a cache is not configured in ehcache.xml, you'll get a NPE.
The problamatic part is configurationbuilder which can be null. You still call the build() method without checking.
Suggestion:
if (null == configurationBuilder) {
throw new IllegalStateException("No configuration for the cache with the name [" + name + "] was found. "
+ "Please add it to your ehcache.xml file.");
}