velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manish" <prol...@gmx.net>
Subject Template not found
Date Wed, 22 Sep 2004 14:45:39 GMT
I have a class that uses velocity templete. I specify its path with
property - "file.resource.loader.path"
When class is called from stand-alone application, theer is no problem
getting the template, however when this class is used from a servlet it
fails with following exception -

com.circus.core.Application$1:Unable to find resource
'updated_properties.vm'
org.apache.velocity.exception.ResourceNotFoundException: Unable to find
resource 'updated_properties.vm'
at
org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(Resour
ceManagerImpl.java:458)
at
org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(Resourc
eManagerImpl.java:341)
at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java
:831)
at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java
:813)
at
org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.ja
va:285)
at org.apache.velocity.app.Velocity.getTemplate(Velocity.java:469)
at
com.circus.notify.EmailNotification.getTemplateDetails(EmailNotification.jav
a:230)
at
com.circus.notify.EmailNotification.performNotification(EmailNotification.ja
va:205)
at com.circus.notify.Notifier$1.run(Notifier.java:265)

The path is pseciied through properly, and in all cases it is corrctly
specified. I have printed this path and it shows (absolute value) -
Velocity template path - /home/theproject/templates/velocity

The resource loader is -
Resource Loader Instantiated:
org.apache.velocity.tools.view.servlet.WebappLoader

Thouh I don't know where thsi resource loader is getting specified. (This
code is wriitten by someone else). But for the unit test of my class, the
resource loader is -

[info] Resource Loader Instantiated:
org.apache.velocity.runtime.resource.loader.FileResourceLoader

Which works properly. What can I do to make thsi work?????

TIA,
- Manish






---------------------------------------------------------------------
To unsubscribe, e-mail: velocity-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: velocity-user-help@jakarta.apache.org


Mime
View raw message