Announcement Announcement Module
Collapse
No announcement yet.
Workaround for BeanUtils Issue in Spring?? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Workaround for BeanUtils Issue in Spring??

    Hi All,

    I ran into an interesting issue with BeanUtils and was wondering if anyone has run into it and has a fix or if it is one of those issues that can not be fixed.

    The issue is that BeanUtils is incorrectly getting BeanInfo from the beans. This occurs when a bean has an attrubute that is an array of Beans. The array name and class is incorrect. The Bean name for the array ends up with a [F prefixed to the name. So if your array class name is fooArray it end up being [FfooArray using BeanUtils.

    I suspect this is an issue that may have some importance especially if Spring is using BeanUtils somewhere else internally for introspection.

    Cheers.

  • #2
    Create a small test and report the issue on JIRA.

    Comment


    • #3
      Already listed the issue on Jira and Spring group is working on it. Just interested if someone has run into this problem. I strongly suspect there is serious problem with introspection and/or reflection but hopefully I am wrong.

      Thanks for the comment

      Comment


      • #4
        Further test indicates this issue seems to be environment related and specific to java code using reflection. This is not a Spring BeanUtils issue but the underlying java jre and the environment it runs in.

        Thanks for the help.

        Comment


        • #5
          BeanUtils, DynaBean, Weeping.

          Yeah, why use a nice existing framework like commons-beanutils when Spring can rewrite it all and offer less functionality?

          It's all in BeanWrapper interface and BeanWrapperImpl, which is instantiated within the guts of Spring for all bean reflection and manipulation. I've managed to extend enough classes to get a LazyDynaBean to work in a Controller, but it doesn't make it through the <spring:bind> tag's internal use of BeanWrapperImpl.

          It's also present when parsing the bean definitions.

          Let's see what 2.0M3 has...

          Comment

          Working...
          X