velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nathan Bubna" <nbu...@gmail.com>
Subject Re: Cannot find templates
Date Mon, 06 Oct 2008 21:03:00 GMT
Commons Collections 3.2 is fine.  If you were by chance using
something newer, you might have run afoul of the side effects of the
errant fix for

https://issues.apache.org/jira/browse/COLLECTIONS-271

which they have yet to remedy.

Anyway, it seems to me that the difference is in the servlet engine's
interpretation of paths starting with ./

On Mon, Oct 6, 2008 at 1:58 PM, Christopher Schultz
<chris@christopherschultz.net> wrote:
> Nathan,
>
> Just for completeness, see the answers below. Note that I have solved
> the problem by setting the template path to '/' instead of '.'.
>
> Nathan Bubna wrote:
>> Can you set logging to debug and share the Velocity startup output?
>
> Sure. I don't get much more output on startup.
>
> ************************
>
> 2008-10-06 15:53:56,476 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity   [info]
> **************************************************************
> 2008-10-06 15:53:56,476 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity   [info] Starting Jakarta Velocity v1.4
> 2008-10-06 15:53:56,476 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity   [info] RuntimeInstance initializing.
> 2008-10-06 15:53:56,476 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity   [info] Default Properties File:
> org/apache/velocity/runtime/defaults/velocity.properties
> 2008-10-06 15:53:56,476 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity   [info] Trying to use logger class
> org.apache.velocity.tools.view.servlet.ServletLogger
> 2008-10-06 15:53:56,476 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity   [info] Using logger class
> org.apache.velocity.tools.view.servlet.ServletLogger
> 2008-10-06 15:53:56,480 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity   [info] Default ResourceManager initializing. (class
> org.apache.velocity.runtime.resource.ResourceManagerImpl)
> 2008-10-06 15:53:56,483 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity   [info] Resource Loader Instantiated:
> org.apache.velocity.tools.view.servlet.WebappLoader
> 2008-10-06 15:53:56,483 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity  [debug] WebappLoader : initialization starting.
> 2008-10-06 15:53:56,484 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity   [info] WebappLoader : added template path - './'
> 2008-10-06 15:53:56,484 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity  [debug] WebappLoader : initialization complete.
> 2008-10-06 15:53:56,485 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity   [info] ResourceCache : initialized. (class
> org.apache.velocity.runtime.resource.ResourceCacheImpl)
> 2008-10-06 15:53:56,486 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity   [info] Default ResourceManager initialization complete.
> 2008-10-06 15:53:56,487 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity   [info] Loaded System Directive:
> org.apache.velocity.runtime.directive.Literal
> 2008-10-06 15:53:56,489 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity   [info] Loaded System Directive:
> org.apache.velocity.runtime.directive.Macro
> 2008-10-06 15:53:56,492 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity   [info] Loaded System Directive:
> org.apache.velocity.runtime.directive.Parse
> 2008-10-06 15:53:56,494 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity   [info] Loaded System Directive:
> org.apache.velocity.runtime.directive.Include
> 2008-10-06 15:53:56,495 [main] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity   [info] Loaded System Directive:
> org.apache.velocity.runtime.directive.Foreach
>
> *******************
>
>
> Here is the error itself:
>
> *******************
>
> 2008-10-06 15:54:14,078 [TP-Processor3] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity  [error] ResourceManager : unable to find resource '/login.vm'
> in any resource loader.
> 2008-10-06 15:54:14,078 [TP-Processor3] INFO
> org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/chadis]-
>  Velocity  [error] VelocityViewServlet: Exception processing the
> template: org.apache.velocity.exception.ResourceNotFoundException:
> Unable to find resource '/login.vm'
> 2008-10-06 15:54:14,080 [TP-Processor3] ERROR
> org.childhealthcare.diagnosis.servlet.VelocityLayoutServlet- Error
> servicing /chadis/login.vm
> org.apache.velocity.exception.ResourceNotFoundException: Unable to find
> resource '/login.vm'
>
> *******************
>
>> What version of commons-collections are you using?
>
> My webapp uses commons-collections-3.2.jar, and I'm using Tomcat 5.5.26
> which does not include commons-collections, so there shouldn't be any
> conflicts.
>
> -chris
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message