I’ve got the error:
INFO: building session factory
May 28, 2011 2:28:05 PM org.hibernate.impl.SessionFactoryObjectFactory addInstance
INFO: Not binding factory to JNDI, no JNDI name configured
Exception in thread "main" org.hibernate.HibernateException: No CurrentSessionContext configured!
at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:542)
at hiberpack.EventManager.createAndStoreEvent(EventManager.java:25)
at hiberpack.EventManager.main(EventManager.java:18)
Java Result: 1
what can I do with this? Please help.
To be able to call SessionFactory.getCurrentSession(), you need to configure the current session context. Read http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html_single/#architecture-current-session for information about this.
Note: the message about JNDI doesn’t have anything to do with the error you get, and is just an information message.