File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Other Java Products and Servers and the fly likes Anyone ever used Liferay Portal 5.2 Systems Development Book?  - I have a problem and cant fix it! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "Anyone ever used Liferay Portal 5.2 Systems Development Book?  - I have a problem and cant fix it!" Watch "Anyone ever used Liferay Portal 5.2 Systems Development Book?  - I have a problem and cant fix it!" New topic
Author

Anyone ever used Liferay Portal 5.2 Systems Development Book? - I have a problem and cant fix it!

Dan Sco
Greenhorn

Joined: Aug 03, 2009
Posts: 1
Hi Guys

Im new to JAVA and liferay, and i am trying to customise the CMS as per chapter 7 and 8 of the book Liferay Portal 5.2 Systems Development

However my problem is that although i have followed the instructions (Twice) i keep getting this error message. The issues occur when following pages 258,259,260.

The issue seems to lie when you follow the code to create the beans in ext-spring.xml.
The code given is
<bean id="com.ext.portal.service.ExtVelocityToolService" class="com.ext.portal.service.impl.ExtVelocityToolServiceImpl" /> <bean id="com.ext.portal.util.ExtVelocityToolUtil" class="com.ext.portal.util.ExtVelocityToolUtil">
<property name="extVelocityToolService" ref="com.ext.portal.service.ExtVelocityToolService" />
</bean><bean id="com.ext.portal.util.ExtVelocityToolUtil.velocity" class="org.springframework.aop.framework.ProxyFactoryBean" parent="baseVelocityUtil"> <property name="target" ref="com.ext.portal.service.ExtVelocityToolService" />
</bean>

But it produces this error
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.ext.portal.util.ExtVelocityToolUtil' defined in class path resource [META-INF/ext-spring.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [com.ext.portal.service.impl.ExtVelocityToolServiceImpl] to required type [com.ext.portal.service.ExtVelocityToolService] for property 'extVelocityToolService'; nested exception is java.lang.IllegalArgumentException: Cannot convert value of type [com.ext.portal.service.impl.ExtVelocityToolServiceImpl] to required type [com.ext.portal.service.ExtVelocityToolService] for property 'extVelocityToolService': no matching editors or conversion strategy found

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:480)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)


Does anyone know how to fix this

thanks in advance for any help
Dan


No one said it was going to be easy, but then again, nothing worth doing ever is!
Jonas X. Yuan
author
Ranch Hand

Joined: May 18, 2008
Posts: 108
Hi Dan,

You can find details (errata, including the issue you mentioned, see Page 256) at

http://www.liferay.com/web/guest/community/wiki/-/wiki/Main/Errata+for+the+Liferay+Portal+5.2+Systems+Development

Thanks

Jonas Yuan


Books: Liferay Portal 6.1 Systems Development
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Anyone ever used Liferay Portal 5.2 Systems Development Book? - I have a problem and cant fix it!