title: getConstructor().getInstance(parameter) : java.lang.IllegalArgumentException: wrong number of arguments
body: <p>I can' add parameter with my constructor</p>
  
  <p>my code :  </p>
  
  <pre><code>import inteToM.CreateFileAction;   // said not use import
  import dto.m.CreateFile;
  //...
  // code
  Class&lt;?&gt; dtoClass = Class.forName("dto.mToInte.CreateFile");
  DtoM dto = (DtoM) JAXB.unmarshal(sr, dtoClass );
  Class&lt;?&gt; actionClass = Class.forName("inteToM.CreateFileAction");
  
  Constructor&lt;?&gt; actionConstruct = actionClass.getConstructor(); //dto.getClass()
  
  ActionM aAction = (ActionIM) actionConstruct.newInstance(dto); // not working
  ActionM bAction = (ActionIM) actionConstruct.newInstance();  // work 
  </code></pre>
  
  <p>my class :  </p>
  
  <pre><code>public class CreateFileAction {
  
  import dto.mToInte.CreateFile;
  public CreateFileAction () {
          System.out.println(" constructor null");
      }
  
      public CreateFileAction (CreateFile file) {
          System.out.println(" constructor not null");
          this.file_c= file;
      }
  }
  </code></pre>
  
  <p>My error : java.lang.IllegalArgumentException: wrong number of arguments
  So I don't understand why I can't add parameter with my constructor.</p>
  
  <p>edit : 
  If i make this :</p>
  
  <pre><code>Constructor&lt;?&gt; actionConstruct = actionClass.getConstructor(CreateFileAction.class);
  </code></pre>
  
  <p>I have this error :</p>
  
  <pre><code>java.lang.NoSuchMethodException: inteToM.CreateFileAction.&lt;init&gt;(inteToM.CreateFileAction)
  </code></pre>
  
  <p>If I make this : </p>
  
  <pre><code>Constructor&lt;?&gt; actionConstruct = actionClass.getConstructor(CreateFile.class);
  </code></pre>
  
  <p>I have this :</p>
  
  <pre><code>java.lang.NoSuchMethodException: inteToM.CreateFileAction.&lt;init&gt;(dto.m.CreateFile)
  </code></pre>
  
  <p>I Modify the dtoClass but I have the same prob.
  Thanks for help.</p>