title: java.sql.SQLException: Internal Error: Invalid type oid?
body: <p>I'm getting this error at this line:</p>
  
  <pre><code>Object[] results = (Object[])stmt.getArray(1).getArray();
  </code></pre>
  
  <p>Not sure what it means...</p>
  
  <p>I can show the sql also...can someone explain what this error means...I also have that stac trace if needed</p>
  
  <pre><code>public List&lt;SimilarItemSearchCollectBean&gt; getSimilarItemSearchCollect(
          PagerTagHelper pagerHelper,
          String codes,
          String params[] )
              throws Exception
                  {
  
      if( params.length != codes.length() ) throw new IllegalArgumentException(
                  "Number of codes does not match number of parameters: (" +
                  codes.length() + " != " + params.length + ")."
                  );
  
              int i = 0;
              String temp = null;
              List&lt;SimilarItemSearchCollectBean&gt; collected = null;
              String funCall = "{ call ? := " + PKG_PREFIX
              + "summarize_item_search_data( ?, ?, ?, ?, ?, ?, ?, ?, ? ) }";
  
              OracleCallableStatement stmt = null;
  
              try
              {
                  java.util.Map&lt;String,Class&lt;?&gt;&gt; map = connection.getTypeMap();
                  map.put( schemaProvider.getSystemSchemaName()+".SIMILAR_ITEM_SEARCH_ROLLUP", SimilarItemSearchCollectBean.class );
  
                  stmt = (OracleCallableStatement)connection.prepareCall( funCall );
  
                  stmt.registerOutParameter(
                  1, OracleTypes.ARRAY, schemaProvider.getSystemSchemaName()+".BEAN_LIST" );
  
                  stmt.setInt( 2, pagerHelper.getStartIndex() );
                  stmt.setInt( 3, pagerHelper.getEndIndex() );
                  stmt.setObject( 4, DAOUtil.getARRAY( DAOUtil.ArrayTypes.CHAR_TAB, pagerHelper.getPropertyNames() ));
                  stmt.setObject( 5, DAOUtil.getARRAY( DAOUtil.ArrayTypes.CHAR_TAB, pagerHelper.getSortOrders() ));
  
                  /* Initialize all the parameters to null.
                   * We will re set them individually in the switch if
                   * there is an actual value.
                   */
  
                  stmt.setString( 6, null  );     // value1
                  stmt.setString( 7, null  );     // value2
                  stmt.setNull( 8, OracleTypes.NUMBER );      // sac
                  stmt.setNull( 9, OracleTypes.NUMBER );     // job type id
                  stmt.setNull( 10, OracleTypes.NUMBER );  // standard unit price
  
                  // Still need to decide how searching will occur for year ranges
                  for( i=0; i&lt;codes.length(); i++ )
                  {
                      if ( params[i] != null )
                      {
                          switch( codes.charAt(i) )
                          {
                          case '0':   // VALUE1
                              temp = params[i].replace( '*', '%' );
                              temp = temp.replaceAll("%+", "%");
                              stmt.setString( 6, temp );
                              break;
                          case '1':   // VALUE2
                              stmt.setString( 7, params[i] );
                              break;
                          case '2':   // VALUE3
                              stmt.setInt( 8, Integer.parseInt(params[i]) );
                              break;
                          case '3':   // JOB TYPE ID
                              stmt.setLong( 9, Long.parseLong( params[i] ) );
                              break;
                          case '4':   // VALUE4
                              stmt.setLong( 10, Long.parseLong(params[i]));
                              break;
  
  
                          default:
  
                          } // end switch
                      } // if not null
                  } // end for
  
                  stmt.execute();
  
                  // ERROR  HERE:
                  Object[] results = (Object[])stmt.getArray(1).getArray();
  
  
                  collected = new ArrayList&lt;SimilarItemSearchCollectBean&gt;();
                  for( i=0; i&lt;results.length; i++ )
                      collected.add( (SimilarItemSearchCollectBean)results[i] );
  
              } // end try
              finally { close( stmt ); }
              return collected;
          } // end 
  </code></pre>