Cannot find class: usertest

org.apache.ibatis.exceptions.PersistenceException: 
### Error building SqlSession.
### The error may exist in com/mybatis_stu/mapper/UserMapper.xml
### Cause: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: 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 'usertest'.  Cause: java.lang.ClassNotFoundException: Cannot find class: usertest
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:82)
at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:66)
at com.mybatis_stu.mapper.UserMapperTest.testFindUserById(UserMapperTest.java:26)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: org.apache.ibatis.builder.BuilderException: Error parsing SQL Mapper Configuration. Cause: 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 'usertest'.  Cause: java.lang.ClassNotFoundException: Cannot find class: usertest
at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:109)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.parse(XMLConfigBuilder.java:92)
at org.apache.ibatis.session.SqlSessionFactoryBuilder.build(SqlSessionFactoryBuilder.java:80)
... 25 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 'usertest'.  Cause: java.lang.ClassNotFoundException: Cannot find class: usertest
at org.apache.ibatis.builder.xml.XMLMapperBuilder.configurationElement(XMLMapperBuilder.java:120)
at org.apache.ibatis.builder.xml.XMLMapperBuilder.parse(XMLMapperBuilder.java:92)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.mapperElement(XMLConfigBuilder.java:322)
at org.apache.ibatis.builder.xml.XMLConfigBuilder.parseConfiguration(XMLConfigBuilder.java:107)
... 27 more
Caused by: org.apache.ibatis.builder.BuilderException: Error resolving class. Cause: org.apache.ibatis.type.TypeException: Could not resolve type alias 'usertest'.  Cause: java.lang.ClassNotFoundException: Cannot find class: usertest
at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:103)
at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:72)
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)
... 30 more
Caused by: org.apache.ibatis.type.TypeException: Could not resolve type alias 'usertest'.  Cause: java.lang.ClassNotFoundException: Cannot find class: usertest
at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:117)
at org.apache.ibatis.builder.BaseBuilder.resolveAlias(BaseBuilder.java:130)
at org.apache.ibatis.builder.BaseBuilder.resolveClass(BaseBuilder.java:101)
... 34 more
Caused by: java.lang.ClassNotFoundException: Cannot find class: usertest
at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:190)
at org.apache.ibatis.io.ClassLoaderWrapper.classForName(ClassLoaderWrapper.java:89)
at org.apache.ibatis.io.Resources.classForName(Resources.java:256)
at org.apache.ibatis.type.TypeAliasRegistry.resolveAlias(TypeAliasRegistry.java:113)

... 36 more



别名写错


博主设置当前文章不允许评论。

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 都引了还是不行

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 [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=http://img.bbs.csdn.net/upload/201705/21/1495374843_428196.png][/img]

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

私密
私密原因:
请选择设置私密原因
  • 广告
  • 抄袭
  • 版权
  • 政治
  • 色情
  • 无意义
  • 其他
其他原因:
120
出错啦
系统繁忙,请稍后再试