No Dialect mapping for JDBC type: 3

Description

Hibernate throws "No Dialect mapping for JDBC type: 3" when using Oracle JDBC driver with the Hibernate DataDirectOracle9Dialect.

DataDirect Connect for JDBC Oracle driver returns the JDBC type DECIMAL for some result set columns however there was no mapping set up in the DataDirectOracle9Dialect for the DECIMAL JDBC type.

The work arround for issue is to add the following constructor to DataDirectOracle9Dialect

public DataDirectOracle9Dialect() {

super();
registerColumnType( Types.DECIMAL, "number($p,$s)" );
registerHibernateType(Types.DECIMAL, "big_decimal");
}

Can Hibernate Team add this constructor or something similar to the DataDirectOracle9Dialect?

Version Info
Hibernate: 3.1.3

DataDirect
Connect for JDBC
Oracle driver: 3.5.40

Forum reference http://forum.hibernate.org/viewtopic.php?t=959583&highlight=dialect+mapping+jdbc+type+3

Activity

Steve EbersoleAugust 22, 2006 at 10:11 PM

fixed in the manner stated in my last comment

Steve EbersoleAugust 22, 2006 at 9:22 PM

to me it seems to make more sense to:
1) register the hibernate type mapping at the Dialect-level. For all/most databases, DECIMAL should also map to Hibernate'd BigDecimalType
2) register the datatype at the Oracle9Dialect-level, since this is true of all Oracle setups. Apparently the distinction is that the Oracle drivers just never report DECIMAL types?

daniel flesnerJuly 15, 2006 at 1:02 AM

this also appears to be broken on mysql 5.0.22 and mysql-connector-java 3.1.13. the following select "select avg(score), std(score), min(score), max(score) from score_raw" throws the same exception. hibernate version 3.1.3.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created June 1, 2006 at 8:39 AM
Updated June 3, 2009 at 5:13 AM
Resolved August 22, 2006 at 10:11 PM