Results 1 to 5 of 5

Thread: Workaround for BeanUtils Issue in Spring??

  1. #1
    Join Date
    Jun 2005
    Posts
    2

    Default 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. #2
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    Create a small test and report the issue on JIRA.
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

  3. #3
    Join Date
    Jun 2005
    Posts
    15

    Default

    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

  4. #4
    Join Date
    Jun 2005
    Posts
    2

    Default

    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.

  5. #5
    Join Date
    Apr 2006
    Posts
    2

    Default 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...

Similar Threads

  1. Spring MVC Web Framework versus Struts
    By biguniverse in forum Web Flow
    Replies: 27
    Last Post: Aug 29th, 2012, 03:57 AM
  2. Replies: 6
    Last Post: Jan 11th, 2008, 07:36 AM
  3. Replies: 1
    Last Post: Oct 2nd, 2005, 07:10 PM
  4. A Spring Class Loader?
    By azzoti in forum Architecture
    Replies: 8
    Last Post: May 7th, 2005, 04:02 AM
  5. Replies: 14
    Last Post: Feb 21st, 2005, 05:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •