• Post Reply Bookmark Topic Watch Topic
  • New Topic

Losing context during my integration test of database  RSS feed

Brian Storenson
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to write an integration test that queries an hsql database. I'm using hibernate/spring. My program seems to throw up on line 68. When I highlight query.getResultList() while I am debugging the test, it says:

query.getResultList() = >Exception occurred in target VM: org.hibernate.SessionException: Session is closed!<

It seems like I am losing the context. How do I reopen the transaction, or keep the transaction open so I can query the database?

Here is my stack trace

Here is my integration test

Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!