Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 69582 invoked from network); 22 Dec 2005 17:48:43 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 22 Dec 2005 17:48:43 -0000 Received: (qmail 85429 invoked by uid 500); 22 Dec 2005 17:48:41 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 85413 invoked by uid 500); 22 Dec 2005 17:48:41 -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 85402 invoked by uid 99); 22 Dec 2005 17:48:41 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Dec 2005 09:48:41 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jeffgbutler@gmail.com designates 66.249.82.207 as permitted sender) Received: from [66.249.82.207] (HELO xproxy.gmail.com) (66.249.82.207) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 22 Dec 2005 09:48:40 -0800 Received: by xproxy.gmail.com with SMTP id s19so267771wxc for ; Thu, 22 Dec 2005 09:48:19 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=ZGlavNvF6gxmMWKULzHRoahNFUsMVTx1XLIkfvp4dgnoXsbZdQnarGlmj3WgknY/X1nlEmw67MJ4+rS2c1idhU+AInpDZ3vCjXhsqjq+lZmjUwv0fJbHc8iYa3NuLGyXeyfsCfKTB2DQkrP2tSAJURbsFmZHJcFZISvJAPW2xWE= Received: by 10.70.111.7 with SMTP id j7mr2238445wxc; Thu, 22 Dec 2005 09:48:19 -0800 (PST) Received: by 10.70.72.3 with HTTP; Thu, 22 Dec 2005 09:48:19 -0800 (PST) Message-ID: Date: Thu, 22 Dec 2005 11:48:19 -0600 From: Jeff Butler To: user-java@ibatis.apache.org Subject: Re: [ABATOR] New Version 0.5.1 Available In-Reply-To: <93d5d9550512212335l5dc1ee3dh606112905c137d84@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_9279_17348828.1135273699533" References: <93d5d9550512160625h20add72ey1392b2ca2a58b7af@mail.gmail.com> <93d5d9550512211658q31ed2852h2a9161c1701f30a1@mail.gmail.com> <93d5d9550512212335l5dc1ee3dh606112905c137d84@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_9279_17348828.1135273699533 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline That means that the datatype returned from the MetaData does not have an associated getXXX method on the resultset - in which case iBATIS would use JDBC's getObject method. Maybe it's some wierd Oracle type that needs special handling. Or maybe I've got a bug. If you could, let me know what the data type is from the Oracle perspective (i.e. what was specified on the CREATE TABLE command). That might help me track it down. In the meantime, I'm glad the workaround worked. It may be the right solution for the long term. I put the column override stuff in for exactly this type of situation - where the database has a non-standard type that needs special treatment. Jeff Butler On 12/22/05, Zhongmin Chen wrote: > > Hi Jeff, > > Your suggestion did work. Thanks! > > Abator generates the following JDBC type (OTHER) and Java type(Object): > private Object doc; > > > Regards, > Zhongmin > > On 12/21/05, Jeff Butler wrote: > > > > I'm not an Oracle guy, so its hard for me to tell. Can you tell me > > what Abator generates for the JDBC type, and the Java type related to t= he > > column? > > > > Something to try would be to force Abator to consider the field as a > > BLOB like this: > > > > > > > java.lang.byte[]" /> > >
> > > > Jeff Butler > > > > > > On 12/21/05, Zhongmin Chen wrote: > > > > > > Thanks! Jeff > > > > > > This fixed our problem. > > > > > > We are using Oracle 9i. We have another problem with a table which ha= s > > > a BLOB field, but it didn't create the domain object like below (stil= l just > > > tableName or domianObjectName): > > > > > > WithBLOBs.java > > > > > > Is this a problem of Abator with Oracle? > > > > > > Thanks! > > > Zhongmin > > > > > > On 12/16/05, Jeff Butler wrote: > > > > > > > > The SQL maps generated by Abator require the use of statement > > > > namespaces. Make sure that you have them turned on in your SqlMapC= onfig > > > > file like this: > > > > > > > > > > > > > > > > ... > > > > > > > > > > > > Jeff Butler > > > > > > > > > > > > On 12/16/05, Zhongmin Chen wrote: > > > > > Hi, > > > > > > > > > > I used Abator Plug-in to generated the Domain Object, SqlMap > > > > files, and DAO classes for multiple tables, then follow iBATIS > > > > JPetStore-5.0 to add the SqlMap files to sql-map-config.xml and add > > > > DAO to DAO.xml. I am using iBATIS 2.1.5 (build 582). But I got the > > > > following error: > > > > > > > > > > com.ibatis.dao.client.DaoException: Error while configuring > > > > DaoManager. Cause: > > > > com.ibatis.common.exception.NestedRuntimeException: Error occurred. > > > > Cause: com.ibatis.common.xml.NodeletException: Error parsing XML. > > > > Cause: com.ibatis.common.exception.NestedRuntimeException: Error > > > > parsing XPath '/sqlMapConfig/sqlMap'. Cause: > > > > com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: > > > > com.ibatis.common.exception.NestedRuntimeException: Error parsing > > > > XPath '/sqlMap/select'. Cause: > > > > com.ibatis.sqlmap.client.SqlMapException: There is already a > > > > statement named abatorgenerated_selectByPrimaryKey in this SqlMap. > > > > > Caused by: com.ibatis.sqlmap.client.SqlMapException: There is > > > > already a statement named abatorgenerated_selectByPrimaryKey in thi= s SqlMap. > > > > > Caused by: com.ibatis.common.exception.NestedRuntimeException: > > > > Error parsing XPath '/sqlMap/select'. Cause: > > > > com.ibatis.sqlmap.client.SqlMapException: There is already a > > > > statement named abatorgenerated_selectByPrimaryKey in this SqlMap. > > > > > > > > > > Is there anybody else getting the same erro? Do you have an > > > > example to use the generated SqlMap files and DAO classes? > > > > > > > > > > Thanks! > > > > > Zhongmin > > > > > > > > > > > > > > > > > > > > > > > > > On 12/12/05, Jeff Butler < jeffgbutler@gmail.com> wrote: > > > > > > > > > > > > This version fixes the "divide by zero" error, and also makes > > > > things better for SQL Server. > > > > > > > > > > > > If you did the Eclipse automatic install, then Eclipse will pic= k > > > > up the new version automatically when you do "Help>Software Updates= >Find and > > > > Install...", then select the option to "Search for Updates of Curre= ntly > > > > Installed Features". > > > > > > > > > > > > If you did the manual install, then you can download the new zi= p > > > > file and update from there. See ibatis.apache.org/abator.html for > > > > the link to the zip file. > > > > > > > > > > > > Thanks to Denis Vladimirov and Kevin Broderick for helping to > > > > identify these issues! > > > > > > > > > > > > Jeff Butler > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ------=_Part_9279_17348828.1135273699533 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline
That means that the datatype returned from the MetaData does not have = an associated getXXX method on the resultset - in which case iBATIS would u= se JDBC's getObject method.  Maybe it's some wierd Oracle type that ne= eds special handling.  Or maybe I've got a bug.
 
