-->
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: No Dialect mapping for JDBC type: 7
PostPosted: Thu Sep 21, 2006 7:22 am 
Newbie

Joined: Thu Sep 21, 2006 7:12 am
Posts: 6
Hi!

I am just picking up Hibernate, and bumped into a problem that could not solve on my own.

I am running a long sql query, I suppose the query runs OK, but I receive the following message:
No Dialect mapping for JDBC type: 7

I searched for JDBC type 7, but could not find anything.


Hibernate version:
Hibernate 3

Code between sessionFactory.openSession() and session.close():
Session session = HibernateUtil.getSessionFactory().getCurrentSession();
session.beginTransaction();
List full = session.createSQLQuery(SqlText).list();
session.close();

Full stack trace of any exception that occurs:
does not throw any

Name and version of the database you are using:

INFO: RDBMS: PostgreSQL, version: 7.4.13
INFO: JDBC driver: PostgreSQL Native Driver, version: PostgreSQL 7.4.5 JDBC3 with SSL (build 216)
INFO: Using dialect: org.hibernate.dialect.PostgreSQLDialect

Debug level Hibernate log excerpt:


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 21, 2006 7:32 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
add a type mapping to the dialect or list the types explicitly with .addScalar

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 21, 2006 8:20 am 
Newbie

Joined: Thu Sep 21, 2006 7:12 am
Posts: 6
max wrote:
add a type mapping to the dialect or list the types explicitly with .addScalar



.addScalar does not work, since the query is generated dinamically with changing number of columns columns.

adding a type mapping would work, but I don't know what type is jdbc type 7


Top
 Profile  
 
 Post subject:
PostPosted: Thu Sep 21, 2006 8:37 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
From java.sql.Types:

public final static int REAL = 7;

_________________
Max
Don't forget to rate


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.