Hi, I am using velocity to generate emails out of templates. the email generation goes fine for a while but after sending like 50k-60K successful emails I then start on getting :
Caused by: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'mail/velocity/badDisconnectEmail.vm' at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:483) at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:354) at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1400) at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:370) at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:345) so the weird thing that the email is generated which means the template is there, but after a while veloicity is not able to load any longer. here is some details on how I use it: 1- using spring framework to create resource.loader=class class.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader 2- EmailUtilsImpl import org.apache.velocity.app.VelocityEngine; import org.springframework.ui.velocity.VelocityEngineUtils; import java.util.Map; public class EmailUtilsImpl { private VelocityEngine velocityEngine; public void setVelocityEngine(VelocityEngine velocityEngine) { this.velocityEngine = velocityEngine; } public String mergeTemplateIntoString(String emailTemplate, Map model) throws Exception { String text = VelocityEngineUtils.mergeTemplateIntoString( velocityEngine, emailTemplate, model); return text; } } 3- I am using velocity 1.6.2 and spring framework 2.5.6 4- the packaged war has the templates under WEB-INF/classes/mail/velocity/*.vm Thanks, Peter -- View this message in context: http://old.nabble.com/ResourceNotFoundException%3A-Unable-to-find-resource-tp34185867p34185867.html Sent from the Velocity - Dev mailing list archive at Nabble.com.