*** a/org/postgresql/test/jdbc2/BlobTransactionTest.java
--- b/org/postgresql/test/jdbc2/BlobTransactionTest.java
***************
*** 13,24 **** import junit.framework.TestCase;
  
  import java.io.*;
  import java.sql.*;
- import java.util.Arrays;
- import java.util.Collections;
  
  import javax.sql.rowset.serial.SerialBlob;
  
- import org.postgresql.largeobject.*;
  
  /**
   * Test that oid/lob are accessible in concurrent connection, in presence of the lo_manage trigger
--- 13,21 ----
***************
*** 100,111 **** public class BlobTransactionTest extends TestCase
      	while((d = is.read()) != -1)
      	{
      		if (readPos == result.length) {
!     			result = Arrays.copyOf(result, result.length * 2);
      		}
      		result[readPos++] = (byte)d;
      	}
      	
!     	return Arrays.copyOf(result, readPos);
      }
      
      public void testConcurrentReplace() throws SQLException, IOException {
--- 97,114 ----
      	while((d = is.read()) != -1)
      	{
      		if (readPos == result.length) {
!     			result = resizeArray(result, result.length * 2);
      		}
      		result[readPos++] = (byte)d;
      	}
      	
!     	return resizeArray(result, readPos);
!     }
! 
!     private byte[] resizeArray(byte [] original, int length) {
!         byte [] copy = new byte[length];
!         System.arraycopy(original, 0, copy, 0, original.length);
!         return copy;
      }
      
      public void testConcurrentReplace() throws SQLException, IOException {
*** a/org/postgresql/test/jdbc2/CopyTest.java
--- b/org/postgresql/test/jdbc2/CopyTest.java
***************
*** 281,287 **** public class CopyTest extends TestCase {
          {
          con.setAutoCommit(false);
          con.setTransactionIsolation(Connection.TRANSACTION_REPEATABLE_READ);
!         CopyManager manager = con.unwrap(PGConnection.class).getCopyAPI();
          
          Statement stmt = con.createStatement();
  
--- 281,287 ----
          {
          con.setAutoCommit(false);
          con.setTransactionIsolation(Connection.TRANSACTION_REPEATABLE_READ);
!         CopyManager manager = ((PGConnection) con).getCopyAPI();
          
          Statement stmt = con.createStatement();
  