-->
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.  [ 3 posts ] 
Author Message
 Post subject: Session is Closed
PostPosted: Wed Mar 26, 2008 4:22 pm 
Newbie

Joined: Wed Mar 26, 2008 4:17 pm
Posts: 1
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp

[b]Hibernate version :3]


JPA with hibernate implementation


I have my Junits running fine and when I deploy my app in to glassfish I am getting following error

org.springframework.orm.hibernate3.HibernateSystemException: Session is closed!; nested exception is org.hibernate.SessionException: Session is closed!
at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:659)
at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:95)
at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:306)


can someone please let me know what I am doing wrong?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Mar 28, 2008 5:15 pm 
Newbie

Joined: Fri Mar 21, 2008 2:20 pm
Posts: 10
Location: London
My guess is the persistence context scope is different in Glassfish than in your test environment.

Maybe Glassfish is using per transaction scope, and in your test environment you are using extended scope ?

Andy.

_________________
http:// www.techfoundry.com


Top
 Profile  
 
 Post subject:
PostPosted: Sat Mar 29, 2008 2:34 am 
Newbie

Joined: Fri Dec 07, 2007 9:25 am
Posts: 5
Hi ,

Please send your hibernate configuration file


Are using Auto_session_close and Auto_flush?
then please make sure all calls to your DAO( query or DML commands) are with in transaction

Thanks,
Raji.T


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.