02
07
52
01
请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

老师,eclipse的console没报错,junit报错,看不懂~

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'shareThingCondition' not found. Available parameters are [pageSize, rowIndex, shareThingCodition, param3, param1, param2]

at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77)

at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)

at com.sun.proxy.$Proxy18.selectList(Unknown Source)

at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230)

at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:137)

at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:75)

at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:59)

at com.sun.proxy.$Proxy23.queryShareThingList(Unknown Source)

at com.share.shlife.dao.ShareThingDaoTest.testQueryShareThingList(ShareThingDaoTest.java:28)

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.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:252)

at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:94)

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:191)

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:538)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:760)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:460)

at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:206)

Caused by: org.apache.ibatis.binding.BindingException: Parameter 'shareThingCondition' not found. Available parameters are [pageSize, rowIndex, shareThingCodition, param3, param1, param2]

at org.apache.ibatis.binding.MapperMethod$ParamMap.get(MapperMethod.java:202)

at org.apache.ibatis.scripting.xmltags.DynamicContext$ContextAccessor.getProperty(DynamicContext.java:115)

at org.apache.ibatis.ognl.OgnlRuntime.getProperty(OgnlRuntime.java:2666)

at org.apache.ibatis.ognl.ASTProperty.getValueBody(ASTProperty.java:114)

at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)

at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:258)

at org.apache.ibatis.ognl.ASTChain.getValueBody(ASTChain.java:141)

at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)

at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:258)

at org.apache.ibatis.ognl.ASTNotEq.getValueBody(ASTNotEq.java:50)

at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)

at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:258)

at org.apache.ibatis.ognl.ASTAnd.getValueBody(ASTAnd.java:61)

at org.apache.ibatis.ognl.SimpleNode.evaluateGetValueBody(SimpleNode.java:212)

at org.apache.ibatis.ognl.SimpleNode.getValue(SimpleNode.java:258)

at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:467)

at org.apache.ibatis.ognl.Ognl.getValue(Ognl.java:431)

at org.apache.ibatis.scripting.xmltags.OgnlCache.getValue(OgnlCache.java:44)

at org.apache.ibatis.scripting.xmltags.ExpressionEvaluator.evaluateBoolean(ExpressionEvaluator.java:32)

at org.apache.ibatis.scripting.xmltags.IfSqlNode.apply(IfSqlNode.java:34)

at org.apache.ibatis.scripting.xmltags.MixedSqlNode.apply(MixedSqlNode.java:33)

at org.apache.ibatis.scripting.xmltags.TrimSqlNode.apply(TrimSqlNode.java:55)

at org.apache.ibatis.scripting.xmltags.MixedSqlNode.apply(MixedSqlNode.java:33)

at org.apache.ibatis.scripting.xmltags.DynamicSqlSource.getBoundSql(DynamicSqlSource.java:41)

at org.apache.ibatis.mapping.MappedStatement.getBoundSql(MappedStatement.java:292)

at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:81)

at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148)

at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141)

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.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433)

... 36 more


正在回答 回答被采纳积分+3

插入代码

1回答

翔仔 2018-03-05 01:41:07

同学好,你的错误非常明显,

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'shareThingCondition' not found. Available parameters are [pageSize, rowIndex, shareThingCodition, param3, param1, param2]

就说的是shareThingCondition这个要求的参数没有找到,请仔细检查相关配置

PS:之前已建议同学如暂无自我解决异常问题的能力,最好配置什么的和教程一致,包括各类命名,不然真要出问题实在不好精确帮你解答。同时也希望同学锻炼出自我定位问题和解决问题的能力,这个问题就比较明显,就按照上面的那个报错无解决,调试和查看配置

0 回复 有任何疑惑可以回复我~
  • 提问者 慕慕5257463 #1
    老师,其他都是正确的,但是就这一句加上就有问题了			<if
    				test="shareThingCondition.thinkKind != null and shareThingCondition.thingKind.shareKindId != null">
    				and share_thing.share_kind_id =
    				#{shareThingCondition.thingKind.shareKindId}
    			</if>
    Junit说shareThingCondition.thinkKind != null and shareThingCondition.thingKind.shareKindId != null"有问题,我反复订正,不知道什么问题
    回复 有任何疑惑可以回复我~ 2018-03-05 02:35:26
  • 提问者 慕慕5257463 #2
    啊,老师我发现了,是我自己眼睛瞎了~看错单词了
    回复 有任何疑惑可以回复我~ 2018-03-05 02:37:18
  • 翔仔 回复 提问者 慕慕5257463 #3
    千万不要通过巧合来解决问题 要知道如何利用报错信息发现并解决问题,刚刚那句错误的地方 好好回顾一下是怎么解决的 不然以后还会是一个问题
    回复 有任何疑惑可以回复我~ 2018-03-05 02:41:52
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号