Hi,
I am getting an exception try to call the mergeTemplate method using both the
Singleton and seperate instance method. I have specified the absolute path for the
template files and the path is valid (I can "less" the file on the filesystem). I have
also tried giving relative paths as well (relative to the web-app root as well as
relative to WEB-INF/classes).
Anybody has an idea what the problem could be?
I am running this on ATG Dynamo 6.2, Redhat Enterprise server.
Here is my code:
=================
/* first, we init the runtime engine. */
Velocity.init();
templatePath = templateDir + "/" + templateName;
/* Then make a Context and put data into it */
VelocityContext context = new VelocityContext();
addContextObjects(context, contextObjects);
/* render a template */
Velocity.mergeTemplate(
templatePath, DEFAULT_ENCODING, context, out);
And here is the exception i am getting:
=======================================
*** ERROR 09 Apr 2004 10:56:26,844 -- siycom.utility.VelocityUtil -- Exception
while processing velocity template for templatePath:
/apps/cars/siy/docs/email/templates/PasswordReminderTemplate.xml
org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource
'/apps/cars/siy/docs/email/templates/PasswordReminderTemplate.xml'
at
org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:501)
at
org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:384)
at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:814)
at
org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:796)
at org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:512)
at siycom.utility.VelocityUtil.mergeTemplate(VelocityUtil.java:64)
at
siycom.email.builder.PasswordReminderBuilder.buildMessage(PasswordReminderBuilder.java:47)
at
siycom.email.MessageQueueListener.processMessage(MessageQueueListener.java:105)
at siycom.utility.QueueReader.run(QueueReader.java:148)
at java.lang.Thread.run(Thread.java:536)
Thanks a lot,
Affan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]