-->
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.  [ 4 posts ] 
Author Message
 Post subject: Help: MappingException- No Dialect mapping for JDBC type: 3
PostPosted: Mon Mar 20, 2006 1:01 am 
Beginner
Beginner

Joined: Wed Oct 05, 2005 12:29 pm
Posts: 22
Hi,

I am getting the above exception while trying to open a simple SQL query:

SQLQuery qry = session.createSQLQuery(sql);
List rslt = qry.list();

As far as I can tell, I only have 9 fields in the query, of the following SQL types:

BIGINT
TIMESTAMP
VARCHAR
INTEGER
DECIMAL

I am using Hibernate 3.1.2
MySQL 5

What could be happening here?

Many thanks in advance.

Best regards,
Yee

---------------------------------------------------------
Stack trace as follows:

org.hibernate.MappingException: No Dialect mapping for JDBC type: 3
org.hibernate.dialect.TypeNames.get(TypeNames.java:56)
org.hibernate.dialect.TypeNames.get(TypeNames.java:81)
org.hibernate.dialect.Dialect.getHibernateTypeName(Dialect.java:192)
org.hibernate.loader.custom.CustomLoader.getHibernateType(CustomLoader.java:161)
org.hibernate.loader.custom.CustomLoader.autoDiscoverTypes(CustomLoader.java:131)
org.hibernate.loader.Loader.getResultSet(Loader.java:1678)
org.hibernate.loader.Loader.doQuery(Loader.java:662)
org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:224)
org.hibernate.loader.Loader.doList(Loader.java:2145)
org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2029)
org.hibernate.loader.Loader.list(Loader.java:2024)
org.hibernate.loader.custom.CustomLoader.list(CustomLoader.java:111)
org.hibernate.impl.SessionImpl.listCustomQuery(SessionImpl.java:1674)
org.hibernate.impl.AbstractSessionImpl.list(AbstractSessionImpl.java:147)
org.hibernate.impl.SQLQueryImpl.list(SQLQueryImpl.java:164)
com.traleva.erp.web.report.BIRTReport.outputCVS(BIRTReport.java:92)
com.traleva.erp.web.servlet.RunReportServlet.processRequest(RunReportServlet.java:116)
com.traleva.erp.web.servlet.RunReportServlet.doGet(RunReportServlet.java:77)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 20, 2006 7:19 am 
Pro
Pro

Joined: Mon Jan 24, 2005 5:39 am
Posts: 216
Location: Germany
Hi,

this is usually a missing type mapping in the dialect class.
See:

http://opensource2.atlassian.com/projects/hibernate/browse/HHH-1468

You can easily create your own dialect class and add the missing mapping.

_________________
dont forget to rate !


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 20, 2006 10:10 am 
Beginner
Beginner

Joined: Wed Oct 05, 2005 12:29 pm
Posts: 22
I did just that - did a trace and saw that Decimal(type 3) did indeed get registered - and yet I still get the error.

Any idea what else I could do?

Regards,
Yee


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 20, 2006 10:23 am 
Beginner
Beginner

Joined: Wed Oct 05, 2005 12:29 pm
Posts: 22
Problems solved. Works as it should.

Many thanks

Regards
Yee


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 4 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.