If you could, let me know what the data type is from the Oracle perspe= ctive (i.e. what was specified on the CREATE TABLE command).  That mig= ht help me track it down.
 
In the meantime, I'm glad the workaround worked.  It may be the r= ight solution for the long term.  I put the column override stuff in f= or exactly this type of situation - where the database has a non-standard t= ype that needs special treatment.
 
Jeff Butler


 
On 12/22/05, Zhongmin Chen <zhongmin.= chen@gmail.com> wrote:
Hi  Jeff,

Your sugge= stion did work. Thanks!

Abator generates the following JDBC type (OT= HER) and Java type(Object):
 private Object doc;
    <result column=3D&qu= ot;DOC" property=3D"doc" jdbcType=3D"OTHER" /><= br>
Regards,
Zhongmin=20


On 12/21/05, Jeff Butler <jeffgbutler@g= mail.com > wrote:=20
I'm not an Oracle guy, so its hard for me to tell.  Can you tell = me what Abator generates for the JDBC type, and the Java type related = to the column?
 
Something to try would be to force Abator to consider the field as a B= LOB like this:
 
<table ...>
  <columnOverride column=3D"myBLOBColumn" jdbcType= =3D"BLOB" javaType=3D"java.lang.byte[]" />
</table>
 
Jeff Butler

 
On 12/21/05, Zhongmin Chen <zhongmin.= chen@gmail.com=20 > wrote:=20
Thanks! Jeff

