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 76030 invoked by uid 99); 27 Jan 2005 21:27:08 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from av-messaging.amervideo.com (HELO AV_TERMINAL.amervideo.com) (209.114.176.11) by apache.org (qpsmtpd/0.28) with ESMTP; Thu, 27 Jan 2005 13:27:07 -0800 Received: from (172.16.101.58) by mars.amervideo.com via smtp id 6e48_ad946ad0_70aa_11d9_8198_00304811d2f8; Thu, 27 Jan 2005 16:30:34 -0500 (EST) Received: from avmessaging.amervideo.com (unverified) by AV_TERMINAL.amervideo.com (Content Technologies SMTPRS 4.3.14) with ESMTP id ; Thu, 27 Jan 2005 16:26:53 -0500 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: RE: Two separate map configs X-MimeOLE: Produced By Microsoft Exchange V6.5.7226.0 Date: Thu, 27 Jan 2005 16:26:38 -0500 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: Two separate map configs Thread-Index: AcUEpEQpchE9IuzPR8S5/IbK7JNubgAEfMkQ From: "Akins, Greg" To: Cc: X-Virus-Checked: Checked I thought a difference between my two tests caused the problem, but I changed them to public void testCreateSqlMap(){ WareDAO dao =3D new WareDAO() ; SqlMapClient sqlMap =3D dao.getSqlMapInstance() ;=20 Assert.assertNotNull(sqlMap) ; assertTrue(sqlMap instanceof SqlMapClient) ;=20 =20 } =20 public void testGetWare() { WareDAO dao =3D new WareDAO() ;=20 SqlMapClient sqlMap =3D dao.getSqlMapInstance() ;=20 Assert.assertNotNull(sqlMap) ; log.debug("This dao is configured to use " + dao.getSqlMapConfig()) ;=20 Ware prod =3D (Ware)dao.getObjectByName("12150895"); assertNotNull(prod) ;=20 } And get the same result. I really think I just "hooged" something up while adding my second database mappings... I'm going to write some tests with straight calls to Ibatis libraries and see if I can figure out what the problem is. -----Original Message----- From: Clinton Begin [mailto:clinton.begin@gmail.com]=20 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=20 > post the rest of the code, but basically I'm Querying by calling >=20 > Object prod =3D sqlMap.queryForObject("getWare", srchObj.getName()) ; >=20 > And am getting this stacktrace from my tests. >=20 > com.ibatis.sqlmap.client.SqlMapException: There is no statement named=20 > getWare in this SqlMap. > at=20 > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.getMappedStatemen > t( > SqlMapExecutorDelegate.java:288) > at > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlM > apExecutorDelegate.java:552) > at > com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlM > apExecutorDelegate.java:536) > at > com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSes > sionImpl.java:97) > at > com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClie > 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(RemoteTe > stRunner.java:421) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun > ner.java:305) > at > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu > nner.java:186) >=20 > SqlMapsMES.xml > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > >=20 > PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN" > "http://www.ibatis.com/dtd/sql-map-config-2.dtd"> >=20 > >=20 > > > > value=3D"${driver}"/> > value=3D"${url}"/> > value=3D"${username}"/> > value=3D"${password}"/> > > >=20 > > >=20 > >=20 > WareSQL.xml > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > "http://www.ibatis.com/dtd/sql-map-2.dtd" > >=20 > >=20 > /> >=20 > > > > select=3D"getMold" /> > >=20 > resultMap=3D"wareResult" > > select laser_id, mold_id > from av21.mes_2d_ware_tracking > where laser_id =3D #name# > >=20 > >=20 > -----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 >=20 > Can you post the xml files? >=20 > Clinton >=20 > 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=20 > > element is similar to other ones I have working. No other errs,=20 > > 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) > > >=20 >