-->
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.  [ 11 posts ] 
Author Message
 Post subject: reverse engineering exception
PostPosted: Tue Jun 21, 2005 8:30 am 
Newbie

Joined: Tue Jun 21, 2005 8:15 am
Posts: 1
I use eclipse3.1 RC2 and new hibernate tool set (alpha 4). My database is Oracel9i. I got following exception when I try to reverse engineering from a jdbc connection. Any idea?


org.hibernate.cfg.JDBCBinderException: org.hibernate.mapping.Column(CATALOG_ID) already exist in org.hibernate.mapping.Table(OLAPSYS.ALL$OLAP2_CATALOGS)
at org.hibernate.cfg.JDBCBinder.processBasicColumns(JDBCBinder.java:749)
at org.hibernate.cfg.JDBCBinder.readDatabaseSchema(JDBCBinder.java:123)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:91)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:37)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:237)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:77)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:234)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:164)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:132)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:98)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jun 21, 2005 3:18 pm 
Beginner
Beginner

Joined: Tue Jun 21, 2005 3:15 pm
Posts: 29
I am getting the same error. Anyone no what us newbies are doing wrong?
Thanks,
B


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 27, 2005 3:19 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you are reverse engineering the complete database.

set default schema/catlog and/or use reveng.xml to limit what it will process.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 19, 2005 3:57 am 
Newbie

Joined: Tue Jul 19, 2005 2:25 am
Posts: 5
max wrote:
you are reverse engineering the complete database.

set default schema/catlog and/or use reveng.xml to limit what it will process.


where i need to Specify schema.please give me example for reveng.xml
thanks
raj


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 19, 2005 4:16 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you set the schema in your hibernate.cfg.xml as specified in the docs.

There is an example of the reveng.xml at tools.hibernate.org (and the docs inside eclipse)

-max

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 19, 2005 5:20 am 
Newbie

Joined: Tue Jul 19, 2005 2:25 am
Posts: 5
max wrote:
you set the schema in your hibernate.cfg.xml as specified in the docs.

There is an example of the reveng.xml at tools.hibernate.org (and the docs inside eclipse)

-max


hi max
its created hbm file like this. i specified schema name in cfg file

<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
<!--
Auto-generated mapping file from
the hibernate.org cfg2hbm engine
for General Global Setttings
-->


</hibernate-mapping>
Thanks in advance
Quote:


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 19, 2005 5:26 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
this means we could not locate any tables in the schema specified.

note that some dbs have case sensitive schema names and you need the proper rights on the db to access these data.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 19, 2005 5:36 am 
Newbie

Joined: Tue Jul 19, 2005 2:25 am
Posts: 5
max wrote:
this means we could not locate any tables in the schema specified.

note that some dbs have case sensitive schema names and you need the proper rights on the db to access these data.


one more problem max
when i select "reverse engineer from jdbc Conncection" Checkbox

i am getting this error

org.hibernate.cfg.JDBCBinderException:org.hibernate.mapping.Column(CATALOG_ID) already exist in org.hibernate.mapping.Table(OLAPSYS.ALL$OLAP2_CATALOGS)

iam useing Oracle 9i &default Schema Scott.
help me on this.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 19, 2005 5:43 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
use the forum and remember to set the default schema to avoid reverse engineering the complete system database too.

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject: Solution?? or Walkaround
PostPosted: Tue Nov 08, 2005 5:33 am 
Newbie

Joined: Tue Nov 08, 2005 5:25 am
Posts: 1
I found a simple way to reverse engineering the oracle schema....
I'm using eclipse 3.1 and Hibernate 3..
i found that if i set default_schema i cant see and tables that belong to the schema... but when i set default_catalog i can view the table object...
if directly select the schema u want to generate u get the JBDCBinderException.

Solution:

i specified default_catalog rather than default_schema.
include the schema u want to reverse engineering and manually exclude the schema u dont what... after that... u can generate the artifact without no problem... :)



i dunno why i cant view table object with default_schema specified .... can have check tech peeps :)



I R Noob


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 08, 2005 6:29 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
what is the exception ?

afaik default_catalog is more or less ignored by oracle so thats probably why ;)

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