title: Convert String[] to ORA_MINING_VARCHAR2_NT from java stored procedure
body: <p>Can i convert String[] from stored procedure to "ORA_MINING_VARCHAR2_NT" as return value? VARRAY is not an option (i have variable number of elements)</p>
  
  <p>I always get an error :</p>
  
  <pre><code>ORA-00932: inconsistent datatypes: expected a return value that is an instance of a user defined Java class convertible to an Oracle type got an object that could not be converted
  </code></pre>
  
  <p>in this code:</p>
  
  <pre><code>CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED Parser AS
  import java.sql.Connection;
  import java.sql.DriverManager;
  import java.sql.SQLException;
  import oracle.sql.ARRAY;
  import oracle.sql.ArrayDescriptor;
  
  public class Parser {
  
      public static oracle.sql.ARRAY parseToArray(String str, String delim) throws SQLException {
          Connection conn = DriverManager.getConnection("jdbc:default:connection");
          ArrayDescriptor descriptor = ArrayDescriptor.createDescriptor("ORA_MINING_VARCHAR2_NT", conn);
          ARRAY result = new ARRAY(descriptor, conn, str.split(delim));
          return result;
      }
  }
  /
  CREATE OR REPLACE FUNCTION
  PARSETOARRAY (str IN VARCHAR2, delim IN VARCHAR2) 
  RETURN ORA_MINING_VARCHAR2_NT AS
  LANGUAGE JAVA NAME 'Parser.parseToArray (java.lang.String, java.lang.String) return oracle.sql.ARRAY';
  /
  DECLARE
  v_array ORA_MINING_VARCHAR2_NT;
  BEGIN
    FOR testing IN (SELECT record FROM interfacelog) LOOP
      v_array := PARSETOARRAY(testing.record, '|'); 
      -- do smth
    END LOOP;
  END;
  </code></pre>
  
  <p>Thank you!</p>
  
  <p>ps sorry for my poor english</p>