spróbuj tego
CallableStatement c = conn.prepareCall("{? = call get_object_type(?, ?)}");
c.registerOutParameter(1, Types.VARCHAR);
c.registerOutParameter(3, Types.VARCHAR);
c.setString(2, buffer);
c.execute();
String res = c.getString(1);
String err = c.getString(3);