mybatis异常: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:\tomcat8\apache-tomcat-8.0.39-windows-x86\apache- tomcat-  8.0.39\wtpwebapps\tjgjk\WEB-INF\classes\com\tjgjk\mapper\account\card\AccountSeqMapper.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.

  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.

  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.

  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.

  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.

  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.

  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.

  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.

  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.

  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.

  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.

  at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.

  at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.

  at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.

  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.

  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.

  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.

  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.

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

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

  IBatis异常: <wbr>Cannot <wbr>find <wbr>class: <wbr>VARCHAR

 

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

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

    以此,给自己一个警告。

Cannot find class [com.fh.interceptor.shiro.ShiroRealm]

05-21

我在编译项目时,总是报错:rn017-05-21 21:49:55 -955 [localhost-startStop-1] INFO - Bean 'org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor#0' of type [class org.springframework.aop.support.DefaultBeanFactoryPointcutAdvisor] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)rn2017-05-21 21:49:56 -1112 [localhost-startStop-1] ERROR - Context initialization failedrnorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shiroFilter' defined in class path resource [spring/ApplicationContext.xml]: Cannot resolve reference to bean 'securityManager' while setting bean property 'securityManager'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'securityManager' defined in class path resource [spring/ApplicationContext.xml]: Cannot resolve reference to bean 'ShiroRealm' while setting bean property 'realm'; nested exception is org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [com.fh.interceptor.shiro.ShiroRealm] for bean with name 'ShiroRealm' defined in class path resource [spring/ApplicationContext.xml]; nested exception is java.lang.ClassNotFoundException: com.fh.interceptor.shiro.ShiroRealmrnrn大概就是说没有找到com.fh.interceptor.shiro.ShiroRealm这个类,可是这个类明明是在src里有的呀rn[img=https://img-bbs.csdn.net/upload/201705/21/1495374843_428196.png][/img] 论坛

Cannot find class [org.springframework.jdbc.datasource.DriverManagerDataSource]

11-20

2009-11-20 12:19:33 org.springframework.context.support.AbstractApplicationContext prepareRefreshrn信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@18558d2: display name [org.springframework.context.support.ClassPathXmlApplicationContext@18558d2]; startup date [Fri Nov 20 12:19:33 CST 2009]; root of context hierarchyrn2009-11-20 12:19:34 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitionsrn信息: Loading XML bean definitions from class path resource [spring/chapter4/dao/game.xml]rn2009-11-20 12:19:34 org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactoryrn信息: Bean factory for application context [org.springframework.context.support.ClassPathXmlApplicationContext@18558d2]: org.springframework.beans.factory.support.DefaultListableBeanFactory@a8c488rn2009-11-20 12:19:34 org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletonsrn信息: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@a8c488: defining beans [dataSource,userDao]; root of factory hierarchyrn2009-11-20 12:19:34 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry destroySingletonsrn信息: Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@a8c488: defining beans [dataSource,userDao]; root of factory hierarchyrnException in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.jdbc.datasource.DriverManagerDataSource] for bean with name 'dataSource' defined in class path resource [spring/chapter4/dao/game.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.jdbc.datasource.DriverManagerDataSourcern at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1141)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:524)rn at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1177)rn at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:758)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:422)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:728)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:380)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)rn at spring.chapter4.dao.TestUserDAO.main(TestUserDAO.java:8)rnCaused by: java.lang.ClassNotFoundException: org.springframework.jdbc.datasource.DriverManagerDataSourcern at java.net.URLClassLoader$1.run(Unknown Source)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)rn at java.lang.ClassLoader.loadClass(Unknown Source)rn at org.springframework.util.ClassUtils.forName(ClassUtils.java:211)rn at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:385)rn at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1138)rn ... 9 morern看配置文件都没错的啊,该怎么解决~ 论坛

Cannot find class [org.springframework.scheduling.timer.ScheduledTimerTask] for

05-13

2014-5-13 12:06:38 org.springframework.context.support.AbstractApplicationContext prepareRefreshrn信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@5ffb18: startup date [Tue May 13 12:06:38 CST 2014]; root of context hierarchyrn2014-5-13 12:06:38 org.springframework.beans.factory.xml.XmlBeanDefinitionReader loadBeanDefinitionsrn信息: Loading XML bean definitions from class path resource [beans.xml]rnException in thread "main" org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.scheduling.timer.ScheduledTimerTask] for bean with name 'scheduledTimerTask' defined in class path resource [beans.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.scheduling.timer.ScheduledTimerTaskrn at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1327)rn at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:594)rn at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1396)rn at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:959)rn at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:683)rn at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)rn at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)rn at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)rn at com.lyy.test.mask1.main(mask1.java:15)rnCaused by: java.lang.ClassNotFoundException: org.springframework.scheduling.timer.ScheduledTimerTaskrn at java.net.URLClassLoader$1.run(URLClassLoader.java:200)rn at java.security.AccessController.doPrivileged(Native Method)rn at java.net.URLClassLoader.findClass(URLClassLoader.java:188)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:306)rn at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)rn at java.lang.ClassLoader.loadClass(ClassLoader.java:251)rn at org.springframework.util.ClassUtils.forName(ClassUtils.java:236)rn at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:392)rn at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1348)rn at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1319)rn ... 9 morernrnrn[code=text]rnrnrn rn rn rnrn rn rn rn rn rn rnrn rnrn rn rn rn rn rnrnrnrnrn[/code]rnrn为什么了 已经把所有的spring 都引了还是不行 论坛

没有更多推荐了,返回首页