string.resource.loader.repository.class = org.apache.velocity.runtime.resource.loader.StringResourceRepositoryImpl
is in my opinion wrong.
It must be something like this:
p.setProperty("string." + Velocity.RESOURCE_LOADER + ".repository.class", "org.apache.velocity.runtime.resource.util.StringResourceRepositoryImpl");
util instead of loader !!
My problem is that I want to use Velocity with two files in a JAR and one file that can be anywhere in the file system. The latter is really hard to solve. So I read the file and use the StringResourceLoader.