Uploaded image for project: 'XBean'
  1. XBean
  2. XBEAN-121

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

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.5
    • 3.12
    • None
    • None

    Description

      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>()

      Attachments

        Activity

          People

            gnodet Guillaume Nodet
            pbzdyl Piotr Bzdyl
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: