Code example for HibernateException

0
	public Session currentSession() throws HibernateException {
		try { 
			return (org.hibernate.classic.Session) SessionFactoryUtils.doGetSession(this.sessionFactory, false);
		} 
		catch (IllegalStateException ex) {
			throw new HibernateException(ex.getMessage());
		} 
	} 
 
} 
Connect your IDE to all the code out there  Get Codota for Java