Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 12110 invoked from network); 20 Aug 2008 16:21:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Aug 2008 16:21:47 -0000 Received: (qmail 46312 invoked by uid 500); 20 Aug 2008 16:21:45 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 45641 invoked by uid 500); 20 Aug 2008 16:21:44 -0000 Mailing-List: contact user-java-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user-java@ibatis.apache.org Delivered-To: mailing list user-java@ibatis.apache.org Received: (qmail 45630 invoked by uid 99); 20 Aug 2008 16:21:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Aug 2008 09:21:44 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [76.13.9.21] (HELO web65401.mail.ac4.yahoo.com) (76.13.9.21) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 20 Aug 2008 16:20:47 +0000 Received: (qmail 81854 invoked by uid 60001); 20 Aug 2008 16:21:15 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=2EtikS2cJsPD0E7nCsE3DK95r/UnZ6Ha2N0EFNMYEtIa4Pf+VnIOQ3ej6C03H9SsP9/uMbWPy14vJY5ejWq3XcPdNyI+ZtwiaXX6qJZgYhg+GAT8O1Uc2KKSDv1Gfnd3xdT70vD0k/NJQMb7eofjG4lmrSUWulIN3mtI3lOks4Y=; X-YMail-OSG: PNzTL34VM1lKwUd7L6jX200n_5jm56hL669ExwJiS2gBYaturn96GaTGOAHBdbbc2g-- Received: from [171.192.0.10] by web65401.mail.ac4.yahoo.com via HTTP; Wed, 20 Aug 2008 09:21:15 PDT Date: Wed, 20 Aug 2008 09:21:15 -0700 (PDT) From: Seth Helstrip Reply-To: seth.laurie@helstrip.co.uk Subject: Re: The error occurred while applying a parameter map. To: user-java@ibatis.apache.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <602664.81461.qm@web65401.mail.ac4.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org You're not the Jeff Butler who I worked with at Oracle in 2000 are you? --- Jeff Butler wrote: > deptNum and year must be properties of a single > parameter object (or a > Map). The method you are calling passes NO > parameter objects to iBATIS - > arg1 and arg2 in this case are skip and max > parameters for paging support. > > Also, you don't need to specify both column and > columnIndex in your result > mappings. If you specify both the columnIndex will > be, > essentially, ignored. > > Jeff Butler > > On Wed, Aug 20, 2008 at 10:29 AM, macdoug1 > wrote: > > > > > I'm using Spring framework with iBatis and I'm > having an issue with using > > the > > sqlMapClient.queryForList(String arg, int arg1, > int arg2). Anyway the > > Transfer Object is deptNum and year are defined as > String's. Also the table > > defines dept_num and year as varchars. Here's the > resultMap: > > class="com.talisen.domain.DeptBsDetail"> > > columnIndex="1"/> > > columnIndex="2"/> > > column="month_date" columnIndex="3"/> > > columnIndex="4"/> > > columnIndex="5"/> > > column="usage_cost" columnIndex="6"/> > > column="material_cost" columnIndex="7"/> > > column="labor_cost" columnIndex="8"/> > > column="serv_cost" columnIndex="9"/> > > column="total_cost" columnIndex="10"/> > > columnIndex="11"/> > > column="description" columnIndex="12"/> > > column="ledger_code" columnIndex="13"/> > > columnIndex="14"/> > > > > > > > > > > Here's the full error I'm getting: > > > 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 > > > === message truncated ===