Exception in thread "main" javax.persistence.PersistenceException: org.hibernate.SessionException: Session is closed!
... and you are using Spring transaction management, then the reason might be that your DAO method (the method that threw it and that uses persistence context) is not transactional and it should be:
import org.springframework.transaction.annotation.Transactional; //... @Transactional(readOnly = true) public List<Dog> retrieveAllDogs() { return em.createQuery("from Dog").getResultList(); } //...
See my article on correct setup of Spring 3 & JPA 2.0.
Oh arrive on, guys! I know that car is very necessary right now, but you necessity excellent money on it! If you wish to rescue your money and do not wish to waste your time - this write my annotated bibliography and be pleased about it! They rally know how to do it, and you'll be so happy! So go for it and enjoy!
ReplyDeleteMaintaining a high GPA is crucial. Take my exam for me services have helped me keep my grades up by ensuring I never miss an exam, even during my busiest weeks.
ReplyDelete