hibernate 加载 jdbc驱动出错Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set


Exception in thread "main" org.hibernate.HibernateException: Access to DialectResolutionInfo cannot be null when 'hibernate.dialect' not set
程序基本没动过以前用的3.3.2的版本今天换成4.3.4的版本后改了一下sessionFactory的生成方法其他的不变开始还能运行过了30min左右就不能运行了!

 
 
hibernate4 已经废弃原来的buildSessionFactory 用下面的就没问题了

Configuration cfg = new Configuration().configure();
StandardServiceRegistry serviceRegistry = new StandardServiceRegistryBuilder()
                    .applySettings(cfg.getProperties()).build();
SessionFactory sessionFactory = cfg.buildSessionFactory(serviceRegistry);
 




免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM