为了账号安全,请及时绑定邮箱和手机立即绑定

秒杀课程项目seckill报错HTTP Status 500 - Servlet.init() for servlet dispatcher threw exception;

一月 11, 2017 3:03:22 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin

警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:seckill' did not find a matching property.

警告: No MyBatis mapper was found in '[org.seckill.dao]' package. Please check your configuration.

警告: Exception encountered during context initialization - cancelling refresh attempt

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [D:\workSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\seckill\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 [D:\workSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\seckill\WEB-INF\classes\mapper\SeckillDao.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 'Seckill'.  Cause: java.lang.ClassNotFoundException: Cannot find class: Seckill

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

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)

Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\workSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\seckill\WEB-INF\classes\mapper\SeckillDao.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 'Seckill'.  Cause: java.lang.ClassNotFoundException: Cannot find class: Seckill

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

at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:343)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1633)

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

... 33 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 'Seckill'.  Cause: java.lang.ClassNotFoundException: Cannot find class: Seckill

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:466)

... 36 more

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

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)

... 38 more

Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Seckill'.  Cause: java.lang.ClassNotFoundException: Cannot find class: Seckill

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)

... 42 more

Caused by: java.lang.ClassNotFoundException: Cannot find class: Seckill

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)

... 44 more


一月 11, 2017 3:03:27 下午 org.springframework.web.servlet.DispatcherServlet initServletBean

严重: Context initialization failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [D:\workSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\seckill\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 [D:\workSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\seckill\WEB-INF\classes\mapper\SeckillDao.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 'Seckill'.  Cause: java.lang.ClassNotFoundException: Cannot find class: Seckill

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

Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'Seckill'.  Cause: java.lang.ClassNotFoundException: Cannot find class: Seckill

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)

... 42 more

Caused by: java.lang.ClassNotFoundException: Cannot find class: Seckill

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)

... 44 more


一月 11, 2017 3:03:27 下午 org.apache.catalina.core.ApplicationContext log

严重: StandardWrapper.Throwable

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlSessionFactory' defined in file [D:\workSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\seckill\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 [D:\workSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\seckill\WEB-INF\classes\mapper\SeckillDao.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 'Seckill'.  Cause: java.lang.ClassNotFoundException: Cannot find class: Seckill

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

Caused by: org.springframework.core.NestedIOException: Failed to parse mapping resource: 'file [D:\workSpace\.metadata\.plugins\org.eclipse.wst.server.core\tmp3\wtpwebapps\seckill\WEB-INF\classes\mapper\SeckillDao.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 'Seckill'.  Cause: java.lang.ClassNotFoundException: Cannot find class: Seckill

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

at org.mybatis.spring.SqlSessionFactoryBean.afterPropertiesSet(SqlSessionFactoryBean.java:343)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 'Seckill'.  Cause: java.lang.ClassNotFoundException: Cannot find class: Seckill

添加回答

5回答
Could not resolve type alias 'Seckill'.  Cause: java.lang.ClassNotFoundException: Cannot find class: Seckill

看一下配置文件的配置


已被提问者采纳 赞同 反对 0个回复
未知生物
你还没有登录,请先登录注册慕课网帐号

回复
2017-01-12 鱿鱼酱

 

Could not resolve type alias 'Seckill'.  Cause: java.lang.ClassNotFoundException: Cannot find class: Seckill


赞同 反对 0个回复
未知生物
你还没有登录,请先登录注册慕课网帐号

回复
2017-01-12 提问者 nanfeiyan

 

我qq:1626638807,可以加我详细介绍问题情况,这个问题困扰我好长时间了,请大家帮忙下,谢谢!

赞同 反对 0个回复
未知生物
你还没有登录,请先登录注册慕课网帐号

回复
2017-01-12 提问者 nanfeiyan

 

此问题还未解决,请大家帮忙解决下,万分感谢!

赞同 反对 0个回复
未知生物
你还没有登录,请先登录注册慕课网帐号

回复
2017-01-11 提问者 nanfeiyan

 

@路人 加我qq:1626638807交流下

赞同 反对 0个回复
未知生物
你还没有登录,请先登录注册慕课网帐号

回复
意见反馈 常见问题 APP下载
官方微信