-->
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.  [ 1 post ] 
Author Message
 Post subject: SchemaUpdate problem
PostPosted: Fri Nov 07, 2008 9:17 am 
Newbie

Joined: Fri Nov 07, 2008 9:07 am
Posts: 1
Hello

I'm new to the Hibernate technology..sorry for my newbie question.
I use PostgreSQL 8.3 DB. I prepared my POJOs and the mapping files for entities.i added this line to my hibernate.cfg.xml file:
<property name="hbm2ddl.auto">update</property>
when i run my program, it creates these tables successfully.
and i run the program again without any changes but i get these errors:


1453 [main] ERROR org.hibernate.util.JDBCExceptionReporter - INDEX_NAME column name is not found in this ResultSet.
1453 [main] ERROR org.hibernate.tool.hbm2ddl.SchemaUpdate - could not complete schema update
org.hibernate.exception.SQLGrammarException: could not get table metadata: Barcode
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:90)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:52)
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(DatabaseMetadata.java:128)
at org.hibernate.cfg.Configuration.generateSchemaUpdateScript(Configuration.java:981)
at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:187)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:346)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
at util.HibernateUtil.<clinit>(HibernateUtil.java:13)
at Main.main(Main.java:9)
Caused by: org.postgresql.util.PSQLException: Bu ResultSet içinde INDEX_NAME sütun adı bulunamadı.
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.findColumn(AbstractJdbc2ResultSet.java:2502)
at org.postgresql.jdbc2.AbstractJdbc2ResultSet.getString(AbstractJdbc2ResultSet.java:2345)
at org.hibernate.tool.hbm2ddl.TableMetadata.addIndex(TableMetadata.java:113)
at org.hibernate.tool.hbm2ddl.TableMetadata.initIndexes(TableMetadata.java:157)
at org.hibernate.tool.hbm2ddl.TableMetadata.<init>(TableMetadata.java:58)
at org.hibernate.tool.hbm2ddl.DatabaseMetadata.getTableMetadata(DatabaseMetadata.java:113)
... 6 more
1453 [main] INFO org.hibernate.impl.SessionFactoryImpl - closing
1453 [main] INFO org.hibernate.connection.DriverManagerConnectionProvider - cleaning up connection pool: jdbc:postgresql://localhost/marketdb


what can be the problem?
Thanks in advance.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

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.