title: Spring SimpleJdbcCall Oracle sql/pl - Unable to determine the correct call signature - multiple procedures/functions/signatures
body: <p>I have a stored procedure in a package which has it defined with three different method signatures in the same package. They vary by only a few parameters (each calls the next with a few default values).   I've over-simplified the list of columns for the sake of brevity here.  I have about 55 fields in the procedure I'm calling. </p>
  
  <p>I am using the Spring class called "MapSqlParameterSource" to define the fields values I am providing: </p>
  
  <pre><code>SqlParameterSource params = new MapSqlParameterSource()
              .addValue("pi_session_id", piSessionId)
              .addValue("pi_site_id", piSiteId)
              .addValue("pi_address_id", piAddressId)
              .addValue("po_status_cd", null)
              .addValue("po_status_mg", null);
  </code></pre>
  
  <p>I'm using a simple jdbc call to define the stored procedure that I want to call: </p>
  
  <pre><code>SimpleJdbcCall jdbcCall = new SimpleJdbcCall(jdbcTemplate)
            .withSchemaName("myschema")
            .withCatalogName("address_package")
            .withProcedureName("p_post_address");
  </code></pre>
  
  <p>And then I execute the procedure with this call: </p>
  
  <pre><code>Map&lt;String, Object&gt; resultsMap = jdbcCall.execute(params);
  </code></pre>
  
  <p>And I typically log out the results for fun while I'm dev'ing these up.  </p>
  
  <pre><code>for (String key : resultsMap.keySet()) {
        logger.info("p_post_address - Key: " + key + " object: " + resultsMap.get(key));
  }
  </code></pre>
  
  <p>And then I access the output fields like this: </p>
  
  <pre><code>String statusMessage = (String) resultsMap.get("po_status_mg");
  BigDecimal statsCd = (BigDecimal) resultsMap.get("po_status_cd");
  </code></pre>
  
  <p>This works perfectly for Procedures that aren't overloaded!  However, when I call this particular procedure, it gives me this error:  </p>
  
  <blockquote>
    <p>org.springframework.dao.InvalidDataAccessApiUsageException: Unable to determine the correct call signature - multiple procedures/functions/signatures for 'P_POST_ADDRESS'</p>
  </blockquote>
  
  <p>Then I attempted to get tricky, and specify exactly which parameters should be used to call the stored procedure, so that it could match the overloaded method I wanted. </p>
  
  <pre><code>SimpleJdbcCall jdbcCall = new SimpleJdbcCall(jdbcTemplate)
            .withSchemaName("myschema")
            .withCatalogName("address_package")
            .withProcedureName("p_post_address");
  
  jdbcCall.addDeclaredParameter(new SqlParameter("pi_session_id", OracleTypes.NUMBER));
  jdbcCall.addDeclaredParameter(new SqlParameter("pi_site_id", OracleTypes.VARCHAR));
  jdbcCall.addDeclaredParameter(new SqlParameter("pi_address_id", OracleTypes.NUMBER));
  jdbcCall.addDeclaredParameter(new SqlOutParameter("po_status_cd", OracleTypes.NUMBER));
  jdbcCall.addDeclaredParameter(new SqlOutParameter("po_status_mg", OracleTypes.VARCHAR));
  </code></pre>
  
  <p>This resulted in the same error.  </p>
  
  <blockquote>
    <p>org.springframework.dao.InvalidDataAccessApiUsageException: Unable to determine the correct call signature - multiple procedures/functions/signatures for 'P_POST_ADDRESS'</p>
  </blockquote>
  
  <p>I eventually found out I need to add this option: </p>
  
  <pre><code>jdbcCall.withoutProcedureColumnMetaDataAccess();
  </code></pre>
  
  <p><strong>And that works!</strong>  But I have no idea why.  </p>
  
  <p>Could someone explain why you need to add the declared parameters <code>addDeclaredParameter</code> and also to call <code>withoutProcedureColumnMetaDataAccess</code>?</p>