-->
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: create-drop sometimes hangs in Postgres
PostPosted: Wed Oct 22, 2008 2:08 pm 
Newbie

Joined: Thu Sep 11, 2008 2:55 pm
Posts: 6
Hi,

we've got some trouble running Hibernate in Glassfish using "create-drop" or development usage. Before switching to Postgres everything worked fine but with Postgres Hibernate sometimes hangs forever while recreating the database tables after a redeploy.

I've used pgAdmin III to get an overview of what's going on on the Postgres server if this problem occurs and noticed that there is one active transaction that doesn't end. The query executed there is

"alter table ContactRequests drop constraint fk6add7fe488265814"

The sql statement for this table is:
Code:
CREATE TABLE contactrequests
(
  messageid bigserial NOT NULL,
  sent timestamp without time zone NOT NULL,
  state integer,
  recipient_userid bigint NOT NULL,
  sender_userid bigint NOT NULL,
  CONSTRAINT contactrequests_pkey PRIMARY KEY (messageid),
  CONSTRAINT fk6add7fe488265814 FOREIGN KEY (sender_userid)
      REFERENCES users (userid) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION,
  CONSTRAINT fk6add7fe4dcf117b0 FOREIGN KEY (recipient_userid)
      REFERENCES users (userid) MATCH SIMPLE
      ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITH (OIDS=FALSE);
ALTER TABLE contactrequests OWNER TO glassfish;


This problem occurs using the latest stable Hibernate version (+ anotations and entity manager) and on Postgres 8.2 and 8.3.

Is this some problem of our table structure or a Hibernate problem?

Thanks for the help
Johannes


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.