Hibernate throws org.hibernate.MappingException: No Dialect mapping for JDBC type: -9 with Oracle dialect

Just wondering and curious how it was working with ojdbc7 and even with ojdbc5 jars.

You can debug it to see how it was working. However, it does not really matter because Hibernate 3.5 was not meant to support JDBC 4.2, hence you need to upgrade anyway.