首页 > 数据库技术 > 详细

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

时间:2015-04-19 06:19:03      阅读:390      评论:0      收藏:0      [点我收藏+]

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);
 



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

原文:http://www.cnblogs.com/homer3000/p/e5dc3ec58a30293ab72664cbcf8661a1.html

踩
(0)
赞
(0)
   
举报
评论 一句话评论(0)
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!