= This fixed our problem.

We are using Oracle 9i. We have another prob= lem with a table which has a BLOB field, but it didn't create the domain ob= ject like below (still just tableName or domianObjectName):=20

<tableName or domainObjectName>WithBLOBs.java

Is this = a problem of Abator with Oracle?

Thanks!
Zhongmin=20


On 12/16/05, Jeff Butler <jeffgbutler@g= mail.com=20 > wrote:=20
The SQL maps generated by Abator require the use of statement namespac= es.  Make sure that you have them turned on in your SqlMapConfig file = like this:

<sqlMapConfig>
  <settings useStatementNamespaces=3D"true" />
  ...
</sqlMapConfig>
 
Jeff Butler


On 12/16/05, Zhongmin Chen <zhongmin.chen@gmail.com> wrote:
> Hi,
>
= > I used Abator Plug-in to generated the Domain Object, SqlMap files, an= d DAO classes for multiple tables, then follow iBATIS=20 JPetStore-5.0 to add the SqlMap files to sql-map-config.xml and add DAO to = DAO.xml. I am using iBATIS 2.1.5 (build 582). But I got the following error= :
>
> com.ibatis.dao.client.DaoException: Error while configur= ing DaoManager.  Cause:=20 com.ibatis.common.exception.NestedRuntimeException: Error occurred.  C= ause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Caus= e: com.ibatis.common.exception.NestedRuntimeException: Error parsing XPath = '/sqlMapConfig/sqlMap'.  Cause:=20 com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: com= .ibatis.common.exception.NestedRuntimeException: Error parsing XPath '/sqlM= ap/select'.  Cause: com.ibatis.sqlmap.client.SqlMapException: There is= already a statement named abatorgenerated_selectByPrimaryKey in this SqlMa= p.=20
> Caused by: com.ibatis.sqlmap.client.SqlMapException: There is alre= ady a statement named abatorgenerated_selectByPrimaryKey in this SqlMap.> Caused by: com.ibatis.common.exception.NestedRuntimeException: Error = parsing XPath '/sqlMap/select'.  Cause:=20 com.ibatis.sqlmap.client.SqlMapException: There is already a statement name= d abatorgenerated_selectByPrimaryKey in this SqlMap.
>
> Is th= ere anybody else getting the same erro? Do you have an example to use the g= enerated SqlMap files and DAO classes?=20
>
> Thanks!
> Zhongmin
>
>
>
&= gt;
> On 12/12/05, Jeff Butler < jeffgbutler@gmail.com> wrote:
> >
> > This vers= ion fixes the "divide by zero" error, and also makes things bette= r for SQL Server.
> >  
> > If you did the Eclipse = automatic install, then Eclipse will pick up the new version automatically = when you do "Help>Software Updates>Find and Install...", th= en select the option to "Search for Updates of Currently Installed Fea= tures".=20
> >  
> > If you did the manual install, then you c= an download the new zip file and update from there.  See ibatis.apache.org/abator.html for the link to the zip file.
> &g= t;  
> > Thanks to Denis Vladimirov and Kevin Broderick for h= elping to identify these issues!
> >  
> > Jeff Butl= er
> >  
>
>

 




------=_Part_9279_17348828.1135273699533--