Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 25626 invoked from network); 2 Jun 2006 17:30:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Jun 2006 17:30:53 -0000 Received: (qmail 58968 invoked by uid 500); 2 Jun 2006 17:30:52 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 58954 invoked by uid 500); 2 Jun 2006 17:30:51 -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 58943 invoked by uid 99); 2 Jun 2006 17:30:51 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jun 2006 10:30:51 -0700 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 clinton.begin@gmail.com designates 64.233.184.235 as permitted sender) Received: from [64.233.184.235] (HELO wr-out-0506.google.com) (64.233.184.235) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 02 Jun 2006 10:30:50 -0700 Received: by wr-out-0506.google.com with SMTP id 67so565422wri for ; Fri, 02 Jun 2006 10:30:28 -0700 (PDT) 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=YbI6p2uSZ4U0Q1+IHiqqmar74SHGH0De8oMhmAQX5d9sODc2Ub2aY3MtAKau7w9TAv9r0mLr0qJybw+BkxIR0VQHeLBOQVSQRmRPvmrCdgB0lQOPfnyfW+8Jp2/6Q4SsDd3vM2Kg8QaNc1Kb2SewipB1Zrv80BWwP8VQWSZTiA8= Received: by 10.54.79.7 with SMTP id c7mr2122484wrb; Fri, 02 Jun 2006 10:30:28 -0700 (PDT) Received: by 10.54.126.14 with HTTP; Fri, 2 Jun 2006 10:30:28 -0700 (PDT) Message-ID: <16178eb10606021030x69eebd2bk26d86e9459b8889f@mail.gmail.com> Date: Fri, 2 Jun 2006 11:30:28 -0600 From: "Clinton Begin" To: user-java@ibatis.apache.org Subject: Re: IBATIS CHAR FIELD NULL VALUES- Urgent help required In-Reply-To: <16178eb10606020959n56eadc0egd7ab5f22c2a87685@mail.gmail.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_1993_572761.1149269428156" References: <8AED8A2865F7064989119502BD85729D79EF28@EXCHANGE3.uspto.gov> <16178eb10606020959n56eadc0egd7ab5f22c2a87685@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_1993_572761.1149269428156 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline I can only think that it's either that the string is too long, or it's a problem with the JDBC driver. iBATIS doesn't do anything special here, just calls PreparedStatement.setString(); PS: Larry is right, you can't use CHAR(10), instead just use CHAR. Cheers, Clinton On 6/2/06, Clinton Begin wrote: > > What Java type are you trying to map to the CHAR field? > > > > On 6/2/06, Krishnamoorthi, Sruthi (Raytheon) > wrote: > > > > I have a char field which carries null value. > > The samething with varchar field also. > > when I pass null values it was throwing sql exception as incompatible > > column types. Then for varchar field i add #centerNo:VARCHAR# and same for > > DAte field #priorityDt:DATE#. > > When I did same for CHAR #parentPatentNo:CHAR# I got error that inserted > > value too large for a column > > Then I tried > > #parentPatentNo:CHAR(10)# > > Now it says incompatable type column. > > > > > > > > INSERT INTO PATENTED_CASE (PC_PATENT_NO,PATENT_APPLICATION_NO,FILING_DT, > > PATENT_ISSUE_DT, INVENTION_TITLE_TX, TECHNOLOGY_CENTER_NO, > > APPLICATION_PRIORITY_DT, REISSUE_PARENT_PATENT_NO, INVENTOR_QT, > > LAST_MODIFIED_USER_ID,LAST_MODIFIED_TS, ART_UNIT_NO) > > VALUES(#patentNo#, #patentApplNo#, #filingDt#, #issueDt#, #title#, > > #centerNo:VARCHAR#, #priorityDt:DATE#, #parentPatentNo:CHAR(10)#, > > #inventorQt#, #lastModifiedUserId#, sysdate, #artUnitNo#) > > > > > > > > Could you please provide me a solution very urgently. > > > > Thanks, > > Sruthi Krishnamoorthi > > 703-562-9732(Work) > > 537 A - (Raytheon) Location > > > > > > -----Original Message----- > > From: Morone, Bill [mailto: Morone.Bill@pennmutual.com] > > Sent: Friday, June 02, 2006 11:20 AM > > To: user-java@ibatis.apache.org; lmeadors@apache.org > > Subject: RE: When returning mutiple objects and transforming "directly > > to xml > > > > > > Larry, > > > > I will take a better look at the source when I have the time. We can > > talk. Thanks. > > > > I had to tell my manager about the change in stance regarding the xml > > moving forward. She was not happy (I sold her on the xml instead of having > > java value objects --get rid of a layer -- it is only a semantic difference > > between a java value object and an xml one, right?). > > > > Anyway. Onward > > > > -----Original Message----- > > From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com]On Behalf > > Of Larry Meadors > > Sent: Friday, June 02, 2006 10:56 AM > > To: user-java@ibatis.apache.org > > Subject: Re: When returning mutiple objects and transforming "directly > > to xml > > > > > > I can help you build a row handler to do the transformation if you > > need some help (though I suspect you won't), just contact me off-list, > > and we can work on it - shouldn't take more than a few minutes to > > "rough it in", then you can refine it. > > > > Larry > > > > > > On 6/2/06, Morone, Bill wrote: > > > > > > > > > Gentlemen: > > > > > > I do thank you and believe you have a fine thing going. Like I said I > > > created a very clean little design that basically uses the xml objects > > > emitted by iBATIS and transforms them anyway you want (great for > > little > > > docs). I'd like to see stuff move a little forward -- I'll help!!! > > > > > > > > > Bill > > > > > > > > > > > > > > > -----Original Message----- > > > From: Clinton Begin [mailto: clinton.begin@gmail.com] > > > Sent: Friday, June 02, 2006 9:45 AM > > > To: user-java@ibatis.apache.org > > > Subject: Re: When returning mutiple objects and transforming "directly > > to > > > xml > > > > > > > > > Hi Bill, > > > > > > It will probably go away in version 3.0. We'd never remove a feature > > from > > > the current major version. It will continue to be supported in 2.0. > > > > > > In it's place we'll likely either suggest or build-in second stage xml > > > support, for turning classes, beans and maps into XML. That will > > allow you > > > to map them to domain objects AND convert them to XML. Plus, there > > are > > > already a number of XML libraries that support exactly that. The > > current > > > implementation creates too much complexity in the implementation, yet > > offers > > > little additonal value over the formerly described approach. > > > > > > Don't worry though, we'll always help you upgrade. Even if it doesn't > > exist > > > in 3.0, we'll have a suggested upgrade path that shouldn't leave you > > > floundering. > > > > > > Cheers, > > > Clinton > > > > > > > > > > > > > > > On 6/2/06, Morone, Bill wrote: > > > > Larry, > > > > > > > > Really? I think it bears great merit. I little expansion would make > > it > > > really practical. In fact hearing of its departure has me a little > > worried. > > > > > > > > Does this mean the resultClass="xml" is going away? > > > > > > > > I created a little (restlet front-end) framework that translates the > > xml > > > output for web services. I extended ArrayList to deal with the > > > "non-webformedness" of the queryForObject "list of little docs" > > situation > > > and it works great. > > > > > > > > Our system is scheduled to go into production in October -- what are > > the > > > future plans for the xml stuff -- I assume we'll have to subclass to > > extend. > > > Will your superclass stuff stay the same? > > > > > > > > Bill Morone > > > > > > > > > > > > -----Original Message----- > > > > From: larry.meadors@gmail.com [mailto:larry.meadors@gmail.com]On > > Behalf > > > > Of Larry Meadors > > > > Sent: Thursday, June 01, 2006 4:45 PM > > > > To: user-java@ibatis.apache.org > > > > Subject: Re: When returning mutiple objects and transforming > > "directly > > > > to xml > > > > > > > > > > > > On 6/1/06, Morone, Bill wrote: > > > > > Coming soon, right? > > > > > > > > On the contrary, going away. > > > > > > > > I'd suggest processing the results of the query manually to create > > XML > > > > with a row handler if you really need to create xml results. > > > > > > > > Larry > > > > This message, including any attachments, is intended only for the > > > recipient(s) > > > > named above. It may contain confidential and privileged information. > > If > > > you have > > > > received this communication in error, please notify the sender > > immediately > > > and > > > > destroy or delete the original message. Also, please be aware that > > if you > > > are not > > > > the intended recipient, any review, disclosure, copying, > > distribution or > > > any > > > > action or reliance based on this message is prohibited by law. > > > > > > > > > > > > > > > > > This message, including any attachments, is intended only for the > > > recipient(s) > > > named above. It may contain confidential and privileged information. > > If you > > > have > > > received this communication in error, please notify the sender > > immediately > > > and > > > destroy or delete the original message. Also, please be aware that if > > you > > > are not > > > the intended recipient, any review, disclosure, copying, distribution > > or any > > > action or reliance based on this message is prohibited by law. > > > > > > > > > > > This message, including any attachments, is intended only for the > > recipient(s) > > named above. It may contain confidential and privileged information. If > > you have > > received this communication in error, please notify the sender > > immediately and > > destroy or delete the original message. Also, please be aware that if > > you are not > > the intended recipient, any review, disclosure, copying, distribution or > > any > > action or reliance based on this message is prohibited by law. > > > > > > > > > > > ------=_Part_1993_572761.1149269428156 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline
I can only think that it's either that the string is too long, or it's a problem with the JDBC driver.  iBATIS doesn't do anything special here, just calls PreparedStatement.setString();

