I am developing an application making use of the Hibernate framework (v4.3.4). When I run the tests, I get the following exception:
Exception in thread "main" java.lang.NoSuchMethodError: org.hibernate.SessionFactory.openSession()Lorg/hibernate/classic/Session;
at com.cartif.dwhconnector.manager.DatabaseCommunicator.createDBSession(DatabaseCommunicator.java:89)
at com.cartif.dwhconnector.manager.DWHManager.createDBSession(DWHManager.java:53)
at unittest.DWHConnectorTester.main(DWHConnectorTester.java:16)
The Java code is the next one:
Configuration configuration = new Configuration();
configuration.configure("com/cartif/hibernatemappings/hibernate.cfg.xml");
SessionFactory sessionFactory = configuration.buildSessionFactory();
session = sessionFactory.openSession();
I have tried to use the Session class in the packages org.hibernate and org.hibernate.clasic, but the Exception is always the same. Could you help me, please?
Thank you in advance!