Results 1 to 3 of 3

Thread: error loading spring.vm (Velocity)

  1. #1
    Join Date
    Aug 2004
    Location
    Seattle
    Posts
    30

    Default error loading spring.vm (Velocity)

    I've been following the reference guide for integrating Velocity.
    http://www.springframework.org/docs/...#view-velocity

    When I start up the WAR, I get this warning:

    [java] INFO VelocityEngine:48 - Velocimacro : initialization starting.
    [java] INFO VelocityEngine:48 - Velocimacro : adding VMs from VM library template : org/springframework/web/servlet/view/velocity/spring.vm
    [java] WARN SpringResourceLoader:93 - Could not find Velocity resource [/WEB-INF/velocity/org/springframework/web/servlet/view/velocity/spring.vm]
    [java] java.io.FileNotFoundException: Could not open resource [/WEB-INF/velocity/org/springframework/web/servlet/view/velocity/spring.vm] of ServletContext
    [java] at org.springframework.web.context.support.ServletCon textResource.getInputStream(ServletContextResource .java:75)

    Why is it looking for spring.vm at this location?
    /WEB-INF/velocity/org/springframework/web/servlet/view/velocity/spring.vm

    It would be nice if it would grab it out of spring.jar or if I could just configure it to be /WEB-INF/velocity/spring.vm.

    Here is my velocityConfig bean:
    <bean
    id="velocityConfig"
    class="org.springframework.web.servlet.view.veloci ty.VelocityConfigurer">
    <property name="resourceLoaderPath"><value>/WEB-INF/velocity/</value></property>
    <property name="configLocation">
    <value>/WEB-INF/velocity/velocity.properties</value>
    </property>
    </bean>

  2. #2
    Join Date
    Aug 2004
    Location
    London, UK
    Posts
    339

    Default Re: error loading spring.vm (Velocity)

    Quote Originally Posted by ctaggart
    It would be nice if it would grab it out of spring.jar
    Normally it does. Can you post the contents of your velocity.properties file? It may be related to this.

    Regards,
    Darren Davison.
    Public Key: 0xE855B3EA

  3. #3
    Join Date
    Aug 2004
    Location
    Seattle
    Posts
    30

    Default Re: error loading spring.vm (Velocity)

    Quote Originally Posted by davison
    Normally it does. Can you post the contents of your velocity.properties file? It may be related to this.
    I think it might be trying to load it from multiple places and justs throws a warning that can be ignored when it can't find it at one place.

Similar Threads

  1. Velocity and Classpath Mega-woes
    By jopaki in forum Web
    Replies: 2
    Last Post: May 9th, 2007, 03:21 AM
  2. How to configure Velocity tools?
    By alr in forum Web
    Replies: 7
    Last Post: Jan 31st, 2007, 09:38 AM
  3. FreeMarker vs Velocity
    By Martin Kersten in forum Architecture
    Replies: 8
    Last Post: May 30th, 2005, 09:21 AM
  4. Velocity OutOfMemoryError during UnitTests
    By camach in forum Container
    Replies: 2
    Last Post: May 26th, 2005, 05:28 PM
  5. Exposing velocity context
    By masum in forum Web
    Replies: 1
    Last Post: Oct 28th, 2004, 02:27 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •