Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 10061 invoked from network); 22 Jan 2008 23:19:27 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Jan 2008 23:19:27 -0000 Received: (qmail 9974 invoked by uid 500); 22 Jan 2008 23:19:16 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 9712 invoked by uid 500); 22 Jan 2008 23:19:15 -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 9700 invoked by uid 99); 22 Jan 2008 23:19:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jan 2008 15:19:15 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=RCVD_NUMERIC_HELO,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [134.121.0.63] (HELO EXCHANGEVS-01.ad.wsu.edu) (134.121.0.63) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jan 2008 23:18:47 +0000 Received: from 134.121.92.228 ([134.121.92.228]) by EXCHANGEVS-01.ad.wsu.edu ([134.121.0.145]) via Exchange Front-End Server connect.wsu.edu ([134.121.0.92]) with Microsoft Exchange Server HTTP-DAV ; Tue, 22 Jan 2008 23:18:53 +0000 Received: from local-gw by connect.wsu.edu; 22 Jan 2008 15:18:37 -0800 Subject: Re: Problems with returning a result set. From: Randall Svancara Reply-To: rsvancara@wsu.edu To: Stephen Boyd Cc: user-java@ibatis.apache.org In-Reply-To: <80bfbb6d0801221514p154c62e1l98422a15d64e597c@mail.gmail.com> References: <1201037879.28362.11.camel@local-gw.mainlab> <80bfbb6d0801221514p154c62e1l98422a15d64e597c@mail.gmail.com> Content-Type: text/plain Content-Transfer-Encoding: 7bit Organization: WSU Date: Tue, 22 Jan 2008 15:18:37 -0800 Message-Id: <1201043917.28362.25.camel@local-gw.mainlab> Mime-Version: 1.0 X-Mailer: Evolution 2.12.1 X-Virus-Checked: Checked by ClamAV on apache.org Stephen, Thanks for the reply. The table is in only one schema. I have confirmed this by doing a: SELECT table_name, owner from all_tables where table_name='BLAST_PROG' as the sysdba user. Thanks - Randall Svancara Systems Administrator On Tue, 2008-01-22 at 18:14 -0500, Stephen Boyd wrote: > Do you have the same table in multiple schemas? If so, make sure > ibatis is reading from the correct schema. > > On Jan 22, 2008 4:37 PM, Randall Svancara wrote: > I have used Ibatis for numerous projects and never had a > problems with > returning back a result set. I have other files configured in > a similar > manner and they seem to work just fine. > > First of all, i have this sql configuration file: > > Contents of Blast_Program.xml > ************************************* > > "http://www.ibatis.com/dtd/sql-map-2.dtd"> > > > > type="edu.wsu.bioinfo.webblast.domain.BlastProgram " /> > type="edu.wsu.bioinfo.webblast.persistance.paramclasses.QtypeDtypeParamClass" /> > > class="BlastProgram"> > > > > > > > > > class="QtypeDtypeParamClass"> > nullValue="n"/> > nullValue="n"/> > > > > > > > ********************************************************************* > > > Here is the table stored in an Oracle Database: > > ********************************************************************* > PROGRAM_ID > NOT NULL NUMBER(8) > PROGRAM_NAME > VARCHAR2(100) > ENVIRONMENT > VARCHAR2(2000) > PROGRAM_PATH > VARCHAR2(1000) > SEQ > CHAR(1) > DB > CHAR(1) > > ********************************************************************* > > The above SQL located in Blast_Program.sql works just fine on > this table > and returns results when put into SQL Plus. > > > Below is the debugging output from IBATIS: > ********************************************************************* > 2008-01-22 13:28:39,216 DEBUG > (edu.wsu.bioinfo.webblast.persistance.BlastProgramSQLMapDao:176) - > Opened SqlMapSession > [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl@6481eb] for > iBATIS > operation > 2008-01-22 13:28:39,218 DEBUG > (org.springframework.jdbc.datasource.DataSourceUtils:112) - > Fetching > JDBC Connection from DataSource > 2008-01-22 13:28:39,218 DEBUG > (org.springframework.jdbc.datasource.DataSourceUtils:112) - > Fetching > JDBC Connection from DataSource > 2008-01-22 13:28:39,220 DEBUG (java.sql.Connection:27) - > {conn-100006} > Connection > 2008-01-22 13:28:39,221 DEBUG > (edu.wsu.bioinfo.webblast.persistance.BlastProgramSQLMapDao:185) - > Obtained JDBC Connection > [jdbc:oracle:thin:@mldb3.bioinfo.wsu.edu:1521:maindev, > UserName=RANDALLS, Oracle JDBC driver] for iBATIS operation > 2008-01-22 13:28:39,222 DEBUG ( java.sql.Connection:27) - > {conn-100006} > Preparing Statement: SELECT program_id, program_name, > environment, program_path, seq, db from blast_prog where > seq='n' and > db='n' > 2008-01-22 13:28:39,223 DEBUG ( java.sql.PreparedStatement:27) > - > {pstm-100007} Executing Statement: SELECT program_id, > program_name, environment, program_path, seq, db from > blast_prog where > seq='n' and db='n' > 2008-01-22 13:28:39,224 DEBUG ( java.sql.PreparedStatement:27) > - > {pstm-100007} Parameters: [] > 2008-01-22 13:28:39,225 DEBUG (java.sql.PreparedStatement:27) > - > {pstm-100007} Types: [] > 2008-01-22 13:28:39,229 DEBUG (java.sql.ResultSet:27) - > {rset-100008} > ResultSet > 2008-01-22 13:28:39,230 DEBUG > (org.springframework.jdbc.datasource.DataSourceUtils:312) - > Returning > JDBC Connection to DataSource > 2008-01-22 13:28:39,231 DEBUG > (org.springframework.jdbc.datasource.DataSourceUtils :312) - > Returning > JDBC Connection to DataSource > ***************************************************************************** > > I have tried changing the names of the columns in the table in > the > database, creating resultMaps in various incarnations. I am > using > Struts2, Spring and IBATIS. > > If anyone has a chance, and can offer me any advice or > assistance I > would appreciate it. > > Thanks, > > Randall > > > > >