问答详情
源自:5-2 配置去掉Hibernate的配置文件-Spring整合Hibernate

配置Hibernate冲突

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.service.spi.ServiceException: Unable to create requested service [org.hibernate.engine.jdbc.connections.spi.ConnectionProvider]

提问者:qq_杰哥来说两句_0 2017-04-20 20:58

个回答

  • Mrzhang1
    2017-05-05 10:42:26

    改成hibernate4真的有用   厉害了,感谢

  • Sophomore
    2017-04-23 23:40:11

    因为spring在3.1之后的版本中把 AnnotationSessionFactoryBean与LocalSessionFactoryBean集成到了一起,统一用org\springframework\orm\hibernate4\LocalSessionFactoryBean。 不再有AnnotationSessionFactoryBean类; 但是org.springframework.orm-3.1.1.RELEASE.jar 依然保留有org\springframework\orm\hibernate3这个包,这是为了向下兼容。所以改成hibernate4即可!

  • 黑窝
    2017-04-21 13:39:40

    我也一样

  • qq_杰哥来说两句_0
    2017-04-20 20:58:56

    不能创建表