-->
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.  [ 3 posts ] 
Author Message
 Post subject: new Oracle8iDialect doesn't work
PostPosted: Mon Aug 06, 2007 2:06 am 
Beginner
Beginner

Joined: Thu Jul 22, 2004 10:51 pm
Posts: 29
Location: sydney australia
Hibernate version: 3.2.5.ga
Name and version of the database you are using: Oracle8i (8.1.7)

Hi all, just downloaded the latest build (upgrading from 3.1.3) and have found a bit of a problem with the dialects for oracle, particularly 8i.

I have been using the OracleDialect which has always worked fine however the new version started giving me warnings as it is deprecated. The deprecation message reads "Use Oracle8iDialect instead" so I changed my dialect to this.

Now when I start up hibernate I get the following exception:

Code:
org.hibernate.MappingException: No Dialect mapping for JDBC type: 91
   at org.hibernate.dialect.TypeNames.get(TypeNames.java:56)
   at org.hibernate.dialect.TypeNames.get(TypeNames.java:81)
   at org.hibernate.dialect.Dialect.getTypeName(Dialect.java:291)
   at org.hibernate.mapping.Column.getSqlType(Column.java:182)
   at org.hibernate.mapping.Table.sqlTemporaryTableCreateString(Table.java:347)
   at org.hibernate.mapping.PersistentClass.prepareTemporaryTables(PersistentClass.java:742)
   at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:210)
   at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)


I think JDBC type 91 is date.

Any suggestions? I've got tons of persistent objects so i don't want to post all of my hbm.xml's.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 06, 2007 9:06 am 
Expert
Expert

Joined: Fri Jul 13, 2007 8:18 am
Posts: 370
Location: london
Try removing the type attribute of your date fields and let hibernate choose.
i.e. instead of this:
<property name="date" type="date">
just do this:
<property name="date">

Alternatively, you can keep the type attribute but specify the SQL type in a column element:
<property name="date" type="date">
<column name="date_field" sql-type="date"/>
</property>

I'm not 100% sure (not very familiar with hibernate source code) but I think this might be a bug.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 14, 2007 9:01 pm 
Beginner
Beginner

Joined: Thu Jul 22, 2004 10:51 pm
Posts: 29
Location: sydney australia
JIRA ISSUE


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