-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: No Dialect mapping for JDBC type: 3 error
PostPosted: Wed May 17, 2006 12:04 pm 
Regular
Regular

Joined: Mon May 08, 2006 6:00 am
Posts: 53
Location: India
Hi,

Need some help.

We are using Datadirect driver (V 3.5 SP1) and Hibernate v3.1.3

While executing this query "select sequence_num.nextvalue from dual" using createSQLQuery API, we are getting an exception:
"org.hibernate.MappingException: No Dialect mapping for JDBC type: 3"

This is what we are using in hibernate.cfg.xml
<property name="hibernate.connection.datasource">jdbc/sam</property>
<property name="connection.pool_size">2</property>
<property name="dialect">org.hibernate.dialect.DataDirectOracle9Dialect</property>


Can someone pls. help us resolving this issue?

Thanks,
Sudhir


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 17, 2006 12:16 pm 
Expert
Expert

Joined: Tue Apr 25, 2006 12:04 pm
Posts: 260
http://www.hibernate.org/hib_docs/v3/re ... l-dialects

has org.hibernate.dialect.Oracle9Dialect but not org.hibernate.dialect.DataDirectOracle9Dialect


Top
 Profile  
 
 Post subject: Re: No Dialect mapping for JDBC type: 3 error
PostPosted: Wed May 31, 2006 3:06 pm 
Newbie

Joined: Wed May 31, 2006 3:00 pm
Posts: 1
Location: Morrisville, NC
We have investigated this and found that the new DataDirectOracle9Dialect, provided by Hibernate, does not include a mapping for the DECIMAL data type. The DataDirect Oracle driver describes some columns using this data type. The workaround is to add the following constructor to the DataDirectOracle9Dialect

Code:
   
public DataDirectOracle9Dialect() {
      
    super();
    registerColumnType( Types.DECIMAL, "number($p,$s)" );
    registerHibernateType(Types.DECIMAL, "big_decimal");
}


We will work with Hibernate to get this included in a future update to Hibernate.

BTW, I believe the DataDirectOracle9Dialect is new in Hibernate 3.1.3


Top
 Profile  
 
 Post subject: Re: No Dialect mapping for JDBC type: 3 error
PostPosted: Tue May 29, 2007 8:53 am 
Newbie

Joined: Tue May 22, 2007 9:19 am
Posts: 4
I have this error:
No Dialect mapping for JDBC type: -1

can you help me???


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 29, 2007 1:28 pm 
Regular
Regular

Joined: Mon May 08, 2006 6:00 am
Posts: 53
Location: India
Try following and see if it works for you.


public class CustomSAPDBDialect extends SAPDBDialect {

public CustomSAPDBDialect() {
super();

registerColumnType( Types.DECIMAL,"number($p,$s)" );

registerHibernateType(Types.DECIMAL,
"big_decimal");
}
}


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.