Announcement Announcement Module
Collapse
No announcement yet.
org.apache.velocity...ResourceManagerImpl does not implement ResourceManager Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • org.apache.velocity...ResourceManagerImpl does not implement ResourceManager

    Hi all,

    I am new to velocity and I am using it for email template (as jsp's wn't). I am getting error while starting the server. Looks like problem with the configuration. Can some one help me ?

    This is my application-context xml
    Code:
    	<bean id="mailSender" class="org.springframework.mail.javamail.JavaMailSenderImpl">
    		<property name="host" value="localhost"/>
    	</bean>
    	
    	<bean id="emailService" class="org.ks.hotal.service.EmailServiceImpl">
    		<property name="mailSender" ref="mailSender"/>
    		<property name="velocityEngine" ref="velocityEngine"/>
    	</bean>
    	
    	<bean id="velocityEngine" class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
    		<property name="velocityProperties">
    			<value>
    				resource.loader=class
    				class.resource.loader.class=org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader
    			</value>
    		</property>
    	</bean>
    And this is the error :
    Code:
    28-Oct-2010 10:35:40 org.springframework.ui.velocity.CommonsLoggingLogSystem logVelocityMessage
    SEVERE: The specified class for ResourceManager (org.apache.velocity.runtime.resource.ResourceManagerImpl) does not implement org.apache.velocity.runtime.resource.ResourceManager; Velocity is not initialized correctly.
    28-Oct-2010 10:35:40 org.springframework.ui.velocity.VelocityEngineFactory createVelocityEngine
    SEVERE: Why does VelocityEngine throw a generic checked exception, after all?
    java.lang.Exception: The specified class for ResourceManager (org.apache.velocity.runtime.resource.ResourceManagerImpl) does not implement org.apache.velocity.runtime.resource.ResourceManager; Velocity is not initialized correctly.
    	at org.apache.velocity.runtime.RuntimeInstance.initializeResourceManager(RuntimeInstance.java:656)
    	at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:251)
    	at org.apache.velocity.app.VelocityEngine.init(VelocityEngine.java:107)
    	at org.springframework.ui.velocity.VelocityEngineFactory.createVelocityEngine(VelocityEngineFactory.java:251)
    	at org.springframework.ui.velocity.VelocityEngineFactoryBean.afterPropertiesSet(VelocityEngineFactoryBean.java:57)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
    ....
    Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'emailService' defined in ServletContext resource [/WEB-INF/application-context.xml]: Cannot resolve reference to bean 'velocityEngine' while setting bean property 'velocityEngine'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'velocityEngine' defined in ServletContext resource [/WEB-INF/application-context.xml]: Invocation of init method failed; nested exception is org.apache.velocity.exception.VelocityException: java.lang.Exception: The specified class for ResourceManager (org.apache.velocity.runtime.resource.ResourceManagerImpl) does not implement org.apache.velocity.runtime.resource.ResourceManager; Velocity is not initialized correctly.
    Can anyone help me to resolve this ?

    Thanks in advance
Working...
X