oracle.sql.BLOB blob = (oracle.sql.BLOB) resultSet.getObject("fileBlob");
It turned out that there are 2 Oracle JDBC jars in my Tomcat directory (common/lib and WEB-INF/lib), so I removed the one from WEB-INF, restarted the application, and it all worked fine.