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.  [ 2 posts ] 
Author Message
 Post subject: Oracle 9i Dialect not used in plugin or utilities
PostPosted: Thu Jul 26, 2007 7:13 pm 
Newbie

Joined: Mon Feb 21, 2005 9:31 pm
Posts: 4
Location: Colorado
I'm using the Hibernate Tools from org.hibernate.eclipse_3.2.0.beta9a. When I use the hibernate perspective in Eclipse and press on the database icon, the tool is using the

org.hibernate.cfg.reveng.dialect.JDBCMetaDataDialect

dialect to scan the available schemas and tables. This is a problem since using this dialect against the Oracle 9i server will throw an exception every time it attempts to get the list of indexes from the metadata for each table. If I use ANT to run the reverse engineering tools they use the same default dialect. The <hdb2hdmxml ...> will issue warnings on each table indicating it can't acquire the index list.

My hibernate configuration file specifies the Oracle 9i dialect.

<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory name="rpmSessionFactory">
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.password">*****</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@[server]:[port]:tiny</property>
<property name="hibernate.connection.username">user</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
</session-factory>
</hibernate-configuration>



I have looked at the Oracle 9i dialect and it uses a SQL SELECT on system tables to gain access to the list of indexes. This does not cause an exception when I run the same SELECT using the same JDBC connection. If the tools and the plugin used the specified dialect I don't believe I would have the issues I'm experiencing.

Is there something wrong with the configuration file that causes the tools to use the default dialect? Can someone suggest how to correct the problem?

_________________
Regards,
Bud Curtis

Another program, another buck!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 31, 2007 10:00 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
Dialect != MetaDataDialect

the sql in the oracledialect does not handle multiple schemas so not usable for reverse engineering.

In b9 the tool should choose to use OracleMetaDataDialect for the reveng.
which uses native oracle system queries.

with respect to the exceptions they shouldn't hurt (except for a speed penalty)

_________________
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.  [ 2 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.