这个500是什么问题呀

来源:4-2 Dao层之更新店铺

慕设计9144567

2018-02-21

http://img.mukewang.com/szimg/5a8ce1e0000171af12140679.jpg

写回答

2回答

翔仔

2018-02-21

希望同学能锻炼出看错误定位问题的能力,这个是程序员必备的要求。这种错误一般可以看cause附近 这里是Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.xiehe.market.entity.Area'.  Cause: java.lang.ClassNotFoundException: Cannot find class: com.xiehe.market.entity.Area 也就是这个类定义没找到请仔细核对:)

0
3
慕设计9144567
回复
翔仔
恩恩。谢谢老师
2018-02-22
共3条回复

慕设计9144567

提问者

2018-02-21

二月 21, 2018 11:05:37 上午 org.apache.catalina.core.ApplicationContext log

信息: Initializing Spring FrameworkServlet 'spring-dispatcher'

二月 21, 2018 11:05:37 上午 org.springframework.web.servlet.DispatcherServlet initServletBean

信息: FrameworkServlet 'spring-dispatcher': initialization started

二月 21, 2018 11:05:37 上午 org.springframework.web.context.support.XmlWebApplicationContext prepareRefresh

信息: Refreshing WebApplicationContext for namespace 'spring-dispatcher-servlet': startup date [Wed Feb 21 11:05:37 CST 2018]; root of context hierarchy

二月 21, 2018 11:05:37 上午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions

信息: Loading XML bean definitions from file [C:\Users\x811\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Market\WEB-INF\classes\spring\spring-dao.xml]

二月 21, 2018 11:05:37 上午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions

信息: Loading XML bean definitions from file [C:\Users\x811\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Market\WEB-INF\classes\spring\spring-service.xml]

二月 21, 2018 11:05:37 上午 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitions

信息: Loading XML bean definitions from file [C:\Users\x811\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Market\WEB-INF\classes\spring\spring-web.xml]

二月 21, 2018 11:05:37 上午 org.mybatis.spring.mapper.ClassPathMapperScanner doScan

警告: No MyBatis mapper was found in '[com.xiehe.market.dao]' package. Please check your configuration.

二月 21, 2018 11:05:37 上午 org.springframework.web.context.support.XmlWebApplicationContext refresh

警告: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [C:\Users\x811\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Market\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:\Users\x811\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Market\WEB-INF\classes\mapper\AreaDao.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.xiehe.market.entity.Area'.  Cause: java.lang.ClassNotFoundException: Cannot find class: com.xiehe.market.entity.Area

二月 21, 2018 11:05:37 上午 org.springframework.web.servlet.DispatcherServlet initServletBean

严重: Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [C:\Users\x811\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Market\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:\Users\x811\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\Market\WEB-INF\classes\mapper\AreaDao.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.xiehe.market.entity.Area'.  Cause: java.lang.ClassNotFoundException: Cannot find class: com.xiehe.market.entity.Area

tory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1687)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1624)

... 34 more

Caused by: 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.xiehe.market.entity.Area'.  Cause: java.lang.ClassNotFoundException: Cannot find class: com.xiehe.market.entity.Area

at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:120)

at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:92)

at org.mybatis.spring.SqlSessionFactoryBean.buildSqlSessionFactory(SqlSessionFactoryBean.java:521)

... 37 more

Caused by: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.xiehe.market.entity.Area'.  Cause: java.lang.ClassNotFoundException: Cannot find class: com.xiehe.market.entity.Area

at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:118)

at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:74)

at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:135)

at org.apache.ibatis.builder.xml.XMLMapperBuilder.buildStatementFromContext(XMLMapperBuilder.java:128)

at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:118)

... 39 more

Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'com.xiehe.market.entity.Area'.  Cause: java.lang.ClassNotFoundException: Cannot find class: com.xiehe.market.entity.Area

at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:120)

at org.apache.ibatis.builder.BaseBuilder.resolveAlias(BaseBuilder.java:149)

at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:116)

... 43 more

Caused by: java.lang.ClassNotFoundException: Cannot find class: com.xiehe.market.entity.Area

at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:200)

at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:89)

at org.apache.ibatis.io.Resources.classForName(Resources.java:261)

at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:116)

... 45 more


0
0

Java双版本(SSM到SpringBoot)校园商铺全栈开发

SSM商铺V1.0,解决毕设痛点;SpringBoot商铺V2.0,满足工作刚需

5137 学习 · 8152 问题

查看课程