org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误记录
来源:互联网 发布:python scrapy 教程 编辑:程序博客网 时间:2024/06/05 15:40
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.cdm.dao.IUserDao.selectByPrimaryKeyat org.apache.ibatis.binding.MapperMethod$SqlCommand.(MapperMethod.java:189)at org.apache.ibatis.binding.MapperMethod.(MapperMethod.java:43)at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:58)at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:51)at com.sun.proxy.$Proxy15.selectByPrimaryKey(Unknown Source)at com.cdm.service.impl.IUserServiceImpl.getUserById(IUserServiceImpl.java:20)at test.TestMyBatis.test1(TestMyBatis.java:32)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:601)at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:232)at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:89)at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)at org.junit.runners.ParentRunner.run(ParentRunner.java:309)at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:175)at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
如上错误信息,分析原因是由于UserMapper.xml中的namespace没有与dao接口中的匹配在mybatis中,映射文件中的namespace是用于绑定Dao接口的,即面向接口编程。当你的namespace绑定接口后,你可以不用写接口实现类,mybatis会通过该绑定自动帮你找到对应要执行的SQL语句- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误记录
- mybaits错误记录:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
- 立即执行函数IIFE
- leg_交易方
- LR接口测试REST的接口
- Android Studio git首次部署
- perl put 请求创建elasticsearch 索引
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误记录
- juicer.js 使用 示例
- 插件化知识详细分解及原理 之代理,hook,反射
- C语言学习------1.3输入输出
- iOS攻防
- web移动端Fixed在Input获取焦点时ios下产生的BUG及处理
- js中创建正则表达式的两种方式
- 谈谈秒杀场景
- java虚拟机GC是这样回收对象的吗?