-->
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.  [ 6 posts ] 
Author Message
 Post subject: HibernateException column alreay exist
PostPosted: Mon Apr 11, 2005 3:36 pm 
Regular
Regular

Joined: Thu Sep 23, 2004 11:53 am
Posts: 83
Read the rules before posting!
http://www.hibernate.org/ForumMailingli ... AskForHelp

Hibernate version:3.0

Mapping documents:NA

Code between sessionFactory.openSession() and session.close():NA

Full stack trace of any exception that occurs:

Name and version of the database you are using:Oracle 10g

The generated SQL (show_sql=true):NA

Debug level Hibernate log excerpt:


!ENTRY org.hibernate.eclipse.console.HibernateConsolePlugin 4 4 2005-04-11 14:19:08.265
!MESSAGE Error under artifact generation
!STACK 0
org.hibernate.cfg.JDBCBinderException: org.hibernate.mapping.Column(OWNER) already exist in org.hibernate.mapping.Table(null.OLAPSYS.ALL$OLAP2_DIM_LEVEL_ATTR_MAPS)
at org.hibernate.cfg.JDBCBinder.processBasicColumns(JDBCBinder.java:725)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:106)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:213)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:76)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:210)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
!SUBENTRY 1 org.hibernate.eclipse.console.HibernateConsolePlugin 4 4 2005-04-11 14:19:08.265
!MESSAGE org.hibernate.mapping.Column(OWNER) already exist in org.hibernate.mapping.Table(null.OLAPSYS.ALL$OLAP2_DIM_LEVEL_ATTR_MAPS)
!STACK 0
org.hibernate.cfg.JDBCBinderException: org.hibernate.mapping.Column(OWNER) already exist in org.hibernate.mapping.Table(null.OLAPSYS.ALL$OLAP2_DIM_LEVEL_ATTR_MAPS)
at org.hibernate.cfg.JDBCBinder.processBasicColumns(JDBCBinder.java:725)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:106)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:213)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:76)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:210)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)
!SUBENTRY 2 org.hibernate.eclipse.console.HibernateConsolePlugin 4 150 2005-04-11 14:19:08.265
!MESSAGE org.hibernate.mapping.Column(OWNER) already exist in org.hibernate.mapping.Table(null.OLAPSYS.ALL$OLAP2_DIM_LEVEL_ATTR_MAPS)
!STACK 0
org.hibernate.cfg.JDBCBinderException: org.hibernate.mapping.Column(OWNER) already exist in org.hibernate.mapping.Table(null.OLAPSYS.ALL$OLAP2_DIM_LEVEL_ATTR_MAPS)
at org.hibernate.cfg.JDBCBinder.processBasicColumns(JDBCBinder.java:725)
at org.hibernate.cfg.JDBCBinder.readFromDatabase(JDBCBinder.java:106)
at org.hibernate.cfg.JDBCMetaDataConfiguration.readFromJDBC(JDBCMetaDataConfiguration.java:40)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$3.execute(ArtifactGeneratorWizard.java:213)
at org.hibernate.console.ConsoleConfiguration.execute(ConsoleConfiguration.java:76)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.buildConfiguration(ArtifactGeneratorWizard.java:210)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.doFinish(ArtifactGeneratorWizard.java:147)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard.access$0(ArtifactGeneratorWizard.java:127)
at org.hibernate.eclipse.console.wizards.ArtifactGeneratorWizard$1.run(ArtifactGeneratorWizard.java:95)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)


Trying to generate Atrifacts for ORacle database.
Any ideas? I think this is an Oracle table not mine.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 11, 2005 5:00 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
you are scanning the whole db and the oracle system tables has some "extranous" metadata that confuses the rev.eng.

you can limit the scan to a single catalog/schema to avoid this issue - set default catalog and default schema in the hibernate.cfg.xml

(in a future release you will be able to limit it to specific schemas)

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 11, 2005 5:47 pm 
Regular
Regular

Joined: Thu Sep 23, 2004 11:53 am
Posts: 83
When I add
<property name="hibernate.default_schema">schemaName</property>
to the highbernate.cfg.xml file the Artifact Window simple disappears. When I add default_catalog it gives me the same error as before

Any ideas?

Thanks


Top
 Profile  
 
 Post subject:
PostPosted: Mon Apr 11, 2005 5:56 pm 
Regular
Regular

Joined: Thu Sep 23, 2004 11:53 am
Posts: 83
the config file

<?xml version="1.0" encoding="UTF-8"?>
<!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="eSessionFactory">
<property name="hibernate.connection.url">jdbc:oracle:thin:@gondor:1521:orcl</property>
<property name="hibernate.cglib.use_reflection_optimizer">true</property>
<property name="hibernate.connection.password">schemaName</property>
<property name="hibernate.connection.username">schemaName</property>
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
</session-factory>
</hibernate-configuration>


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 12, 2005 2:17 am 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 6:10 am
Posts: 8615
Location: Neuchatel, Switzerland (Danish)
check and see what is output in the error log

_________________
Max
Don't forget to rate


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 12, 2005 12:24 pm 
Regular
Regular

Joined: Thu Sep 23, 2004 11:53 am
Posts: 83
The schema name is case sensitive.

Thanks :)


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