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

秒杀项目seckill500错误

秒杀项目seckill500错误

nanfeiyan 2017-01-16 10:14:28
严重: Context initialization failedorg.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) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)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 at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:120) at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:92)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)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)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)一月 16, 2017 10:00:12 上午 org.apache.catalina.core.ApplicationContext log严重: StandardWrapper.Throwableorg.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) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:736) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480) at org.springframework.web.servlet.FrameworkServlet.configureAndRefreshWebApplicationContext(FrameworkServlet.java:664) at org.springframework.web.servlet.FrameworkServlet.createWebApplicationContext(FrameworkServlet.java:630) 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 moreCaused 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 moreCaused 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 moreCaused 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 moreCaused 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一月 16, 2017 10:00:12 上午 org.apache.catalina.core.StandardWrapperValve invoke严重: Allocate exception for servlet dispatcherjava.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) at org.apache.ibatis.builder.BaseBuilder.resolveAlias(BaseBuilder.java:149)
查看完整描述

4 回答

?
安小乐

TA贡献2条经验 获得超1个赞

你好,给你提个建议吧:在提问时,把异常信息复制成文字,再发一份异常关键信息截图,以便格式化方便看问题原因。


首先看一下是不是下面的错误:

//img1.sycdn.imooc.com//58f80f8e0001cd9719201048.jpg

上面错误的解决方法:

//img1.sycdn.imooc.com//58f810180001111812900652.jpg

查看完整回答
1 反对 回复 2017-04-20
?
xixiyingyi

TA贡献18条经验 获得超19个赞

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

错误信息说解析不了实体类Seckill,估计是这个类的路径弄错了~~

查看完整回答
1 反对 回复 2017-01-16
  • 安小乐
    安小乐
    你好,问题原因及解决方法请参考上面我的回复。谢谢~
?
分我一丁目

TA贡献1条经验 获得超0个赞

你好,请问这个问题解决了吗,同样困扰了我很久

查看完整回答
反对 回复 2017-02-19
  • 4 回答
  • 0 关注
  • 2715 浏览

添加回答

举报

0/150
提交
取消
意见反馈 帮助中心 APP下载
官方微信