Repository navigation
Description
Dennis Kieselhorst opened SPR-8931 and commented
After updating from 3.0.6 to 3.1 the bean creation for java.math.BigDecimal fails with:
Caused by: org.springframework.beans.FatalBeanException: Failed to obtain BeanInfo for class [java.math.BigDecimal]; nested exception is java.beans.IntrospectionException: type mismatch between indexed and non-indexed methods: scale
at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:262)
at org.springframework.beans.CachedIntrospectionResults.forClass(CachedIntrospectionResults.java:149)
at org.springframework.beans.BeanWrapperImpl.getCachedIntrospectionResults(BeanWrapperImpl.java:324)
at org.springframework.beans.BeanWrapperImpl.getPropertyDescriptors(BeanWrapperImpl.java:331)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.filterPropertyDescriptorsForDependencyCheck(AbstractAutowireCapableBeanFactory.java:1242)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1101)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517)
... 149 more
Caused by: java.beans.IntrospectionException: type mismatch between indexed and non-indexed methods: scale
at java.beans.IndexedPropertyDescriptor.findIndexedPropertyType(IndexedPropertyDescriptor.java:341)
at java.beans.IndexedPropertyDescriptor.setIndexedWriteMethod(IndexedPropertyDescriptor.java:248)
at org.springframework.beans.ExtendedBeanInfo.addOrUpdatePropertyDescriptor(ExtendedBeanInfo.java:261)
at org.springframework.beans.ExtendedBeanInfo.<init>(ExtendedBeanInfo.java:142)
at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:224)
... 155 more
Affects: 3.1 GA
Issue Links:
- java.beans.IntrospectionException: type mismatch between indexed and non-indexed methods: <method_name> [SPR-8937] #13577 java.beans.IntrospectionException: type mismatch between indexed and non-indexed methods: <method_name>
- Overhaul non-void JavaBean write method support [SPR-10029] #14663 Overhaul non-void JavaBean write method support
- Regression - Introspection with BeanUtils started failing for java.awt.Component derived classes [SPR-8491] #13137 Regression - Introspection with BeanUtils started failing for java.awt.Component derived classes
Activity
spring-projects-issues commentedon Dec 15, 2011
Dennis Kieselhorst commented
Relates to #13137
spring-projects-issues commentedon Feb 13, 2012
Chris Beams commented
This should now be resolved for the same reasons as #13137
spring-projects-issues commentedon Mar 1, 2012
Aaron Digulla commented
"Should" sounds ominous. Can you please add this test case?
Not sure whether
default-autowireanddefault-lazy-inithave an impact.spring-projects-issues commentedon Mar 1, 2012
Chris Beams commented
Hey Aaron, I can appreciate your concern here. This actually does succeed just fine, take a look at this quick verification:
https://github.com/cbeams/spring-framework/tree/SPR-8931
spring-projects-issues commentedon Jun 4, 2012
Aaron Digulla commented
Thanks, 3.1.1 works for me, now!
spring-projects-issues commentedon Nov 25, 2012
Chris Beams commented
A general note to watchers of
ExtendedBeanInfo-related issues: #14663 is a major refactoring ofExtendedBeanInfoand overall support for non-void returning setter methods.If you have submitted a reproduction project with this issue, we have run it through its paces against these new changes, but we would like to ask you to do the same against your actual applications.
Please consider updating your dev or test builds to work against 3.1.4.BUILD-SNAPSHOT and/or 3.2.0.BUILD-SNAPSHOT to verify, and we would appreciate any feedback, even if it's to let us know that all is well. So that we can consolidate feedback, please add your comments to #14663, and mention the original issue(s) that you were watching.
Thanks!
Note also that testing against 3.1.4 is preferable to 3.2.0 because
ExtendedBeanInfois always in the code path in the latter, while in 3.2.0 we've optimized things such thatExtendedBeanInfois only in play for bean classes that have one or more non-void returning setter methods.