qq_36346496
violent_sunset
采纳率0%
2017-05-15 16:28

Spring在配置hibernate sessionfactory出现错误

Caused by: org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.service.jdbc.connections.spi.ConnectionProvider]

Caused by: org.hibernate.HibernateException: Could not instantiate connection provider [org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider]

Caused by: java.lang.ClassCastException: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider cannot be cast to org.hibernate.service.jdbc.connections.spi.ConnectionProvider

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

1条回答

  • lihongbiao0610 lihongbiao0610 4年前

    提供思路:重点注意ConnectionProvider类的配置
    可能原因:spring的xml文件配置错误,或者是hIbernate版本和spring版本不匹配

    点赞 评论 复制链接分享

相关推荐