velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Will Glass-Husain" <wglasshus...@gmail.com>
Subject Re: Cannot find templates
Date Mon, 06 Oct 2008 17:19:46 GMT
My quick guess is a velocity.jar in your app server classpath (in addition
or instead of the WEB-INF/lib) classpath.  This can cause Velocity to look
for files (like the velocity.properties file) in the wrong place.

Velocity 1.5 takes care of this.

WILL


On Mon, Oct 6, 2008 at 10:12 AM, Christopher Schultz <
chris@christopherschultz.net> wrote:

> All,
>
> I'm using velocity 1.4 and velocity-tools 1.4 and we're upgrading to a
> new production box. I'm testing the application out and it looks like
> Velocity can't find any templates. :(
>
> Here's the exception:
>
> 2008-10-06 11:57:58,618 [TP-Processor1] ERROR
> org.childhealthcare.diagnosis.servlet.VelocityLayoutServlet- Error
> servicing /chadis/home/admin.vm
> org.apache.velocity.exception.ResourceNotFoundException: Unable to find
> resource '/home/admin.vm'
>        at
>
> org.apache.velocity.runtime.resource.ResourceManagerImpl.loadResource(ResourceManagerImpl.java:458)
>        at
>
> org.apache.velocity.runtime.resource.ResourceManagerImpl.getResource(ResourceManagerImpl.java:341)
>        at
>
> org.apache.velocity.runtime.RuntimeInstance.getTemplate(RuntimeInstance.java:831)
>        at
> org.apache.velocity.app.VelocityEngine.getTemplate(VelocityEngine.java:491)
>        at
>
> org.apache.velocity.tools.view.servlet.VelocityViewServlet.getTemplate(VelocityViewServlet.java:729)
>
>
> Here is my full velocity.properties:
>
> #
> # velocity.properties for production use.
> #
>
> velocimacro.library = /WEB-INF/VM_global_library.vm
> velocimacro.permissions.allow.inline = true
> velocimacro.permissions.allow.inline.to.replace.global = false
> velocimacro.permissions.allow.inline.local.scope = false
> velocimacro.context.localscope = false
>
> #
> # Explicitly set the resource loader.
> #
> resource.loader=webapp
>
> webapp.resource.loader.class=org.apache.velocity.tools.view.servlet.WebappLoader
> webapp.resource.loader.cache=true
> webapp.resource.loader.path=.
>
> # Turn off template re-loading
> webapp.resource.loader.modificationCheckInterval=0
>
> The files I'm attempting to load are definitely in the webapp's
> deployment directory. I checked, and the directories all leading up to
> my deployment directory all have the r and x bits set, and the server is
> running as the same user that did the (manual un-war) deployment. This
> works no problem in 4 other environments, so I must be overlooking
> something really stupid.
>
> Any suggestions?
>
> Thanks,
> -chris
>
>


-- 
Forio Business Simulations

Will Glass-Husain
wglass@forio.com
www.forio.com

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