velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anmol Khanna" <an...@radiocity.com.au>
Subject newbie question - deploying sample servlet
Date Mon, 08 Apr 2002 01:36:08 GMT
Hi,

I am trying to run the sample servlet example available with velocity build 1.0.1. 
I get following error message when I access the servlet.  


java.lang.Exception: Cannot find the template!
java.lang.Exception: Cannot find the template! at org.apache.velocity.servlet.VelocityServlet.doRequest(VelocityServlet.java:334)
at org.apache.velocity.servlet.VelocityServlet.doGet(VelocityServlet.java:287) at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:812) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:758)
at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:536) 

Velocity log displays the following error message:


Mon Apr 08 10:35:06 EST 2002 AvalonLogSystem initialized using logfile C:\Program Files\JabCreative\Tomcat\jakarta-tomcat-3.2.3\bin\velocity.log
Mon Apr 08 10:35:06 EST 2002   [info]   [info] Default Properties File: org\apache\velocity\runtime\defaults\velocity.properties
Mon Apr 08 10:35:06 EST 2002   [info] Resource Loader Instantiated: org.apache.velocity.runtime.resource.loader.FileResourceLoader
Mon Apr 08 10:35:06 EST 2002   [info] FileResourceLoader : initialization starting.
Mon Apr 08 10:35:06 EST 2002   [info] FileResourceLoader : adding path '.'
Mon Apr 08 10:35:06 EST 2002   [info] FileResourceLoader : initialization complete.
Mon Apr 08 10:35:06 EST 2002   [info] Loaded Pluggable Directive: org.apache.velocity.runtime.directive.Literal
Mon Apr 08 10:35:06 EST 2002   [info] Loaded Pluggable Directive: org.apache.velocity.runtime.directive.Macro
Mon Apr 08 10:35:06 EST 2002   [info] Loaded Pluggable Directive: org.apache.velocity.runtime.directive.Parse
Mon Apr 08 10:35:06 EST 2002   [info] Loaded Pluggable Directive: org.apache.velocity.runtime.directive.Include
Mon Apr 08 10:35:06 EST 2002   [info] Loaded Pluggable Directive: org.apache.velocity.runtime.directive.Foreach
Mon Apr 08 10:35:06 EST 2002   [info] Created: 20 parsers.
Mon Apr 08 10:35:06 EST 2002   [info] Velocimacro : initialization starting.
Mon Apr 08 10:35:06 EST 2002   [info] Velocimacro : adding VMs from VM library template :
VM_global_library.vm
Mon Apr 08 10:35:06 EST 2002  [error] ResourceManager : unable to find resource 'VM_global_library.vm'
in any resource loader.
Mon Apr 08 10:35:06 EST 2002   [info] Velocimacro : error using  VM library template VM_global_library.vm
: org.apache.velocity.exception.ResourceNotFoundException: Unable to find resource 'VM_global_library.vm'
Mon Apr 08 10:35:06 EST 2002   [info] Velocimacro : allowInline = true : VMs can be defined
inline in templates
Mon Apr 08 10:35:06 EST 2002   [info] Velocimacro : allowInlineToOverride = false : VMs defined
inline may NOT replace previous VM definitions
Mon Apr 08 10:35:06 EST 2002   [info] Velocimacro : allowInlineLocal = false : VMs defined
inline will be  global in scope if allowed.
Mon Apr 08 10:35:06 EST 2002   [info] Velocimacro : messages on  : VM system will output logging
messages
Mon Apr 08 10:35:06 EST 2002   [info] Velocimacro : initialization complete.
Mon Apr 08 10:35:06 EST 2002   [info] Velocity successfully started.
Mon Apr 08 10:35:06 EST 2002  [error] ResourceManager : unable to find resource 'sample.vm'
in any resource loader.

I have placed the sample servlet (SampleServlet.class) and velocity files ( sample.vm - used
by SampleServlet and VM_global_library.vm)  in  web-inf/classes folder of tomcat.


The log says 
" ResourceManager : unable to find resource 'VM_global_library.vm' in any resource loader"
What location does the resource manager look for the velocity files ?



Thanks
Anmol Khanna




Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message