title: How to fix deprecated oracle.sql.ArrayDescriptor, oracle.sql.STRUCT and oracle.sql.StructDescriptor
body: <p>I use the below JDBC code to call an Oracle stored procedure which takes an Array input.</p>
  
  <p>But the the below three classes are deprecated. How to replace this ? </p>
  
  <pre><code>import oracle.sql.ArrayDescriptor;
  import oracle.sql.STRUCT;
  import oracle.sql.StructDescriptor;
  </code></pre>
  
  <p><strong>Java code</strong></p>
  
  <pre><code>        Object[] reportArray = new Object[3]; 
          STRUCT[] struct = new STRUCT[reports.size()];
  
          ArrayDescriptor arrayDescriptor = new ArrayDescriptor(new SQLName("T_REPORT_TABLE", (OracleConnection) connection), connection);
          StructDescriptor structDescriptor = StructDescriptor.createDescriptor("R_REPORT_OBJECT", connection);
  
          int arrayIndex = 0;
          for (Report data : reports) {
              reportArray[0] = data.getXXX();
              reportArray[1] = data.getYYY();
              reportArray[2] = data.getZZZ();
  
              struct[arrayIndex++] = new STRUCT(structDescriptor, connection, reportArray);
          }
  
          oracle.sql.ARRAY reportsArray = new oracle.sql.ARRAY(arrayDescriptor, connection, struct);
          callableStatement.setArray("T_REPORT_IN", reportsArray);
  
          callableStatement.executeUpdate();
  </code></pre>