title: java.sql.SQLException: Invalid column type when executing procedure with package level types from jdbc
body: <p><strong>Problem Description:</strong>
  I'm trying to call procedure stored in my database through java code. The procedure I want to call has one parameter with type of 'MAP_VARCHAR' (I have defined it as type in below package). </p>
  
  <p>Now, I'm trying to execute this procedure from my java code however, passing the parameter is giving java.sql.SQLException.</p>
  
  <p><strong>SQL Package</strong> to show you how did I create my SQL procedure and type</p>
  
  <pre><code>--------------------------------------------------------
  --   Package Body TEST_PACKAGET
  --------------------------------------------------------
  
    CREATE OR REPLACE EDITIONABLE PACKAGE BODY "TEST_PACKAGE" AS
  
    PROCEDURE PerformersRole(P_Performer_Map MAP_VARCHAR) AS
    BEGIN
  
          DBMS_OUTPUT.PUT_LINE('Hello ' || P_Performer_Map('Engineer'));
  
    END PerformersRole;
  
  END TEST_PACKAGE;
  
  /
  --------------------------------------------------------
  --   Package TEST_PACKAGE
  --------------------------------------------------------
  
    CREATE OR REPLACE EDITIONABLE PACKAGE "TEST_PACKAGE" AS 
  
    /* TODO enter package declarations (types, exceptions, methods etc) here */ 
    TYPE MAP_VARCHAR IS TABLE OF VARCHAR(100) INDEX BY VARCHAR(100);
  
    PROCEDURE PerformersRole(P_Performer_Map MAP_VARCHAR);
  END TEST_PACKAGE;
  
  /
  </code></pre>
  
  <p><strong>My java code</strong></p>
  
  <pre><code>    public void executeProcedure(){
  
         CallableStatement statement = null;
          try {
  
  /// Oracle Connection code should be here 
               Connection connection = connectionManager.createConnection();
  
  
              Hashtable newMap = new Hashtable();
  
              newMap.put("Engineer", "Hanson");
              newMap.put("Assistant", "Alice Kim");
              newMap.put("Supervisor", "James MaCoy");
  
  
              StringBuffer procedure = new StringBuffer("{call TEST_PACKAGE.PerformersRole(?) }");
              statement = connection.prepareCall(procedure.toString());
              statement.setInt(1, newMap );
  
              statement.execute();
          } catch (Exception ex) {
  
  
          } 
  
  } 
  </code></pre>
  
  <p>The error I'm receiving when I'm executing my java code is </p>
  
  <pre><code>java.sql.SQLException: Invalid column type
      at oracle.jdbc.driver.OraclePreparedStatement.setObjectCritical(OraclePreparedStatement.java:8761)
      at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:8259)
      at oracle.jdbc.driver.OraclePreparedStatement.setObjectInternal(OraclePreparedStatement.java:9012)
      at oracle.jdbc.driver.OracleCallableStatement.setObject(OracleCallableStatement.java:4983)
      at oracle.jdbc.driver.OraclePreparedStatementWrapper.setObject(OraclePreparedStatementWrapper.java:230)
  </code></pre>
  
  <p>What I am missing ?! </p>
  
  <p>Appreciate your help in-advance</p>