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.
|
|