You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xbean-dev@geronimo.apache.org by "Piotr Bzdyl (JIRA)" <ji...@apache.org> on 2009/02/09 15:39:00 UTC

[jira] Created: (XBEAN-121) Constructor injection doesn't work with constructor argument of type array

Constructor injection doesn't work with constructor argument of type array
--------------------------------------------------------------------------

                 Key: XBEAN-121
                 URL: https://issues.apache.org/jira/browse/XBEAN-121
             Project: XBean
          Issue Type: Bug
    Affects Versions: 3.5
            Reporter: Piotr Bzdyl


A sample class:
package test;
public class SomeBean {
  private final String[] arguments;
  public SomeBean(String[] arguments) {
    this.arguments = arguments;
  }
}

And mapping configuration:
something = test.SomeBean
test.SomeBean(java.lang.String[]).parameterNames = arguments

Using:
<myNs:something arguments="#..."/>
causes:

Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [test.SomeBean]: No default constructor found; nested exception is java.lang.NoSuchMethodException: test.SomeBean.<init>()

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (XBEAN-121) Constructor injection doesn't work with constructor argument of type array

Posted by "Shawn Jiang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/XBEAN-121?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12734494#action_12734494 ] 

Shawn Jiang commented on XBEAN-121:
-----------------------------------

Are you experiencing the same problem with the latest 3.6 snapshot ?

> Constructor injection doesn't work with constructor argument of type array
> --------------------------------------------------------------------------
>
>                 Key: XBEAN-121
>                 URL: https://issues.apache.org/jira/browse/XBEAN-121
>             Project: XBean
>          Issue Type: Bug
>    Affects Versions: 3.5
>            Reporter: Piotr Bzdyl
>
> A sample class:
> package test;
> public class SomeBean {
>   private final String[] arguments;
>   public SomeBean(String[] arguments) {
>     this.arguments = arguments;
>   }
> }
> And mapping configuration:
> something = test.SomeBean
> test.SomeBean(java.lang.String[]).parameterNames = arguments
> Using:
> <myNs:something arguments="#..."/>
> causes:
> Caused by: org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [test.SomeBean]: No default constructor found; nested exception is java.lang.NoSuchMethodException: test.SomeBean.<init>()

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.