|
From: Brett B. <br...@po...> - 2003-10-25 11:57:03
|
Hi I see some one else is having the same problem as me re: http://sourceforge.net/forum/forum.php?thread_id=948032&forum_id=250340 I will try and look up what to do. cheers Brett > Message: 1 > Date: Fri, 24 Oct 2003 19:48:24 +0100 (BST) > From: "Brett Bell" <br...@po...> > To: spr...@li... > Subject: [Springframework-developer] Beans > Reply-To: spr...@li... > > Hi all, > > soz i haven't been around for ages. > > I have been trying out the XMLBeanFactory and I have defined a JavaBean > which has an Integer property which Spring doesn't like. I can define > value for Longs and Strings but it throws an exception when it tries to > convert a String(in the xml file) to an Integer. Can you throw any light > on this... > > cheers in advance (the stacktrace is below). > > > Brett > > > PropertyVetoExceptionsException: 1 errors:-- > ErrorCodedPropertyVetoException: message=[Failed to convert property value > of type [java.lang.String] to required type [java.lang.Integer] for > property named 'age'; nested exception is: > java.lang.IllegalArgumentException: argument type mismatch]; > errorCode=[typeMismatch] > java.lang.IllegalArgumentException: argument type mismatch > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) > at java.lang.reflect.Method.invoke(Method.java:324) > at > org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:531) > at > org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:590) > at > org.springframework.beans.BeanWrapperImpl.setPropertyValues(BeanWrapperImpl.java:567) > at > org.springframework.beans.factory.support.AbstractBeanFactory.applyPropertyValues(AbstractBeanFactory.java:375) > at > org.springframework.beans.factory.support.AbstractBeanFactory.createBean(AbstractBeanFactory.java:309) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getSharedInstance(AbstractBeanFactory.java:224) > at > org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:156) > at brett.ioc.ApplicationContext.create(ApplicationContext.java:24) > at brett.ioc.SpringStuff.execute(SpringStuff.java:10) > at brett.Demo.main(Demo.java:40) > > |