Error Org.apache.velocity - Resourcemanager Unable To Find Resource
Contents |
here resourcemanager unable to find resource 'error.vm' in any resource loader for a quick overview of the site Help
Resourcemanager Unable To Find Resource In Any Resource Loader
Center Detailed answers to any questions you might have Meta Discuss
Java Unable To Find Resource
the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about
Resourcemanager Unable To Find Resource 'vm_global_library.vm' In Any Resource Loader
hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. resourcemanager unable to find resource c# Join them; it only takes a minute: Sign up ResourceManager : unable to find resource 'emailTemplate.vm' in any resource loader up vote 1 down vote favorite 2 I am doing an application in springs with maven. i wrote all properties in app.properties file file structure is like this src/main/resource |_ | templates | |_mytempaltefile.vm |_ app.properties i gave the path(absloute) in app.property app.properties file template.base.path=D\:/SVN/trunk/tfbdirect/src/main/resources/templates utilities-spring.xml
here for a quick overview of the site Help Center Detailed answers to any velocity classpath resource loader example questions you might have Meta Discuss the workings and policies velocity resource loader of this site About Us Learn more about Stack Overflow the company Business Learn more about spring boot resourcemanager : unable to find resource 'error.vm' in any resource loader hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack http://stackoverflow.com/questions/24935896/resourcemanager-unable-to-find-resource-emailtemplate-vm-in-any-resource-loa Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Unable to find velocity template resources up vote 28 down vote favorite 12 Just a simple velocity standalone app based on maven structure. Here is the code snippet written http://stackoverflow.com/questions/9051413/unable-to-find-velocity-template-resources in Scala to render the template helloworld.vm in ${basedir}/src/main/resources folder: com.ggd543.velocitydemo import org.apache.velocity.app.VelocityEngine import org.apache.velocity.VelocityContext import java.io.StringWriter /** * @author ${user.name} */ object App { def main(args: Array[String]) { //First , get and initialize an engine val ve = new VelocityEngine(); ve.init(); //Second, get the template val resUrl = getClass.getResource("/helloworld.vm") val t = ve.getTemplate("helloworld.vm"); // not work // val t = ve.getTemplate("/helloworld.vm"); // not work // val t = ve.getTemplate(resUrl.toString); // not work yet //Third, create a context and add data val context = new VelocityContext(); context.put("name", "Archer") context.put("site", "http://www.baidu.com") //Finally , render the template into a StringWriter val sw = new StringWriter t.merge(context, sw) println(sw.toString); } } when to compile and run the program, I got the following error: 2012-1-29 14:03:59 org.apache.velocity.runtime.log.JdkLogChute log 严重: ResourceManager : unable to find resource '/helloworld.vm' in any resource loader. Exception in thread "main" org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource '/helloworld.vm' at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:474) at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:352) at org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1533) at org.apache.velocity.runtime.RuntimeInstance.getTemplate(Runt
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings http://stackoverflow.com/questions/36180753/getting-velocity-error-unable-to-find-resource-error-vm-in-any-resource-loade and policies of this site About Us Learn more about Stack Overflow http://forum.spring.io/forum/spring-projects/web/76559-can-t-find-velocity-templates the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; unable to it only takes a minute: Sign up Getting velocity error “unable to find resource 'error.vm' in any resource loader.” up vote 1 down vote favorite I have a REST API based on Spring boot 1.3.3. I use Velocity only for email template. There is no JSP/HTML view. I use exclusively RestController from Spring. Sometimes, I get this error: "ResourceManager : unable to find unable to find resource 'error.vm' in any resource loader." It's exclusively this vm file which is requested. Should I disable something to my Spring Boot app to disable this error? java spring-boot velocity share|improve this question edited Mar 23 at 14:39 asked Mar 23 at 14:19 Franck Yapadesouci Anso 301216 How is velocity included? If you are using their starter it may include the controller translations for web pages. What do you mean by "It's exclusively this vm file which is requested."? Can you give more info on the conditions when this error comes up? –Rob Baily Mar 23 at 15:00 I don't know exactly when this error comes up. I have no other log than this and it can pop 6 times in 1second like nothing in an hour. I use this starter pack : compile("org.springframework.boot:spring-boot-starter-web") –Franck Yapadesouci Anso Mar 23 at 15:45 add a comment| 1 Answer 1 active oldest votes up vote 1 down vote accepted I believe Velocity is looking for this template if it has an errors so y
and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor. Announcement Announcement Module Collapse No announcement yet. Can't find Velocity Templates Page Title Module Move Remove Collapse X Conversation Detail Module Collapse Posts Latest Activity Search Forums Page of 1 Filter Time All Time Today Last Week Last Month Show All Discussions only Photos only Videos only Links only Polls only Filtered by: Clear All new posts ryan_ny Junior Member Join Date: Feb 2010 Posts: 2 #1 Can't find Velocity Templates Feb 3rd, 2010, 06:35 PM Hi All, I am having some problems getting Velocity to find the templates in my Spring application. Here are my relevant files: web.xml: Code: