Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Losing context during my integration test of database

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

    Bookmark Topic Watch Topic
  • New Topic