Announcement Announcement Module
Collapse
No announcement yet.
error loading spring.vm (Velocity) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    Re: error loading spring.vm (Velocity)

    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,

    Comment


    • #3
      Re: error loading spring.vm (Velocity)

      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.

      Comment

      Working...
      X