I\'m just trying to learn Hibernate (version 4 final) but I have a problem when trying to create the session factory. Here is some code related to the problem:
hi
// hibernate 4构建sessionFactory方式 email 563143188@qq.com
Configuration cfg = new Configuration()
.configure("hibernate.cfg.xml");
SessionFactory sf = cfg.buildSessionFactory(new ServiceRegistryBuilder()
.applySettings(cfg.getProperties()).build());
//build() return buildServiceRegistry
Session s = sf.openSession();
// test is ok