这个500是什么问题呀
来源:4-2 Dao层之更新店铺
慕设计9144567
2018-02-21

2回答
-
希望同学能锻炼出看错误定位问题的能力,这个是程序员必备的要求。这种错误一般可以看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 也就是这个类定义没找到请仔细核对:)
032018-02-22 -
慕设计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
00
相似问题