Invalid bound statement (not found)
来源:8-7 商品编辑之后端开发上
慕粉1556544580
2021-01-27
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.imooc.o2o.dao.ProductDao.queryProductById
at org.apache.ibatis.binding.MapperMethodSqlCommand.<init>(MapperMethod.java:235)atorg.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:53)atorg.apache.ibatis.binding.MapperProxy.lambdaSqlCommand.<init>(MapperMethod.java:235)
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:53)
at org.apache.ibatis.binding.MapperProxy.lambdaSqlCommand.<init>(MapperMethod.java:235)atorg.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:53)atorg.apache.ibatis.binding.MapperProxy.lambdacachedMapperMethod0(MapperProxy.java:62)atjava.util.concurrent.ConcurrentHashMap.computeIfAbsent(UnknownSource)atorg.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:62)atorg.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:57)atcom.sun.proxy.0(MapperProxy.java:62)
at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(Unknown Source)
at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:62)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:57)
at com.sun.proxy.0(MapperProxy.java:62)atjava.util.concurrent.ConcurrentHashMap.computeIfAbsent(UnknownSource)atorg.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:62)atorg.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:57)atcom.sun.proxy.Proxy29.queryProductById(Unknown Source)
at com.imooc.o2o.dao.ProductDaoTest.testCQueryProductByProductId(ProductDaoTest.java:99)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:84)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:89)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:41)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:541)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:763)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:463)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:209)
!这是测试代码,并没有报错(http://img1.sycdn.imooc.com/szimg/6010536a091b647b00000000.jpg)
!这是Dao层的接口(http://img.mukewang.com/szimg/60105375097471c219201080.jpg)
这是Mapper中的XML,id也对,我看参数也没错(http://img.mukewang.com/szimg/6010537f09a2078319201080.jpg)
我看这路径啥的也都对,怎么会报找不到的错啊?没解决了。
1回答
-
慕粉1556544580
提问者
2021-01-27
和视频对了对,也没发现哪里不对啊!
012021-01-27
相似问题