Announcement Announcement Module
Collapse
No announcement yet.
Help! The error occurred while applying a parameter map. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Help! The error occurred while applying a parameter map.

    Having an issue with iBatis. I can't seem to figure out what the issue is here. I thought it might be that the fields defined in the TO were strings but it didn't seem to matter when I changed them. Anyway I'm trying to call the db with queryForList using sqlMapClient instead of the sqlMapClientTemplate. The reason is that the template didn't have a queryForList that would take more then one parmeter, like so, queryForList(String arg0, int arg1, int arg2). I'm trying to get a list of results back so that I can iterate through them if I use queryForObject and set the values I"m unsure of how I can get multiple result sets? Anyway here's the error I'm currently getting:
    Code:
    com.ibatis.common.jdbc.exception.NestedSQLException:   
    --- The error occurred in com/talisen/dao/ibatis/maps/DeptBsDetail.xml.  
    --- The error occurred while applying a parameter map.  
    --- Check the getDeptBudgetDetailbyDeptNumAndYear-InlineParameterMap.  
    --- Check the parameter mapping for the 'year' property.  
    --- Cause: java.lang.ArrayIndexOutOfBoundsException: 1
    	at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:204)
    	at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryForList(MappedStatement.java:139)
    	at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:567)
    	at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:126)
    	at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:130)
    	at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:106)
    	at com.talisen.dao.ibatis.SqlMapDeptBsDetailDao.getDeptBudgetDetail(SqlMapDeptBsDetailDao.java:37)
    	at com.talisen.domain.logic.NestleDataFetcherImpl.getDeptBudgetDetail(NestleDataFetcherImpl.java:58)
    	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:585)
    	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:310)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
    	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)
    	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
    	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    	at $Proxy16.getDeptBudgetDetail(Unknown Source)
    	at com.talisen.domain.util.XMLBuilder.createDepartmentXML(XMLBuilder.java:254)
    	at com.talisen.domain.util.XMLBuilder.createXML(XMLBuilder.java:223)
    	at com.talisen.service.NestleService.handleRequestInternal(NestleService.java:143)
    	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
    	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
    	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:809)
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
    	at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
    	at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:411)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:290)
    	at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:202)
    	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    	at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
    	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
    	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
    	at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
    	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
    	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
    	at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:270)
    	at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
    	at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
    	at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
    	at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:339)
    	at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:261)
    	at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:212)
    	at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:361)
    	at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
    	at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106)
    Caused by: java.lang.ArrayIndexOutOfBoundsException: 1
    	at com.ibatis.sqlmap.engine.mapping.parameter.ParameterMap.setParameter(ParameterMap.java:153)
    	at com.ibatis.sqlmap.engine.mapping.parameter.ParameterMap.setParameters(ParameterMap.java:126)
    	at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:183)
    	at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.sqlExecuteQuery(MappedStatement.java:221)
    	at com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:189)
    Anyone have any idea on what I can do or what might be causing this?

  • #2
    Got it!

    It appears that I really needed to use the queryForList(String arg, Object arg1); create a hashmap and pass them in as an object.

    Comment

    Working...
    X