This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

Exception in thread "main" org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
at org.springframework.orm.hibernate3.SpringSessionContext.currentSession(SpringSessionContext.java:63)
at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:544)
at dsmo.dao.hibernate.StateDAOHibernate.getAll(StateDAOHibernate.java:37)
at dsmo.model.TheNewApp.main(TheNewApp.java:67)

so something's messed-up or incomplete with my configuration but I can't spot it (hmmm, time to RTM more). Like getting my transaction manager to hand out sessions (or have the sessions handled by transactions?)
In the meantime can someone tell me what I need to get this working?

Leave a comment:

You have @Transactional but have nothing in your configuration which does something with it. (I suggest a read of the tx chapter, maybe again). Add a tx:annotation-driven to make the @Transactional work.