User
User

Reputation: 303

No Dialect mapping for JDBC type: -9 w/Hibernate 3 & Oracle 10g

We recently started seeing this error for an application which was previously working. No code changes have been made to cause the error, nor database changes (to my knowledge). There was supposedly some fairly recent change made to the server's datasource configuration (driver version) but I have no definite details.

The application does NOT have any nvarchar2 columns in the tables being used in the failing operations. hibernate.dialect=org.hibernate.dialect.Oracle10gDialect

Upvotes: 5

Views: 2016

Answers (2)

Alex Kotov
Alex Kotov

Reputation: 11

Thanks for explaining the root cause of this. More details here: http://docs.oracle.com/cd/B19306_01/java.102/b14355/global.htm#CHDHHJDB

I was able to solve this by using a different version of Oracle JDBC driver. Downgrade of ojdbc6.jar from “11.2.0.3.0” that was on the prod server to “11.1.0.7.0-Production” used for development fixed this. The target server is NLS_RDBMS_VERSION 10.2.0.4.0

Upvotes: 0

User
User

Reputation: 303

A custom hibernate dialect with this in the constructor "fixed" this problem. Still no idea why it appeared, no NVARCHAR columns are being used...

registerHibernateType(Types.NVARCHAR, StringType.INSTANCE.getName());

Upvotes: 4

Related Questions