Absolutely correct, I am not using hibernate-osgi, hibernate-core and hibernate-entitymanager in my code to connect database. Actually I am trying to convert existing application in to a OSGi bundle and I kept hibernate code as it is, currently I am using hibernate3.jar. Please let me know what changes I have to do to convert it to OSGi enable, if possible share some example code.
In my current code I am creating SessionFactory in the following way and facing error while try to get SessionFactory object as it not able to load hibernae.cfg.xml file
private static SessionFactory sessionFactory;
try {
sessionFactory = new Configuration().configure() .buildSessionFactory(); } catch (HibernateException he) { LOGGER.error(LoggingConsts.SESSION_FACTORY_FAILED + he); throw new ExceptionInInitializerError(he);
Thanks in advance
|