在整合MyIbatis和struts2和Spring的时候。报错: 10
11:26:06,515INFO[DefaultListableBeanFactory]Pre-instantiatingsingletonsinorg.springfr...
11:26:06,515 INFO [DefaultListableBeanFactory] Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@e11a87: defining beans [dataSource,sqlSessionFactory,sqlSessionTemplate,doBusiness]; root of factory hierarchy
11:26:06,593 INFO [DefaultListableBeanFactory] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@e11a87: defining beans [dataSource,sqlSessionFactory,sqlSessionTemplate,doBusiness]; root of factory hierarchy
11:26:06,593 ERROR [ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/ibatis/mapping/DatabaseIdProvider
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:955)
at
求高手解决…… 展开
11:26:06,593 INFO [DefaultListableBeanFactory] Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@e11a87: defining beans [dataSource,sqlSessionFactory,sqlSessionTemplate,doBusiness]; root of factory hierarchy
11:26:06,593 ERROR [ContextLoader] Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]: Instantiation of bean failed; nested exception is java.lang.NoClassDefFoundError: org/apache/ibatis/mapping/DatabaseIdProvider
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:955)
at
求高手解决…… 展开
4个回答
展开全部
貌似是缺少jar包,也可能是你的applicationContext.xml文件错误!
Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]
根据这句找找!
Error creating bean with name 'sqlSessionFactory' defined in class path resource [applicationContext.xml]
根据这句找找!
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
mybatis-spring的jar包没有放到发布后的项目下面吧
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
最后解决了吗,我也遇到了类似的问题
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
下个最新的Mybatis包 3.2.1就好了
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询