PS: Larry is right, you can't use CHAR(10), instead just use CHAR.

Cheers,
Clinton

On 6/2/06, Clinton Begin <clinton.begin@gmail.com> wrote:
What Java type are you trying to map to the CHAR field?



On 6/2/06, Krishnamoorthi, Sruthi (Raytheon) < Sruthi.Krishnamoorthi@uspto.gov> wrote:
I have a char field which carries null value.
The samething with varchar field also.
when I pass null values it was throwing sql exception as incompatible column types. Then for varchar field i add #centerNo:VARCHAR# and same for DAte field  #priorityDt:DATE#.
When I did same for CHAR #parentPatentNo:CHAR# I got error that inserted value too large for a column
Then I tried
#parentPatentNo:CHAR(10)#
Now it says incompatable type column.


<insert id="PatentedCaseTblInsert" parameterClass="PatentedCase">
INSERT INTO PATENTED_CASE (PC_PATENT_NO,PATENT_APPLICATION_NO,FILING_DT, PATENT_ISSUE_DT, INVENTION_TITLE_TX, TECHNOLOGY_CENTER_NO, APPLICATION_PRIORITY_DT, REISSUE_PARENT_PATENT_NO, INVENTOR_QT, LAST_MODIFIED_USER_ID,LAST_MODIFIED_TS, ART_UNIT_NO)
VALUES(#patentNo#, #patentApplNo#, #filingDt#, #issueDt#, #title#, #centerNo:VARCHAR#, #priorityDt:DATE#, #parentPatentNo:CHAR(10)#, #inventorQt#, #lastModifiedUserId#, sysdate, #artUnitNo#)
</insert>


Could you please provide me a solution very urgently.

Thanks,
Sruthi Krishnamoorthi
703-562-9732(Work)
537 A - (Raytheon) Location


-----Original Message-----
From: Morone, Bill [mailto: Morone.Bill@pennmutual.com]
Sent: Friday, June 02, 2006 11:20 AM
To: user-java@ibatis.apache.org ; lmeadors@apache.org
Subject: RE: When returning mutiple objects and transforming "directly
to xml


Larry,

I will take a better look at the source when I have the time. We can talk. Thanks.

I had to tell my manager about the change in stance regarding the xml moving forward. She was not happy (I sold her on the xml instead of having java value objects  --get rid of a layer -- it is only a semantic difference between a java value object and an xml one, right?).

Anyway. Onward

-----Original Message-----
From: larry.meadors@gmail.com [mailto: larry.meadors@gmail.com]On Behalf
Of Larry Meadors
Sent: Friday, June 02, 2006 10:56 AM
To: user-java@ibatis.apache.org
Subject: Re: When returning mutiple objects and transforming "directly
to xml


I can help you build a row handler to do the transformation if you
need some help (though I suspect you won't), just contact me off-list,
and we can work on it - shouldn't take more than a few minutes to
"rough it in", then you can refine it.

Larry


On 6/2/06, Morone, Bill < Morone.Bill@pennmutual.com> wrote:
>
>
> Gentlemen:
>
> I do thank you and believe you have a fine thing going. Like I said I
> created a very clean little design that basically uses the xml objects
> emitted by iBATIS and transforms them anyway you want (great for little
> docs). I'd like to see stuff move a little forward -- I'll help!!!
>
>
> Bill
>
>
>
>
> -----Original Message-----
> From: Clinton Begin [mailto: clinton.begin@gmail.com]
> Sent: Friday, June 02, 2006 9:45 AM
> To: user-java@ibatis.apache.org
> Subject: Re: When returning mutiple objects and transforming "directly to
> xml
>
>
> Hi Bill,
>
> It will probably go away in version 3.0.  We'd never remove a feature from
> the current major version.  It will continue to be supported in 2.0.
>
> In it's place we'll likely either suggest or build-in second stage xml
> support, for turning classes, beans and maps into XML.  That will allow you
> to map them to domain objects AND convert them to XML.  Plus, there are
> already a number of XML libraries that support exactly that.  The current
> implementation creates too much complexity in the implementation, yet offers
> little additonal value over the formerly described approach.
>
> Don't worry though, we'll always help you upgrade.  Even if it doesn't exist
> in 3.0, we'll have a suggested upgrade path that shouldn't leave you
> floundering.
>
> Cheers,
> Clinton
>
>
>
>
> On 6/2/06, Morone, Bill <Morone.Bill@pennmutual.com> wrote:
> > Larry,
> >
> > Really? I think it bears great merit. I little expansion would make it
> really practical. In fact hearing of its departure has me a little worried.
> >
> > Does this mean the resultClass="xml" is going away?
> >
> > I created a little (restlet front-end) framework that translates the xml
> output for web services. I extended ArrayList to deal with the
> "non-webformedness" of the queryForObject "list of little docs" situation
> and it works great.
> >
> > Our system is scheduled to go into production in October -- what are the
> future plans for the xml stuff -- I assume we'll have to subclass to extend.
> Will your superclass stuff stay the same?
> >
> > Bill Morone
> >
> >
> > -----Original Message-----
> > From: larry.meadors@gmail.com [mailto: larry.meadors@gmail.com]On Behalf
> > Of Larry Meadors
> > Sent: Thursday, June 01, 2006 4:45 PM
> > To: user-java@ibatis.apache.org
> > Subject: Re: When returning mutiple objects and transforming "directly
> > to xml
> >
> >
> > On 6/1/06, Morone, Bill <Morone.Bill@pennmutual.com> wrote:
> > > Coming soon, right?
> >
> > On the contrary, going away.
> >
> > I'd suggest processing the results of the query manually to create XML
> > with a row handler if you really need to create xml results.
> >
> > Larry
> > This message, including any attachments, is intended only for the
> recipient(s)
> > named above. It may contain confidential and privileged information. If
> you have
> > received this communication in error, please notify the sender immediately
> and
> > destroy or delete the original message. Also, please be aware that if you
> are not
> > the intended recipient, any review, disclosure, copying, distribution or
> any
> > action or reliance based on this message is prohibited by law.
> >
> >
>
>
>  This message, including any attachments, is intended only for the
> recipient(s)
> named above. It may contain confidential and privileged information. If you
> have
> received this communication in error, please notify the sender immediately
> and
> destroy or delete the original message. Also, please be aware that if you
> are not
> the intended recipient, any review, disclosure, copying, distribution or any
> action or reliance based on this message is prohibited by law.
>
>
>
This message, including any attachments, is intended only for the recipient(s)
named above. It may contain confidential and privileged information. If you have
received this communication in error, please notify the sender immediately and
destroy or delete the original message. Also, please be aware that if you are not
the intended recipient, any review, disclosure, copying, distribution or any
action or reliance based on this message is prohibited by law.






------=_Part_1993_572761.1149269428156--