-
Mar 9th, 2009, 12:47 PM
#1
Velocity cannot find resource after upgrade
Hi,
I have a osgi bundle that is running perfect in Spring DM Server 1.0.0 RELEASE. However, after I upgrade to SpringDM Server 1.0.2 REPLEASE.
I got exception saying that it cannot find the property file and velocity template.
BEFORE upgrade
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.Pr opertyPlaceholderConfigurer">
<property name="location" value="WEB-INF/myproject.properties" />
</bean>
It will work if I change it to
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.Pr opertyPlaceholderConfigurer">
<property name="location" value="MODULE-INF/WEB-INF/myproject.properties" />
</bean>
or
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.Pr opertyPlaceholderConfigurer">
<property name="location" value="classpath:WEB-INF/myproject.properties" />
</bean>
After I fixed the location to the property file, Velocity complains that it cannot find the template.
Here is the setup:
<bean id="velocityConfig" class="org.springframework.web.servlet.view.veloci ty.VelocityConfigurer">
<!-- <property name="resourceLoaderPath"-->
<!-- value="${velocity.template.dir},classpath:WEB-INF/velocity," />-->
<property name="configLocation">
<value>WEB-INF/velocity.properties</value>
</property>
</bean>
velocity.properties
resource.loader=class,file
class.resource.loader.class=org.apache.velocity.ru ntime.resource.loader.ClasspathResourceLoader
class.resource.loader.path=MODULE-INF/
class.resource.loader.cache=true
class.resource.loader.modificationCheckInterval=10
file.resource.loader.class=org.apache.velocity.run time.resource.loader.FileResourceLoader
file.resource.loader.path=/var/opt/Myproject/dynamic
file.resource.loader.cache=true
file.resource.loader.modificationCheckInterval=10
Velocity has no problem finding template in /var/opt/Myproject/dynamic, however, if I have a "parse("WEB-INF/velocity/vm/footer.vm") " statement in the template under the file loader path. Velocity cannot find it. It was working before upgrade.
So, is there any change in org.springframework.osgi.io-1.1.3.RELEASE.jar that will affect Velocity finding template.
Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules