Hi,
somehow I'm running into problems with classpathloader which doesn't
seem to work. This is the relevant config-section:
-----------------------8<-----------------------
resource.loader=class
class.resource.loader.description=Velocity Classpath Resource Loader
class.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
-----------------------8<-----------------------
and the lines of code:
-----------------------8<-----------------------
Properties p = new Properties();
p.load(getClass().getClassLoader().getResourceAsStream("velocity.properties"));
Velocity.init(p);
Template template = null;
template=Velocity.getTemplate("at/bestsolution/ojb/builder/templates/dao.vm");
-----------------------8<-----------------------
Although all at/**/* is in my classpath I always get an exception.
Using file-loader with the following entries everything is working as
expected:
-----------------------8<-----------------------
resource.loader=file
file.resource.loader.description = Velocity File Resource Loader
file.resource.loader.class =
org.apache.velocity.runtime.resource.loader.FileResourceLoader
file.resource.loader.path = E:/eclipse-workspaces/beso-devel/clay2ojb/src/
file.resource.loader.cache = false
file.resource.loader.modificationCheckInterval = 0
-----------------------8<-----------------------
Have I missed something? Any ideas?
Tom
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]