Index: src/net/lemnik/eodsql/ArrayDataSetCache.java =================================================================== --- src/net/lemnik/eodsql/ArrayDataSetCache.java (revision 217) +++ src/net/lemnik/eodsql/ArrayDataSetCache.java (working copy) @@ -44,9 +44,9 @@ private void ensureCapacity(final int newCapacity) { final int len = cache.length; if(len < newCapacity) { - cache = Arrays.copyOf( - cache, - Math.max((len * 3) / 2 + 1, newCapacity)); + final WeakReference[] newCache = new WeakReference[Math.max((len * 3) / 2 + 1, newCapacity)]; + System.arraycopy(cache, 0, newCache, 0, len); + cache = newCache; } } Index: src/net/lemnik/eodsql/spi/util/ArrayWrapper.java =================================================================== --- src/net/lemnik/eodsql/spi/util/ArrayWrapper.java (revision 217) +++ src/net/lemnik/eodsql/spi/util/ArrayWrapper.java (working copy) @@ -5,7 +5,6 @@ import java.sql.ResultSet; import java.sql.SQLException; -import java.sql.SQLFeatureNotSupportedException; import java.util.Map; @@ -75,7 +74,7 @@ if(!results.isBeforeFirst() && !results.isFirst()) { try { results.beforeFirst(); - } catch(final SQLFeatureNotSupportedException sqlfnse) { + } catch(final SQLException sqlfnse) { throw new EoDException( "Something is very wrong with this ResultSet. " + "There may be a bug in your JDBC Driver. " + @@ -85,7 +84,7 @@ "or on the first row.", sqlfnse); } } - } catch(final SQLFeatureNotSupportedException sqlfnse) { + } catch(final SQLException sqlfnse) { throw new EoDException("Something is very wrong with this " + "ResultSet. There may be a bug in your JDBC Driver. " + "The ResultSet cannot report whether it " + @@ -128,14 +127,14 @@ if(results.last()) { try { length = results.getRow(); - } catch(SQLFeatureNotSupportedException sqlfnse) { + } catch(SQLException sqlfnse) { return slowWrap(results); } } else { // return an empty array, there are no rows in the ResultSet return Array.newInstance(binding.getObjectType(), 0); } - } catch(final SQLFeatureNotSupportedException sqlfnse) { + } catch(final SQLException sqlfnse) { return slowWrap(results); }