ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julio S. G." <juli...@gmail.com>
Subject Re: Unknown Column Name problem
Date Fri, 12 Oct 2007 00:05:48 GMT
To see which SQLMap you have to set the log4j properly, setting:
log4j.logger.com.ibatis=DEBUG

And the error is pretty self explainded. The column can't be found.
Can you execute the SQL (SELECT WID FROM WI.WITABLE) at oracle client?
Are you sure that the column WID really exists at table WITABLE under
the schema WI ?

If you already verified all of these, you could try to rename the
table but is just a guess.
Something like:

SELECT WT.WID FROM WI.WITABLE WT

Julio


On 10/9/07, Niels Beekman <n.beekman@wis.nl> wrote:
>
>
>
>
> You are testing the other way around. The 'problem' is that when you specify
> a column in a resultmap that's not actually delivered by the query, you get
> a driver-specific 'Column name xxx was not found in this ResultSet', which
> is to be expected imho.
>
>
>
> The TS could either fix the problem by issuing a select * or use a separate
> resultmap, they can be extended to avoid duplication. The real question
> should probably be, why specify properties in the resultmap that aren't
> available in the resultset?
>
>
>
> Niels
>
>
>
>  ________________________________
>
>
> From: Clinton Begin [mailto:clinton.begin@gmail.com]
>  Sent: dinsdag 9 oktober 2007 15:56
>  To: user-java@ibatis.apache.org
>  Subject: RE: Unknown Column Name problem
>
>
>
>
> 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...
>
>
>
>
>
>

Mime
View raw message