Hi,
I am using hibernate 4.0.1 for CRUD operations upon page replication. For this i have written eventhandler, in handleEvent method i am writing logic to persist page property in database using hibernate.
I am getting class not found error in hibernate. added all dependencies in POM file, showing all jars in classpath too, bundle is deployed successfully and it is in active state.
hibernate.cfg.xml i have put in src/main/resources folder and added this folder in classpath.
java.lang.NoClassDefFoundError: org/hibernate/cfg/Configuration
Could anyone please help me to resolve the issue, below piece of code is causing the problem
Configuration configuration = new Configuration().configure();
ServiceRegistry serviceRegistry = new ServiceRegistryBuilder().applySettings(
configuration.getProperties()). buildServiceRegistry();
SessionFactory sessionFactory = configuration.buildSessionFactory(serviceRegistry);
Session session = sessionFactory.openSession();
Thanks,
Pradeep