File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Open Source Projects and the fly likes Apache Velocity ---ResourceNotFoundException Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Apache Velocity ---ResourceNotFoundException " Watch "Apache Velocity ---ResourceNotFoundException " New topic

Apache Velocity ---ResourceNotFoundException

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234


I need to work on Apache Velocity , so i started running a sample desktop program for which i was unsuccessful .

I have created a Template and kept it in my c drive with the name ClassMethods.vm

In my Application i am trying to refer this in this way

for which the exception thrown is

Exception in thread "main" org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'c:\ClassMethods.vm'
at org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(
at org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(
at org.apache.velocity.runtime.RuntimeInstance.getTemplate(
at org.apache.velocity.runtime.RuntimeInstance.getTemplate(
at org.apache.velocity.runtime.RuntimeSingleton.getTemplate(
at velocity.CallClassMethods.main(

Please help .

Save India From Corruption - Anna Hazare.
Hussein Baghdadi
clojure forum advocate

Joined: Nov 08, 2003
Posts: 3479

I think your post should be posted at: Other Open Source Projects
Any way don't repost it there
I didn't try Velocity but my guess is your Velocity templates should be in you class path.
Not sure but worth trying.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 45277
John Todd wrote:Hey,
I think your post should be posted at: Other Open Source Projects
Any way don't repost it there . . .
Agree. Moving it thither.
I agree. Here's the link:
subject: Apache Velocity ---ResourceNotFoundException
It's not a secret anymore!