Velocity template path is located at the resource folder email_templates subfolder.Ĭode Snippet in Java (Snippets are worked both running on eclipse and inside a Jar) templateName = "/email_templates/"
Apple application loader unavailable unable to process code#
The code sample was written with Apache velocity version 1.7 with embedded Jetty. I have put this working code snippet for future references. 严重: ResourceManager : unable to find resource '/helloworld.vm' in any resource loader.Įxception in thread "main" .ResourceNotFoundException: Unable to find resource '/helloworld.vm'Īt .(ResourceManagerImpl.java:474)Īt .(ResourceManagerImpl.java:352)Īt .RuntimeInstance.getTemplate(RuntimeInstance.java:1533)Īt .RuntimeInstance.getTemplate(RuntimeInstance.java:1514)Īt .VelocityEngine.getTemplate(VelocityEngine.java:373)Īt $.main(App.scala:20)Īt .main(App.scala)Īt 0(Native Method)Īt (NativeMethodAccessorImpl.java:39)Īt (DelegatingMethodAccessorImpl.java:25)Īt .invoke(Method.java:597)Īt .(AppMain.java:120) When to compile and run the program, I got the following error: 14:03:59 .log.JdkLogChute log
![apple application loader unavailable unable to process apple application loader unavailable unable to process](https://appletoolbox.com/wp-content/uploads/2018/08/Screen-Time-Content-and-Privacy-Restrictions-Location.jpg)
Finally, render the template into a StringWriter val t = ve.getTemplate(resUrl.toString) // not work yet
![apple application loader unavailable unable to process apple application loader unavailable unable to process](https://covid19passbook.netlify.app/linkedin.63f674a7.png)
val t = ve.getTemplate("/helloworld.vm") // not work Val t = ve.getTemplate("helloworld.vm") // not work Val resUrl = getClass.getResource("/helloworld.vm") Here is the code snippet written in Scala to render the template helloworld.vm in $/src/main/resources folder:
![apple application loader unavailable unable to process apple application loader unavailable unable to process](https://miro.medium.com/max/1400/1*dSt4seASSkb4vkkk2ek6VA.png)
Just a simple velocity standalone app based on maven structure.