This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Other Open Source Projects and the fly likes Apache Velocity ---ResourceNotFoundException Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "Apache Velocity ---ResourceNotFoundException " Watch "Apache Velocity ---ResourceNotFoundException " New topic
Author

Apache Velocity ---ResourceNotFoundException

Ravi Kiran Va
Ranch Hand

Joined: Apr 18, 2009
Posts: 2234

Hi

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(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.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:1380)
at org.apache.velocity.runtime.RuntimeSingleton.getTemplate(RuntimeSingleton.java:305)
at org.apache.velocity.app.Velocity.getTemplate(Velocity.java:383)
at velocity.CallClassMethods.main(CallClassMethods.java:13)


Please help .


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

Joined: Nov 08, 2003
Posts: 3359

Hey,
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
Sheriff

Joined: Oct 13, 2005
Posts: 32671
    
    4
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: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Apache Velocity ---ResourceNotFoundException
 
Similar Threads
Struts2 velocity tag problem (org.apache.velocity.exception.ParseErrorException: Encountered "#end)
Velocity Error:Resource Not Found Exception
suggestion for html
Help executing velocity example
Using css-validator.jar (provided by W3C) in my web application