#784 hibernate 2.x don´t work

3.0.2
open
Gerd Wagner
5
2012-12-29
2009-08-07
Anonymous
No

this is stracktrace
java.lang.RuntimeException: java.lang.ClassNotFoundException: org.hibernate.EntityMode

org.hibernate is not 2.x is 3.x hibernate version

I´m use the code for use getSessionFactoryImpl method

**************************************************************************
import net.sf.hibernate.HibernateException;
import net.sf.hibernate.SessionFactory;
import net.sf.hibernate.cfg.Configuration;
import net.sf.hibernate.impl.SessionFactoryImpl;

public class JoshuaSessionFactory {

public SessionFactoryImpl getSessionFactoryImpl\(\) throws HibernateException \{

    SessionFactory sessionFactory = new Configuration\(\).configure\(\)
            .buildSessionFactory\(\);

    return \(SessionFactoryImpl\) sessionFactory;
\}

}
****************************************************************************

But unsucelly :(

this is my jars and path for my .hbms and .class entity

C:\ProjetosANAC\InspecaoSaude\AeronautaWeb\WebContent\WEB-INF\lib\commons-logging.jar
C:\ProjetosANAC\InspecaoSaude\AeronautaWeb\WebContent\WEB-INF\lib\log4j-1.2.8.jar
C:\ProjetosANAC\InspecaoSaude\AeronautaWeb\WebContent\WEB-INF\lib\joshua-hibernate.jar
C:\ProjetosANAC\InspecaoSaude\AeronautaWeb\WebContent\WEB-INF\lib\dom4j-1.4.jar
C:\ProjetosANAC\InspecaoSaude\AeronautaWeb\JavaSource\hibernate.cfg.xml
C:\ProjetosANAC\InspecaoSaude\AeronautaWeb\JavaSource
C:\ProjetosANAC\InspecaoSaude\AeronautaWeb\WebContent\WEB-INF\lib\commons-collections.jar
C:\ProjetosANAC\Sintac\CorporativoSINTAC\build\classes
C:\ProjetosANAC\Sintac\FrameworkSINTAC\build\classes
C:\ProjetosANAC\InspecaoSaude\AeronautaWeb\WebContent\WEB-INF\lib\odmg-3.0.jar
C:\ProjetosANAC\InspecaoSaude\AeronautaWeb\WebContent\WEB-INF\lib\cglib-full-2.0.2.jar
C:\ProjetosANAC\Sintac\ControleAcessoSINTAC\build\classes
C:\ProjetosANAC\InspecaoSaude\AeronautaWeb\WebContent\WEB-INF\lib\struts.jar
C:\ProjetosANAC\InspecaoSaude\AeronautaWeb\WebContent\WEB-INF\lib\jasperreports-1.1.1.jar
C:\ProjetosANAC\InspecaoSaude\AeronautaWeb\WebContent\WEB-INF\lib\logdriver.jar
C:\ProjetosANAC\InspecaoSaude\AeronautaWeb\WebContent\WEB-INF\lib\jta.jar
C:\ProjetosANAC\InspecaoSaude\AeronautaWeb\WebContent\WEB-INF\lib\hibernate2.jar
C:\ProjetosANAC\InspecaoSaude\AeronautaWeb\WebContent\WEB-INF\lib\ojdbc14.jar

Discussion