if (pstmt instanceof CallableStatement) { try { Value outValue = (Value) stmt.getOutParameter(); Object object = outValue.toJavaObject(); if (object instanceof OracleOciLob) { java.sql.Clob outParameter = ((CallableStatement) pstmt).getClob(1); OracleOciLob ociLob = (OracleOciLob) object; ociLob.setLob(outParameter); } else { String outParameter = ((CallableStatement) pstmt).getString(1); outValue.set(new StringValueImpl(outParameter)); } } catch (Exception e) { }
OracleOciLob ociLob = stmt.getOutParameter(); if (ociLob != null) {  ociLob.setLob(callableStatement.getObject(1));
  public static boolean oci_execute(Env env,                                    @NotNull OracleStatement stmt,                                    @Optional("0") int mode)  {    try {      if (mode == OCI_COMMIT_ON_SUCCESS) {        throw new UnimplementedException("oci_execute with mode OCI_COMMIT_ON_SUCCESS");      }      // Large Objects may not be used in auto-commit mode.      Connection conn = stmt.getJavaConnection();      conn.setAutoCommit(false);      // This is the case for oci_execute($cursor);      // A previous statement has been executed and holds the result set.      PreparedStatement pstmt = stmt.getPreparedStatement();      if (pstmt instanceof CallableStatement) {        Object cursorResult = null;        try {          cursorResult = ((CallableStatement) pstmt).getObject(1);        } catch (Exception e) {        }        if (cursorResult != null) {          ResultSet rs = (ResultSet) cursorResult;          stmt.setResultSet(rs);          return true;        }      }      stmt.execute(env);      if (pstmt instanceof CallableStatement) {        try {          Value outValue = (Value) stmt.getOutParameter();          Object object = outValue.toJavaObject();          if (object instanceof OracleOciLob) {            java.sql.Clob outParameter = ((CallableStatement) pstmt).getClob(1);            OracleOciLob ociLob = (OracleOciLob) object;            ociLob.setLob(outParameter);          } else {            String outParameter = ((CallableStatement) pstmt).getString(1);            outValue.set(new StringValueImpl(outParameter));          }        } catch (Exception e) {        }      }      // Fetch and assign values to corresponding binded variables      // This is necessary for LOB support and      // should be reworked calling a private fetch method instead.      // oci_fetch(env, stmt);      return true;    } catch (Exception ex) {      log.log(Level.FINE, ex.toString(), ex);      try {        stmt.resetBindingVariables();        stmt.resetByNameVariables();      } catch (Exception ex2) {        log.log(Level.FINE, ex2.toString(), ex2);      }      return false;    }  }