I've been beating my head against a wall trying to retrieve an OID form a table, and I finally got a java.lang.ClassCastException at runtime. The line of code this exception complains about: long insertedOID = ( (PGStatement) ps ).getLastOID();
... ps is the PreparedStatement I'm using. The entire class follows: