-->
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: Hibernate 4x import problem
PostPosted: Thu Nov 21, 2013 4:14 am 
Newbie

Joined: Thu Nov 21, 2013 3:58 am
Posts: 2
Hibernate 3.6 work well to import sql data like:
...
SELECT pg_catalog.setval('customer_id_seq', 2, true);
INSERT INTO customer VALUES (1, 'Customer1');
INSERT INTO customer VALUES (2, 'Customer2');
...

But Hibernate 4xx (4.2.0.FINAL and 4.2.7 FINAL) throws exeption on line 1 (SELECT pg_catalog.setval('customer_id_seq', 2, true);) :

...
org.hibernate.tool.hbm2ddl.ImportScriptException: Error during statement execution (file: 'import.sql'): SELECT pg_catalog.setval('customer_id_seq', 4, true)
at org.hibernate.tool.hbm2ddl.SchemaExport.importScript(SchemaExport.java:451) ~[hibernate-core-4.2.0.Final.jar:4.2.0.Final]
...
Caused by: org.postgresql.util.PSQLException: A result was returned when none was expected.
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:307) ~[postgresql-9.1-901.jdbc4.jar:na]
...

I'v try all PostgesQL dialects - PostgreSQLDialect PostgreSQL82Dialect PostgreSQL80Dialect


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.