• IBatis异常: Cannot find class: VARCHAR


      今天再项目里添加新功能时,突然爆出 

      org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountSeqService': Injection of autowired dependencies failed; nested exception is     org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.tjgjk.mapper.account.card.AccountSeqMapper   com.tjgjk.service.account.card.impl.AccountSeqServiceImpl.accountSeqMapper; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type   [com.tjgjk.mapper.account.card.AccountSeqMapper] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations:   {@org.springframework.beans.factory.annotation.Autowired(required=true)}
      Related cause: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountSeqMapper' defined in file [E: omcat8apache-tomcat-8.0.39-windows-x86apache- tomcat-  8.0.39wtpwebapps jgjkWEB-INFclassescom jgjkmapperaccountcardAccountSeqMapper.class]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException:     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 'VARCHAR'. Cause: java.lang.ClassNotFoundException: Cannot find class: VARCHAR
      at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:334)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1214)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:543)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
      at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:772)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:839)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:446)
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:328)
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4853)
      at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5314)
      at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1408)
      at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1398)
      at java.util.concurrent.FutureTask.run(FutureTask.java:262)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at java.lang.Thread.run(Thread.java:745)

      当时就一顿好找,因为错误中提示是在 解析XML文件时出错,所以在XML里来来回回查找三、四遍,愣是没找到具体错误原因,

        然后是在受不了了就去Google了下,没想到具体原因实在是让人难以启齿啊,见图

      

      JavaType对应的是类里的数据类型,jdbcType对应数据库里的类型

      jdbcType被我写成了javaType,想哭,也在此提醒下各位小伙伴,使用快捷键时一定要看好是不是所对应的方法,

        以此,给自己一个警告。

  • 相关阅读:
    Operation Queue
    Dispatch Sources
    Base64编码详解
    属性存取、直接访问实例变量
    管理关联对象和NSDictionary区别
    3个Block替换Delegate的场景
    Objective-C消息机制
    Dispatch Queues调度队列
    DNS64/NAT64 Networks(解决IPv6审核被拒)
    NSObject的Initialize与Load方法
  • 原文地址:https://www.cnblogs.com/zhuangfei/p/7514224.html
Copyright © 2020-2023  润新知