Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IntrospectionException: type mismatch between indexed and non-indexed methods [SPR-9943] #14576

Closed
spring-projects-issues opened this issue Nov 1, 2012 · 7 comments
Labels
in: core type: bug
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

@spring-projects-issues spring-projects-issues commented Nov 1, 2012

Mattias Severson opened SPR-9943 and commented

The application fails to create beans of type com.amazonaws.ClientConfiguration due to

[...]
Caused by: org.springframework.beans.FatalBeanException: Failed to obtain BeanInfo for class [com.amazonaws.ClientConfiguration]; nested exception is java.beans.IntrospectionException: type mismatch between indexed and non-indexed methods: socketBufferSizeHints
	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)
	... 43 more
Caused by: java.beans.IntrospectionException: type mismatch between indexed and non-indexed methods: socketBufferSizeHints
	at java.beans.IndexedPropertyDescriptor.findIndexedPropertyType(IndexedPropertyDescriptor.java:395)
	at java.beans.IndexedPropertyDescriptor.setIndexedWriteMethod(IndexedPropertyDescriptor.java:292)
	at org.springframework.beans.ExtendedBeanInfo.addOrUpdatePropertyDescriptor(ExtendedBeanInfo.java:314)
	at org.springframework.beans.ExtendedBeanInfo.<init>(ExtendedBeanInfo.java:170)
	at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:224)

The error does not occur in release 3.1.2 or earlier versions.


Affects: 3.1.3

Attachments:

Issue Links:

  • #14663 Overhaul non-void JavaBean write method support ("depends on")

Referenced from: commits spring-attic/spring-framework-issues@8c7a4ad, spring-attic/spring-framework-issues@792ed0e

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Nov 2, 2012

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Nov 2, 2012

Chris Beams commented

Matthias, this issue is already resolved in 3.2.0.BUILD-SNAPSHOT, i.e. in the upcoming 3.2 RC1. Is it an option for you to upgrade to that? That particular fix cannot be backported to 3.1.x in a straightforward fashion; this bug can be fixed in any case, but thought I'd mention that 3.2 will "just work" already.

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Nov 2, 2012

Mattias Severson commented

The problem is that we are not allowed to go to production without a final release. However, looking at the road map, the 3.2 GA is not far away so we may just as well use the RC builds in our dev environment for now.

You mention that the bug can be fixed, is that something that you will do, or is it a workaround to our code? If it is fix on our side, can you point us in the right direction?

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Nov 2, 2012

Chris Beams commented

It's something on our side; there have been a number of similar bugs with an internal component called ExtendedBeanInfo. This class has been removed from the code path for the vast majority of use cases in 3.2, but the change is too significant to backport to 3.1.x for various reasons.

This just needs to be tracked down in ExtendedBeanInfo and fixed. Phil Webb, perhaps you'd like to take a look as you're now familiar with this code. In any case, we'll fix it up for 3.1.4, but it's likely that we'll ship 3.2 GA even before 3.1.4 at this point, so to your comment above, if you're good with using 3.1 RC1 in your dev builds, you're probably even better off (plus you'll have access to everything in 3.2 going forward!)

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Nov 25, 2012

Chris Beams commented

Matthias, this issue is resolved based on the changes in #14663. These changes have been backported to 3.1.4 as well. Please give 3.1.4.BUILD-SNAPSHOT a try and let us know how it goes. Thanks!

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Nov 25, 2012

Mattias Severson commented

My test passes after I updated the dependency in my sample project as suggested. Well done!

@spring-projects-issues
Copy link
Collaborator Author

@spring-projects-issues spring-projects-issues commented Nov 25, 2012

Chris Beams commented

Great, Mattias—thanks for the quick feedback!

@spring-projects-issues spring-projects-issues added type: bug in: core labels Jan 11, 2019
@spring-projects-issues spring-projects-issues added this to the 3.1.4 milestone Jan 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: core type: bug
Projects
None yet
Development

No branches or pull requests

1 participant