Error creating bean with name 'sqlSessionFactory'
来源:9-1 首页后台的开发
慕丝9530589
2018-06-10
警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [C:\Program Files\Apache Software Foundation\Tomcat 8.0_Tomcat8.0\wtpwebapps\o2o\WEB-INF\classes\spring\spring-dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [C:\Program Files\Apache Software Foundation\Tomcat 8.0_Tomcat8.0\wtpwebapps\o2o\WEB-INF\classes\mapper\ProductDao.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.tmy.o2o.entity.ProductImg'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.tmy.o2o.entity.ProductImg
六月 10, 2018 10:37:41 上午 org.springframework.web.servlet.DispatcherServlet initServletBean
严重: Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [C:\Program Files\Apache Software Foundation\Tomcat 8.0_Tomcat8.0\wtpwebapps\o2o\WEB-INF\classes\spring\spring-dao.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [C:\Program Files\Apache Software Foundation\Tomcat 8.0_Tomcat8.0\wtpwebapps\o2o\WEB-INF\classes\mapper\ProductDao.xml]'; nested exception is org.apache.ibatis.builder.BuilderException: Error parsing Mapper XML. Cause: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.tmy.o2o.entity.ProductImg'. Cause: java.lang.ClassNotFoundException: Cannot find class: com.tmy.o2o.entity.ProductImg
1回答
-
翔仔
2018-06-10
同学好,此类问题非常明显,期待你独立解决顺便加强自我定位问题和解决问题的能力。这里我们一般看caused by 附近的错误,这里是说的你的com.xxxxxx.ProductImg这个类不存在 请仔细检查
00
相似问题