org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [beans.xml]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.transaction.config.internalTransactionAdvisor': Cannot create inner bean '(inner bean)' of type [org.springframework.transaction.interceptor.TransactionInterceptor] while setting bean property 'transactionInterceptor'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)': Cannot resolve reference to bean 'txManager' while setting bean property 'transactionManager'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.jdbc.datasource.DataSourceTransationManager] for bean with name 'txManager' defined in class path resource [beans.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.jdbc.datasource.DataSourceTransationManager......
你搜搜看项目里面有没有这个类,没有就是少包了,有不止一个很可能是冲突了
哦,谢谢,那请问这个jar包的名称是什么呀?
追答这。。。打开spring的jar包就能看到全名就是上面那个啊,org.springframework.jdbc-3.0.5.RELEASE.jar。我的是3.0.5。你可能用的不一样。
本回答被提问者采纳jar包没导入吧?追问
哦,谢谢,那请问这里可以看的出什么jar包没有导入吗?
贴那段 xml出来细看
格式化一下文字啊。。。追问
谢谢!!!
你这个没有引入 spring的jdbc包(spring-jdbc.jar),org.springframework.jdbc.datasource.DataSourceTransactionManager 在此包中哦
我看你用的是spring2.5
那么位置在spring-framework-2.5.6\dist\modules\spring-jdbc.jar