Connection cannot be null when 'hibernate.dialect' not set

后端 未结 15 1680
悲&欢浪女
悲&欢浪女 2020-12-16 11:12

having more issues with seting up hibernate with spring3. this time it is saying that connection is nul as the dialect is not set which it is on my hibernate.cfg.xml file.

15条回答
  •  执笔经年
    2020-12-16 11:15

    I think the error cased by unloading hibernate.cfg.xml file after you have created the Configuration Object like this:

    Configuration config = new Configuration();
    config.configure("hibernate.cfg.xml");
    

提交回复
热议问题