嗨,我在运行Junit测试时遇到以下错误,请帮助我:
org.springframework.beans.factory.beancreationexception错误创建名为'sessionfactory'的bean在类路径中定义ressource [application-context.xml]调用methode init失败;嵌套的exeption org.hibernate.service.spi.ServiceExeption
答案 0 :(得分:0)
看着这条线
Caused by: java.lang.ClassCastException: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider cannot be cast to org.hibernate.service.jdbc.connections.spi.ConnectionProvider at
看来你正在使用hibernate3,尝试使用hibernate 4