title: ORA-06502: PL/SQL: numeric or value error: NULL index table key value ORA-06512: at "OJC.JC_MASTER", line 129
body: <p>I'm trying to run an interface in ODI 11g. When I call the procedure I get this error :</p>
  
  <blockquote>
    <p>ODI-1228: Task START_JC (Procedure) fails on the target ORACLE connection OJC.<br>
    Caused By: java.sql.SQLException: ORA-06502: PL/SQL: numeric or value error: NULL index table key value<br>
    ORA-06512: at "OJC.JC_MASTER", line 129<br>
    ORA-06512: at "OJC.JC_MASTER", line 689<br>
    ORA-06512: at line 9</p>
  </blockquote>
  
  <p>the sql code </p>
  
  <pre><code> PROCEDURE string_to_aa_parameter_type (
     p_string                             VARCHAR2,
     p_out_aa_parameter_values   IN OUT   aa_parameter_type
  )
  AS
     v_start                  INTEGER         := 1;
     v_pos                    INTEGER         := 0;
     v_counter                INTEGER         := 0;
     v_temp_parameter_name    VARCHAR2 (4000);
     v_temp_parameter_value   VARCHAR2 (4000);
  BEGIN
     IF p_string IS NULL
     THEN
        RETURN;
     END IF;
  
     -- determine first chuck of string
     v_pos := INSTR (p_string, '=', v_start);
  
     -- while there are chunks left, loop
     WHILE (v_pos != 0)
     LOOP
        v_counter := v_counter + 1;
  
        -- create array
        IF MOD (v_counter, 2) = 1
        THEN
           v_temp_parameter_name :=
                                 SUBSTR (p_string, v_start, v_pos - v_start);
           v_start := v_pos + 1;
           v_pos := INSTR (p_string, ';', v_start);
        ELSE
           v_temp_parameter_value :=
                                 SUBSTR (p_string, v_start, v_pos - v_start);
  
           p_out_aa_parameter_values (trim(v_temp_parameter_name)) :=
                                                      trim(v_temp_parameter_value);
  
           v_start := v_pos + 1;
           v_pos := INSTR (p_string, '=', v_start);
  
        END IF;
     END LOOP;
  
     -- IN THE FOLLOWING LINE I GET THE ERROR 
     v_temp_parameter_value := SUBSTR (p_string, v_start);
  
     p_out_aa_parameter_values (trim(v_temp_parameter_name)) :=
                                               trim(v_temp_parameter_value);
  
  END;
  </code></pre>
  
  <p>Can someone help me in figuring out that the problem is ?</p>