Using Spring-3.1.0 and Velocity-1.6.3
Keep getting proxy error when trying to autowire velocityEngine... have tried to use proxy-target-class="true" but that causes HibernateSessionImpl to fail with CGLIB... any help would be great....
config.xml
Code:<aop:aspectj-autoproxy/> <tx:annotation-driven> <bean id="velocityEngne" class="org.springframework.ui.velocity.VelocityEngineFactoryBean" p:resourceLoaderPath="classpath:com/acme/template" p:preferFileSystemAccess="false"/>
Service class
Code:@Component @Transactional public class ServiceImpl implements Service { @Autowired private VelocityEngine velocityEngine }
causes this error...
Code:Caused by: java.lang.IllegalArgumentException: Can not set org.apache.velocity.app.VelocityEngine field com.acme.service.Service.velocityEngine to $Proxy74


Reply With Quote