title: java.lang.IllegalArgumentException: argument type mismatch on string array
body: <p>This is my code to invoke a method dynamically:</p>
  
  <pre><code>String[] parameters = new String[requiredParameters.length];
  //here i put some values in the parameters array
  method = TestRecommendations.class.getMethod("level1ClassSimilarityForUser",
                                      String[].class);
  System.out.println(":" + parameters[0] + ":");
  results = (ResultSet) method.invoke(new TestRecommendations(), parameters)
  </code></pre>
  
  <p><code>parameters</code> is a string array, and this is the declaration of my <code>level1ClassSimilarityForUser</code> method</p>
  
  <pre><code>public ResultSet level1ClassSimilarityForUser(String[] userURI) {
  </code></pre>
  
  <p>I am getting this error:</p>
  
  <pre><code>java.lang.IllegalArgumentException: argument type mismatch
  
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:497)
  </code></pre>