I had the same probleme than your.
The reason is very simple, when you use "getCurrentSession()" , tha indicate to your application server (JBoss, WebSphere, Oc4J, and so on) instance a Hibernate session. But, without a Server up, you donĀ“t do any thing with getCurrentSession(), and it will allow you see a exception like you posted.
Ok, when you are developing without application server, try to use openSession(). In the moment when you put you applicacion to a server, you can try to use getCurrentSession().
request for comments.
Neketsu Shonen
|