My Tomcat installation has a space character in the path (installation is provided so I cannot change this). I want to configure my EhCache via JCacheManagerFactoryBean, property cacheManagerUri=classpath:ehcache.xml. The resource URL yields something like ...%20... which is the correct encoding of the space character, but then the default URIEncoder (which is "encoding" by default) encodes the percent sign and I end up with a URI like ...%2520... which does not work for obvious reasons. I do not understand why the URIEditor needs to "encode" at all, looks like fixing broken URIs at the wrong place, but at least for the case of classpath: URI's I absolutely do not see a point in applying any additional encoding. The resource gives a valid URL and this is just fine as it is.
I suggest to replace the createURI(url) in URIEditor:110 by a simple new URI(url). Running such patch fixes the issue for me.