Details

    • Type: Task Task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 3.1 M1
    • Fix Version/s: 3.1.1
    • Component/s: None
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      See SPR-8079 and SPR-8175.

      Original commit (and comment) for ExtendedBeanInfo: https://github.com/cbeams/spring-framework/commit/1271acb8eb264f05729ccfa2dc30737c26eeb818

      Related commit and comment fixing a small bug with the implementation: https://github.com/cbeams/spring-framework/commit/8dedf111bcf08af967c2de00b3e1ee4e99979533

        Issue Links

          Activity

          Hide
          Paul Nardone added a comment -

          I am experienceing an issue with ExtendedBeanInfo and covarianet propertytypes i've yet to isolate a simple test but it appears to be due using JDK PropertyDescriptor and the long standing JDK bug that are the cause resulting in

          java.beans.IntrospectionException: type mismatch between read and write methods
          at java.beans.PropertyDescriptor.findPropertyType(PropertyDescriptor.java:603)
          at java.beans.PropertyDescriptor.setWriteMethod(PropertyDescriptor.java:270)
          at java.beans.PropertyDescriptor.<init>(PropertyDescriptor.java:117)
          at org.springframework.beans.ExtendedBeanInfo.addOrUpdatePropertyDescriptor(ExtendedBeanInfo.java:260)
          at org.springframework.beans.ExtendedBeanInfo.addOrUpdatePropertyDescriptor(ExtendedBeanInfo.java:178)
          at org.springframework.beans.ExtendedBeanInfo.<init>(ExtendedBeanInfo.java:95)
          at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:224)
          ... 124 more

          Show
          Paul Nardone added a comment - I am experienceing an issue with ExtendedBeanInfo and covarianet propertytypes i've yet to isolate a simple test but it appears to be due using JDK PropertyDescriptor and the long standing JDK bug that are the cause resulting in java.beans.IntrospectionException: type mismatch between read and write methods at java.beans.PropertyDescriptor.findPropertyType(PropertyDescriptor.java:603) at java.beans.PropertyDescriptor.setWriteMethod(PropertyDescriptor.java:270) at java.beans.PropertyDescriptor.<init>(PropertyDescriptor.java:117) at org.springframework.beans.ExtendedBeanInfo.addOrUpdatePropertyDescriptor(ExtendedBeanInfo.java:260) at org.springframework.beans.ExtendedBeanInfo.addOrUpdatePropertyDescriptor(ExtendedBeanInfo.java:178) at org.springframework.beans.ExtendedBeanInfo.<init>(ExtendedBeanInfo.java:95) at org.springframework.beans.CachedIntrospectionResults.<init>(CachedIntrospectionResults.java:224) ... 124 more
          Hide
          Chris Beams added a comment -

          Thanks, Paul. I've created SPR-8806 in order to address this specific issue. See my comments and questions there.

          Show
          Chris Beams added a comment - Thanks, Paul. I've created SPR-8806 in order to address this specific issue. See my comments and questions there.
          Hide
          Benoit de Biolley added a comment -

          Just find an issue with websphere application server 7,

          For some reasons on our was 7.0 in dev (full version)
          ExtendedBeanInfo is removing all property descriptors.
          that don't have a setter.

          Issue not realy identified because on the was on our local machine (express version)
          we dont have this issue.

          link to my stack overflow post for a tempory solution (reverting to previous version of CachedIntrospectionResults) : http://stackoverflow.com/questions/8849042/beanwrapperimpl-issues-only-with-websphere

          Show
          Benoit de Biolley added a comment - Just find an issue with websphere application server 7, For some reasons on our was 7.0 in dev (full version) ExtendedBeanInfo is removing all property descriptors. that don't have a setter. Issue not realy identified because on the was on our local machine (express version) we dont have this issue. link to my stack overflow post for a tempory solution (reverting to previous version of CachedIntrospectionResults) : http://stackoverflow.com/questions/8849042/beanwrapperimpl-issues-only-with-websphere
          Hide
          Benoit de Biolley added a comment -

          problem identified :

          line 157 and 158 in ExtendedBeanInfo:
          hello
          if (method == pd.getReadMethod()

          (pd instanceof IndexedPropertyDescriptor && method == ((IndexedPropertyDescriptor) pd).getIndexedReadMethod()))
          Unknown macro: {}}

          [...]

          Show
          Benoit de Biolley added a comment - problem identified : line 157 and 158 in ExtendedBeanInfo: hello if (method == pd.getReadMethod() (pd instanceof IndexedPropertyDescriptor && method == ((IndexedPropertyDescriptor) pd).getIndexedReadMethod())) Unknown macro: {}} [...]
          Hide
          Benoit de Biolley added a comment -

          you have to use .equals() in place of ==

          Kr

          Show
          Benoit de Biolley added a comment - you have to use .equals() in place of == Kr
          Hide
          Stéphane Landelle added a comment -

          Hi,

          I had the same problem on Mac OS X (jdk 6) :
          org.springframework.beans.NotReadablePropertyException: Invalid property 'principal' of bean class [org.springframework.security.authentication.UsernamePasswordAuthenticationToken]: Bean property 'principal' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter?
          at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:729)
          at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:576)
          at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:553)
          at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:719)
          at org.springframework.security.taglibs.authz.AuthenticationTag.doEndTag(AuthenticationTag.java:101)

          Patching ExtendedBeanInfo the way Benoit explained did fix the problem.

          Steph

          Show
          Stéphane Landelle added a comment - Hi, I had the same problem on Mac OS X (jdk 6) : org.springframework.beans.NotReadablePropertyException: Invalid property 'principal' of bean class [org.springframework.security.authentication.UsernamePasswordAuthenticationToken] : Bean property 'principal' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter? at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:729) at org.springframework.beans.BeanWrapperImpl.getNestedBeanWrapper(BeanWrapperImpl.java:576) at org.springframework.beans.BeanWrapperImpl.getBeanWrapperForPropertyPath(BeanWrapperImpl.java:553) at org.springframework.beans.BeanWrapperImpl.getPropertyValue(BeanWrapperImpl.java:719) at org.springframework.security.taglibs.authz.AuthenticationTag.doEndTag(AuthenticationTag.java:101) Patching ExtendedBeanInfo the way Benoit explained did fix the problem. Steph
          Show
          Benoit de Biolley added a comment - pull request: https://github.com/SpringSource/spring-framework/pull/20/commits
          Show
          Chris Beams added a comment - Resolved in https://github.com/SpringSource/spring-framework/commit/17cf465d239605632fee99d8c869ea5fd0bee14c
          Hide
          Chris Beams added a comment -

          A general note to watchers of ExtendedBeanInfo-related issues: SPR-10029 is a major refactoring of ExtendedBeanInfo and 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 SPR-10029, 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 ExtendedBeanInfo is always in the code path in the latter, while in 3.2.0 we've optimized things such that ExtendedBeanInfo is only in play for bean classes that have one or more non-void returning setter methods.

          Show
          Chris Beams added a comment - A general note to watchers of ExtendedBeanInfo -related issues: SPR-10029 is a major refactoring of ExtendedBeanInfo and 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 SPR-10029 , 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 ExtendedBeanInfo is always in the code path in the latter, while in 3.2.0 we've optimized things such that ExtendedBeanInfo is only in play for bean classes that have one or more non-void returning setter methods.

            People

            • Assignee:
              Chris Beams
              Reporter:
              Chris Beams
              Last updater:
              Chris Beams
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                1 year, 21 weeks, 3 days ago