XBean
  1. XBean
  2. XBEAN-121

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

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 3.5
    • Fix Version/s: 3.12
    • Component/s: None
    • Labels:
      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>()

        Activity

          People

          • Assignee:
            Guillaume Nodet
            Reporter:
            Piotr Bzdyl
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development