2013年12月13日星期五

MyBatis Error : Mapped Statements collection does not contain value for

java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for uk.co.argylesoftware.erf.framework.zmoa.persistence.FinanceDOMapper.getFinances
at org.apache.ibatis.session.Configuration $ StrictMap.get (Configuration.java: 593)
at org.apache.ibatis.session.Configuration.getMappedStatement (Configuration.java: 393)
at org.apache.ibatis.binding.MapperMethod.setupCommandType (MapperMethod.java: 160)
at org.apache.ibatis.binding.MapperMethod . (MapperMethod.java: 48)
at org.apache.ibatis.binding.MapperProxy.invoke (MapperProxy.java: 37)
at $ Proxy75.getFinances (Unknown Source)
at uk.co.argylesoftware.erf.framework.zmoa.services.impl.FinanceServiceMgrImpl.getFinances (FinanceServiceMgrImpl.java: 77)
at uk.co.argylesoftware.erf.framework.zmoa.services.impl.FinanceServiceMgrImplTest.testGetFinances (FinanceServiceMgrImplTest.java: 22)
at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java: 39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java: 25)
at java.lang.reflect.Method.invoke (Method.java: 597)
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.internal.runners.statements.RunBefores.evaluate (RunBefores.java: 28)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate (RunBeforeTestMethodCallbacks.java: 74)
at org.junit.internal.runners.statements.RunAfters.evaluate (RunAfters.java: 31)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate (RunAfterTestMethodCallbacks.java: 82)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate (SpringRepeat.java: 72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild (SpringJUnit4ClassRunner.java: 240)
at org.junit.runners.BlockJUnit4ClassRunner.runChild (BlockJUnit4ClassRunner.java: 44)
at org.junit.runners.ParentRunner.runChildren (ParentRunner.java: 180)
at org.junit.runners.ParentRunner.access $ 000 (ParentRunner.java: 41)
at org.junit.runners.ParentRunner $ 1.evaluate (ParentRunner.java: 173)
at org.junit.internal.runners.statements.RunBefores.evaluate (RunBefores.java: 28)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate (RunBeforeTestClassCallbacks.java: 61)
at org.junit.internal.runners.statements.RunAfters.evaluate (RunAfters.java: 31)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate (RunAfterTestClassCallbacks.java: 70)
at org.junit.runners.ParentRunner.run (ParentRunner.java: 220)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run (SpringJUnit4ClassRunner.java: 180)
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)
read online many solutions , but they are not resolved, look expert advice
------ Solution ------------------ --------------------------
exception information from the point of view of your Finances Crossing incorrect parameter
---- - For reference only ---------------------------------------

------ For reference only ------------------------- --------------
did not find incorrect parameters ah

------ For reference only ---------------------------------- -----
abnormalities reported since this came out . You take seriously than the next .
------ For reference only -------------------------------------- -
this is Dao layer interface
@ Repository
public interface FinanceDOMapper
{
List getFinances (@ Param ("year") Integer year, @ Param ("moneyAmount") Double moneyAmount, @ Param ("occurrenceDate") Date occurrenceDate,
@ Param ("employee") String employee, @ Param ("type") Integer type, @ Param ("describe") String describe,
RowBounds rb);
}
This is Mapper.xml


















------ For reference only ----------------------------- ----------
online that this error does not match what the namespace but there is no problem . I also compared the parameters , the top is the code of trouble to help me see it, I am a rookie , it is really hard to understand , plagued by a long time
------ For reference only ------ ---------------------------------
mapper.xml file path and configuration file does not match
- ----- For reference only ---------------------------------------


can specify under what, I also appeared this error, but I am running properly before running After mvn clean package-DskipTests
,
The next day they reported the error to open it.
------ For reference only -------------------------------------- -
uk.co.argylesoftware.erf.framework.zmoa.persistence.FinanceDOMapper.getFinances

find your line


in your java file, there is this line
sqlSession.select (uk.co.argylesoftware.erf.framework.zmoa.persistence.FinanceDOMapper.getFinances);

you write namespace certainly does not match the place !
------ For reference only -------------------------------------- -

themselves the said solution is to force ! Compared to the landlord than a mile
------ For reference only ------------------------------ ---------
is the problem
mybatis-config.xml configuration file

没有评论:

发表评论