Return-Path: Mailing-List: contact ibatis-user-java-help@incubator.apache.org; run by ezmlm Delivered-To: mailing list ibatis-user-java@incubator.apache.org Received: (qmail 29469 invoked by uid 99); 28 Jan 2005 15:26:37 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=RCVD_BY_IP,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: domain of larry.meadors@gmail.com designates 64.233.184.192 as permitted sender) Received: from wproxy.gmail.com (HELO wproxy.gmail.com) (64.233.184.192) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 28 Jan 2005 07:26:36 -0800 Received: by wproxy.gmail.com with SMTP id 69so412375wra for ; Fri, 28 Jan 2005 07:26:34 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:references; b=S7WYCbtkOjKiGlYweVAux6AbWj1FXw2Um3CowosOXqiM9lkvYUnMLzCeld5/YYzgdVpFxbegaGZozWprZJK/QxedCOIJTJJ15s/uBgyzo9BH5sAdfVpQ5nWG6k7HUb8A5pvvQOT/XafX3zbfvQAV3B86eBYLENy4/TvePOpIhj0= Received: by 10.54.31.39 with SMTP id e39mr189542wre; Fri, 28 Jan 2005 07:26:34 -0800 (PST) Received: by 10.54.5.19 with HTTP; Fri, 28 Jan 2005 07:26:33 -0800 (PST) Message-ID: Date: Fri, 28 Jan 2005 08:26:33 -0700 From: Larry Meadors Reply-To: Larry Meadors To: ibatis-user-java@incubator.apache.org Subject: Re: Two separate map configs In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: X-Virus-Checked: Checked Nah, DAO is super simple to use. http://reumann.net/struts/ibatisLesson1.do This covers an older version, but the one and two are very similar. Larry On Fri, 28 Jan 2005 10:23:23 -0500, Akins, Greg wrote: > To be honest I was intimidated by learning that. > > I had used Hibernate; so apart from getting up to speed on Ibatis; at > least I was familiar with Persistence layers.. > > However, I haven't used a DAO framework and am concerned that I won't be > able to get up to speed quickly enough. > > -----Original Message----- > From: Brandon Goodin [mailto:brandon.goodin@gmail.com] > Sent: Friday, January 28, 2005 10:11 AM > To: ibatis-user-java@incubator.apache.org > Subject: Re: Two separate map configs > > > yeah... use the DAO framework. :D > > On Thu, 27 Jan 2005 16:55:56 -0500, Akins, Greg > wrote: > > OK, I stripped out my DAO objects for the second mapping (and the old > > tests; and the new tests work... ) leading me to believe that I have > > not reset an instance of SqlMapClient. > > > > I'll have to rewrite my DAO super classes... Can anyone point me to a > > good pattern for constructing those (since mine obviously sucked:') > > > > Thanks for the pointers. > > > > -----Original Message----- > > From: Clinton Begin [mailto:clinton.begin@gmail.com] > > Sent: Thursday, January 27, 2005 2:12 PM > > To: Akins, Greg > > Cc: ibatis-user-java@incubator.apache.org > > Subject: Re: Two separate map configs > > > > Greg, > > > > Do you have two SqlMapClient instances? (you should) > > > > Cheers, > > Clinton > > > > On Thu, 27 Jan 2005 13:55:53 -0500, Akins, Greg > > wrote: > > > Thanks... I'm not getting any other errors when I run this. I can > > > post the rest of the code, but basically I'm Querying by calling > > > > > > Object prod = sqlMap.queryForObject("getWare", srchObj.getName()) ; > > > > > > And am getting this stacktrace from my tests. > > > > > > com.ibatis.sqlmap.client.SqlMapException: There is no statement > > > named getWare in this SqlMap. > > > at > > > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.getMappedStatem > > > en > > > t( > > > SqlMapExecutorDelegate.java:288) > > > at > > > > > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(Sq > > lM > > > apExecutorDelegate.java:552) > > > at > > > > > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(Sq > > lM > > > apExecutorDelegate.java:536) > > > at > > > > > com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapS > > es > > > sionImpl.java:97) > > > at > > > > > com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapCl > > ie > > > ntImpl.java:69) > > > at > > > com.amervideo.ehold.dao.MesBaseDAO.getObject(MesBaseDAO.java:68) > > > at > > > com.amervideo.ehold.dao.WareDAO.getObjectByName(WareDAO.java:22) > > > at eHoldTest.TestWareDAO.testGetWare(TestWareDAO.java:39) > > > 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 junit.framework.TestCase.runTest(TestCase.java:154) > > > at junit.framework.TestCase.runBare(TestCase.java:127) > > > at junit.framework.TestResult$1.protect(TestResult.java:106) > > > at > > junit.framework.TestResult.runProtected(TestResult.java:124) > > > at junit.framework.TestResult.run(TestResult.java:109) > > > at junit.framework.TestCase.run(TestCase.java:118) > > > at junit.framework.TestSuite.runTest(TestSuite.java:208) > > > at junit.framework.TestSuite.run(TestSuite.java:203) > > > at > > > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(Remote > > Te > > > stRunner.java:421) > > > at > > > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestR > > un > > > ner.java:305) > > > at > > > > > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTest > > Ru > > > nner.java:186) > > > > > > SqlMapsMES.xml > > > ============================ > > > > > > > > > > > PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" > > > "http://www.ibatis.com/dtd/sql-map-config-2.dtd"> > > > > > > > > > > > > > > > > > > > > > > > value="${driver}"/> > > > > > value="${url}"/> > > > > > value="${username}"/> > > > > > value="${password}"/> > > > > > > > > > > > > > > > > > > > > > > > > > > > WareSQL.xml > > > ============ > > > > > > > > "http://www.ibatis.com/dtd/sql-map-2.dtd" > > > > > > > > > > > > > > > /> > > > > > > > > > > > > > > > > > select="getMold" /> > > > > > > > > > > > resultMap="wareResult" > > > > select laser_id, mold_id > > > from av21.mes_2d_ware_tracking > > > where laser_id = #name# > > > > > > > > > > > > > > > -----Original Message----- > > > From: Clinton Begin [mailto:clinton.begin@gmail.com] > > > Sent: Thursday, January 27, 2005 1:33 PM > > > To: ibatis-user-java@incubator.apache.org > > > Subject: Re: Two separate map configs > > > > > > Can you post the xml files? > > > > > > Clinton > > > > > > On Thu, 27 Jan 2005 13:11:27 -0500, Akins, Greg > > > > > > wrote: > > > > > > > > I have two separate map config files > > > > > > > > SqlMapsLocal.xml & SqlMapsMES.xml > > > > > > > > The mappings defined by local work fine. > > > > > > > > There are two maps in SqlMapsMES.xml > > > > > > > > When I try to access those queries I get a SqlMapException "There > > > > is > > > > > > no statement named "xxxx" in this SqlMap. > > > > > > > > From what I can tell, it's reading the MapConfig OK, and the > > > > SqlMap element is similar to other ones I have working. No other > > > > errs, just the "No Statement". > > > > > > > > Any idea what is going wrong here? > > > > > > > > > > > > Greg Akins > > > > Software Engineer > > > > Sony Electronics, STP Systems > > > > 724.696.7322 (Sony) > > > > 724.696.6147 (AV) > > > > 724.454.7790 (Cell) > > > > 412.590.3973 (Pager) > > > > > > > > > > > > >