'hibernate.dialect' must be set when no Connection available error

前端 未结 9 1925
误落风尘
误落风尘 2021-02-20 01:22

I am getting the following error when using Hibernate:

\'hibernate.dialect\' must be set when no Connection available

And I am using a datasource fo

相关标签:
9条回答
  • 2021-02-20 01:55

    I had this problem too. The reason was missing <property name="dataSource" ref="dataSource" /> element in <bean id="sessionFactory"> definition.

    0 讨论(0)
  • 2021-02-20 01:57

    I had the same errors. My problem was that I put the hibernate.properties under one package instead of the src. So my solution to my problem was moving hibernate.properties from package to src.

    0 讨论(0)
  • 2021-02-20 02:00

    In some cases just using a wrong name for the database results in this Exception. Hibernate is apparently trying to determine the dialect before doing anything else, and as the DB cannot be reached, the error message comes from the part responsible for the dialect select. Bad error messaging on part of Hibernate.

    0 讨论(0)
提交回复
热议问题