-->
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: Creating Postgresql DB fails
PostPosted: Tue Apr 03, 2007 6:36 am 
Beginner
Beginner

Joined: Thu Aug 31, 2006 7:41 am
Posts: 24
Hi,

I have a hibernate mapping here that works perfectly fine with mysql and MS SQL server, but when I try to create the database structure in a postgresql database it fails. I looks like the order in which the tables are created is not right, the errors I get are at the end of the post. Any idea how to get either more information as to what hibernate tried to execute, or how to fix this? If the mapping is needed I can post it, but as its not really small for now I leave it out (as it works with 2 other databases).

Code:
java.sql.SQLException: ERROR: relation "description" does not exist
   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471)
   at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256)
   at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:392)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:314)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:264)
   at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:61)
   at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:308)
   at org.hibernate.tool.hbm2ddl.SchemaExport.drop(SchemaExport.java:284)
   at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:186)
   at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:133)
   at de.zgdv.rostock.ceisexpert.hibernate.HibernateUtil.buildDatabase(HibernateUtil.java:50)
   at de.zgdv.rostock.ceisexpert.hibernate.HibernateUtil.main(HibernateUtil.java:184)
java.sql.SQLException: ERROR: relation "instruction" does not exist
   at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1471)
   at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1256)
   at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:175)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:392)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:314)
   at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:264)
   at com.mchange.v2.c3p0.impl.NewProxyStatement.executeUpdate(NewProxyStatement.java:61)
   at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:308)
   at org.hibernate.tool.hbm2ddl.SchemaExport.drop(SchemaExport.java:284)
   at org.hibernate.tool.hbm2ddl.SchemaExport.execute(SchemaExport.java:186)
   at org.hibernate.tool.hbm2ddl.SchemaExport.create(SchemaExport.java:133)
   at de.zgdv.rostock.ceisexpert.hibernate.HibernateUtil.buildDatabase(HibernateUtil.java:50)
   at de.zgdv.rostock.ceisexpert.hibernate.HibernateUtil.main(HibernateUtil.java:184)


Top
 Profile  
 
 Post subject:
PostPosted: Tue Apr 03, 2007 6:59 am 
Beginner
Beginner

Joined: Thu Aug 31, 2006 7:41 am
Posts: 24
NM, found the solution


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.