Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 33899 invoked from network); 9 Oct 2007 13:57:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Oct 2007 13:57:52 -0000 Received: (qmail 58662 invoked by uid 500); 9 Oct 2007 13:57:26 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 58631 invoked by uid 500); 9 Oct 2007 13:57:26 -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 58607 invoked by uid 99); 9 Oct 2007 13:57:26 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 06:57:26 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of clinton.begin@gmail.com designates 209.85.198.185 as permitted sender) Received: from [209.85.198.185] (HELO rv-out-0910.google.com) (209.85.198.185) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Oct 2007 13:57:27 +0000 Received: by rv-out-0910.google.com with SMTP id c27so1007451rvf for ; Tue, 09 Oct 2007 06:57:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:from:to:references:in-reply-to:subject:date:mime-version:content-type:x-mailer:thread-index:content-language:message-id; bh=neMiaN9ttWITPWlUTunM4Cs1old9sX2eZYfrPmkBItI=; b=AS0EiO+k5eG2FsgO3pL1uIx2HcddwxzJsj3G6gijkxe2aaUWloxmKka8KVumh5OycalTZKYnRt4stkYj3tb5cgfeuc5jtIuV8ApeDMrdBp8n3UH62XynuEgjIoNYC72vc/My3LHdg17jLZaaciC4blGCw8ZBTOdNsf5AzCfMkJw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:from:to:references:in-reply-to:subject:date:mime-version:content-type:x-mailer:thread-index:content-language:message-id; b=dvtXvXrGRM9IFBsSZ3FNyHXg8ZfARCBjarowZXa4FU+Co6CkbyGfMXw13eTAmkAf3YJuWBMJB9QzpAq4YRZ3zp7uFfCL0TBtF0arSWGSXL4PhpMlsu3kkPua4uVOYKO3ca3msm/ex7pe2AFCjjmdd8W0d1+h35MYpeSVE/RXgYo= Received: by 10.141.198.8 with SMTP id a8mr2314040rvq.1191938225598; Tue, 09 Oct 2007 06:57:05 -0700 (PDT) Received: from DARKSTAR ( [24.66.195.100]) by mx.google.com with ESMTPS id c14sm12485445rvf.2007.10.09.06.57.02 (version=SSLv3 cipher=OTHER); Tue, 09 Oct 2007 06:57:05 -0700 (PDT) From: "Clinton Begin" To: References: <20071004200211.109780@gmx.net> <20071005064251.301840@gmx.net> <46d2280d0710050330p164e7326q5749bdec40cc2e35@mail.gmail.com> <20071005120740.147050@gmx.net> <46d2280d0710050634n19d7229erb1368902575a58c7@mail.gmail.com> <20071008115542.298500@gmx.net> <46d2280d0710080704s2ac27514jb98f48627f96981f@mail.gmail.com> <20071009071120.180700@gmx.net> <470B3D0F.1080604@sardiniapoint.it> In-Reply-To: <470B3D0F.1080604@sardiniapoint.it> Subject: RE: Unknown Column Name problem Date: Tue, 9 Oct 2007 07:55:45 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0088_01C80A49.CE36D710" X-Mailer: Microsoft Office Outlook 12.0 Thread-Index: AcgKUBee8BKDnAlbQOa6TZLj1VhhhwAK207g Content-Language: en-ca Message-ID: <470b88b1.0eb48c0a.024a.11ee@mx.google.com> X-Virus-Checked: Checked by ClamAV on apache.org This is a multipart message in MIME format. ------=_NextPart_000_0088_01C80A49.CE36D710 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit I'm REALLY surprised iBATIS isn't telling you which result mapping is causing the problem. It almost always reports this. For example, I just purposely changed one of my mappings to imitate an invalid column problem: If the property name is incorrect, it should fail upon initialization with: Caused by: com.ibatis.common.beans.ProbeException: There is no WRITEABLE property named 'xdescription' in class 'org.xxxxxx.facebook.domain.Gift' If the column name is incorrect, it should fail with this: Caused by: com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred in org/xxxxxxxx/facebook/data/sql/Gift.xml. --- The error occurred while applying a result map. --- Check the Gift.GiftResult. --- Check the result mapping for the 'description' property. --- Cause: java.sql.SQLException: Column 'xdescription' not found. Cheers, Clinton From: Rinaldo Bonazzo [mailto:rbonazzo@sardiniapoint.it] Sent: October-09-07 2:34 AM To: user-java@ibatis.apache.org Subject: Re: Unknown Column Name problem Claus Hausberger ha scritto: I currently do not have access to the sources because I am not in the office, but what you write is exactly my problem. do I always have to specify all column names in the query that are also in the ResultMap ? Yes currently there are seven columns mentionned in the ResultMap and when I specify all seven or when I use "Select *" it works, but when I specify only two or three it does not work. best wishes Claus Could you post your Select that causes error and ResultMap? If you omit column that's present in the ReusltMap I guess you'll get invalid column name exception... ------=_NextPart_000_0088_01C80A49.CE36D710 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I’m REALLY surprised iBATIS isn’t telling you = which result mapping is causing the problem.  It almost always reports = this.  For example, I just purposely changed one of my mappings to imitate an invalid column = problem:

 

If the property name is incorrect, it should fail upon initialization with:

 

Caused by: com.ibatis.common.beans.ProbeException: There = is no WRITEABLE property named 'xdescription' in class = 'org.xxxxxx.facebook.domain.Gift'

 

If the column name is incorrect, it should fail with = this:

 

Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:   =

--- The error occurred in = org/xxxxxxxx/facebook/data/sql/Gift.xml. 

--- The error occurred while applying a result map.  =

--- Check the Gift.GiftResult.  =

--- Check the result mapping for the 'description' = property. 

--- Cause: java.sql.SQLException: Column 'xdescription' = not found.

 

Cheers,

Clinton

 

From: Rinaldo Bonazzo [mailto:rbonazzo@sardiniapoint.it]
Sent: October-09-07 2:34 AM
To: user-java@ibatis.apache.org
Subject: Re: Unknown Column Name problem

 

Claus Hausberger ha scritto:

I currently do not have access to the sources because I am not in =
the office, but what you write is exactly my =
problem.
do I always have to specify all column =
names in the query that are also in
the ResultMap =
?
  

Yes

currently there are seven columns mentionned in the ResultMap and =
when I specify all seven or when I use "Select *" it works, =
but when I specify only two or three it does not =
work.
 
best =
wishes
 
Claus<=
/pre>
 
  
Could =
you post your Select that causes error and =
ResultMap?
 
If you omit =
column that's present in the ReusltMap I guess you'll =
get
invalid column name =
exception...
    =
 
  

 

------=_NextPart_000_0088_01C80A49.CE36D710--