本文主要是介绍Exception in thread main org.hibernate.HibernateException: Access to DialectResolutionInfo cannot,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
这是说
hibernate 加载 jdbc驱动出错Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
hibernate4 已经废弃原来的buildSessionFactory 用下面的就没问题了
Configuration cfg = new Configuration().configure();
StandardServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder() .applySettings(cfg.getProperties()).build();
SessionFactory sessionFactory = cfg.buildSessionFactory(serviceRegistry);
Configuration cfg = new Configuration().configure();
StandardServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder() .applySettings(cfg.getProperties()).build();
SessionFactory sessionFactory = cfg.buildSessionFactory(serviceRegistry);
这篇关于Exception in thread main org.hibernate.HibernateException: Access to DialectResolutionInfo cannot的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!