Return-Path: Delivered-To: apmail-ibatis-user-java-archive@www.apache.org Received: (qmail 436 invoked from network); 18 Feb 2009 22:26:11 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Feb 2009 22:26:11 -0000 Received: (qmail 9773 invoked by uid 500); 18 Feb 2009 22:26:05 -0000 Delivered-To: apmail-ibatis-user-java-archive@ibatis.apache.org Received: (qmail 9758 invoked by uid 500); 18 Feb 2009 22:26:05 -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 9749 invoked by uid 99); 18 Feb 2009 22:26:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Feb 2009 14:26:04 -0800 X-ASF-Spam-Status: No, hits=2.6 required=10.0 tests=DNS_FROM_OPENWHOIS,SPF_HELO_PASS,SPF_PASS,WHOIS_MYPRIVREG X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of lists@nabble.com designates 216.139.236.158 as permitted sender) Received: from [216.139.236.158] (HELO kuber.nabble.com) (216.139.236.158) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 18 Feb 2009 22:25:57 +0000 Received: from isper.nabble.com ([192.168.236.156]) by kuber.nabble.com with esmtp (Exim 4.63) (envelope-from ) id 1LZurI-0005j7-0v for user-java@ibatis.apache.org; Wed, 18 Feb 2009 14:25:36 -0800 Message-ID: <22089692.post@talk.nabble.com> Date: Wed, 18 Feb 2009 14:25:36 -0800 (PST) From: sanv To: user-java@ibatis.apache.org Subject: Re: aBator does not create getter and setter for new column in table In-Reply-To: <536e8800902181416m53df292ele8b95717070e29f@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: viveks@gmx.at References: <22033078.post@talk.nabble.com> <22040640.post@talk.nabble.com> <22040983.post@talk.nabble.com> <22041937.post@talk.nabble.com> <22047468.post@talk.nabble.com> <22088891.post@talk.nabble.com> <536e8800902181416m53df292ele8b95717070e29f@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org If I add them manually that would mean I have to add them in which files? In the java files and in the xml files for the sql code? Nicholoz Koka Kiknadze wrote: > > Add it manually :) Yours is such a weird problem, some unique combination > of some circumstances. I bet there's some no-framework related problem, > both > iBatis and iBator are so simple or rather transparent (like everything > genial) > > > On Wed, Feb 18, 2009 at 4:41 PM, sanv wrote: > >> >> Is there any other workaround to this problem. I am kind of stuck... I >> need >> that column in the table :-D >> >> Thanks in advance. >> >> >> Jeff Butler-2 wrote: >> > >> > Write a Java program that does this: >> > >> > public static void main(String[] args) { >> > String[] abArgs = {"-configfile", "config.xml", "-overwrite"}; >> > AbatorRunner.main(abArgs); >> > } >> > >> > Compile it in an IDE, set the break point, off to the races. >> > >> > Jeff Butler >> > >> > >> > On Mon, Feb 16, 2009 at 5:06 PM, sanv wrote: >> >> >> >> Hi, >> >> >> >> thanks for your answer. But how can I add the break point? >> >> >> >> >> >> >> >> Jeff Butler-2 wrote: >> >>> >> >>> I'm stumped - sorry. >> >>> >> >>> If there are no warnings about unsupported data types, then my best >> >>> guess is that the column got added to a table that is not in the >> >>> schema being queried by Abator. Since you don't specify a schema >> >>> anywhere, Abator is looking in the default schema for this >> connection. >> >>> >> >>> I'd recommend attaching the Abator source and debugging - put a >> >>> breakpoint in the "getColumns" method of >> >>> org.apache.ibatis.abator.internal.db.DatabaseIntrospector - you >> should >> >>> be able to see if the column is returned to Abator from the JDBC >> >>> driver. >> >>> >> >>> Jeff Butler >> >>> >> >>> >> >>> On Mon, Feb 16, 2009 at 11:32 AM, sanv wrote: >> >>>> >> >>>> Sorry, the only warning is not just Statistics.java but also for the >> >>>> other >> >>>> files. But I didnt paste them in all as they are all the same. >> >>>> >> >>>> The config.xml is the following: >> >>>> >> >>>> >> >>>> > >>>> PUBLIC "-//Apache Software Foundation//DTD Abator for iBATIS >> >>>> Configuration >> >>>> 1.0//EN" >> >>>> "http://ibatis.apache.org/dtd/abator-config_1_0.dtd"> >> >>>> >> >>>> >> >>>> >> >>>> > >>>> connectionURL="jdbc:oracle:thin:@127.0.0.1:1521:XE" >> >>>> userId="SOME_USER" >> >>>> password="some_pwd"> >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> > >>>> targetProject="ibatis\src\main\java"> >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> > >>>> targetProject="ibatis\src\main\resources"> >> >>>> >> >>>> >> >>>> >> >>>> > targetPackage="com.tool.ibatis.dao" >> >>>> targetProject="ibatis\src\main\java"> >> >>>> >> >>>> >> >>>> >> >>>> >> >>>> >> >>>>
>> >>>> >> >>>> >> >>>> >> >>>> >> >>>>
>> >>>> >> >>>> >> >>>> >> >>>>
>> >>>> >> >>>>
>> >>>>
>> >>>> >> >>>> >> >>>> >> >>>> Jeff Butler-2 wrote: >> >>>>> >> >>>>> The only warning is that Statistics.java was overwritten. >> >>>>> >> >>>>> It is a mystery. Could we see your config.xml? >> >>>>> >> >>>>> Jeff Butler >> >>>>> >> >>>>> >> >>>>> On Mon, Feb 16, 2009 at 10:51 AM, sanv wrote: >> >>>>>> >> >>>>>> If I run the following command in the command line: java -jar >> >>>>>> abator.jar >> >>>>>> -configfile config.xml -overwrite >> >>>>>> I get an output saying the files were overwritten: >> >>>>>> >> >>>>>> Existing file >> >>>>>> >> C:\server\ibatis\src\main\java\com\tool\ibatis\model\Statistics.java >> >>>>>> was >> >>>>>> overwritten >> >>>>>> Abator finshed successfully, there were warninigs. >> >>>>>> >> >>>>>> This is all I get. >> >>>>>> >> >>>>>> thanks >> >>>>>> >> >>>>>> >> >>>>>> Jeff Butler-2 wrote: >> >>>>>>> >> >>>>>>> Warnings are displayed differently depending on how you run >> >>>>>>> Abator... >> >>>>>>> >> >>>>>>> 1. They could be written to System.out if you are running from >> the >> >>>>>>> command >> >>>>>>> line >> >>>>>>> 2. They can be logged to the Ant console if you are using Ant >> >>>>>>> 3. They will be displayed in the completion dialog box if you are >> >>>>>>> running in Eclipse >> >>>>>>> >> >>>>>>> Jeff Butler >> >>>>>>> >> >>>>>>> >> >>>>>>> On Mon, Feb 16, 2009 at 10:33 AM, sanv wrote: >> >>>>>>>> >> >>>>>>>> 1. The classes are regenerated and the timestamp is also >> updated. >> >>>>>>>> 2. The new field is added. >> >>>>>>>> 3. I have tried using different datatypes (Oracle: VARCHAR2, >> CHAR >> >>>>>>>> and >> >>>>>>>> NUMBER) >> >>>>>>>> 4. There are warnings, but how can I display the warnings? >> >>>>>>>> >> >>>>>>>> thanks in advance. >> >>>>>>>> >> >>>>>>>> >> >>>>>>>> Jeff Butler-2 wrote: >> >>>>>>>>> >> >>>>>>>>> Not much to go on here - we probably need more information. >> >>>>>>>>> >> >>>>>>>>> Some questions... >> >>>>>>>>> >> >>>>>>>>> 1. Are you sure the classes are regenerated (the comment >> timestamp >> >>>>>>>>> will help you know for sure)? >> >>>>>>>>> 2. Are you sure the new field is added to the table in the >> correct >> >>>>>>>>> schema? >> >>>>>>>>> 3. What is the data type of the new field? >> >>>>>>>>> 4. Were there any Abator warnings? >> >>>>>>>>> >> >>>>>>>>> Jeff Butler >> >>>>>>>>> >> >>>>>>>>> >> >>>>>>>>> On Mon, Feb 16, 2009 at 2:12 AM, sanv wrote: >> >>>>>>>>>> >> >>>>>>>>>> Hi, >> >>>>>>>>>> >> >>>>>>>>>> I have a (old) version of abator running for my project. >> >>>>>>>>>> For some reason when i add a new column to a specific table in >> my >> >>>>>>>>>> db >> >>>>>>>>>> and >> >>>>>>>>>> compile the java classes the new column does not get added to >> the >> >>>>>>>>>> corresponding java class. however, if i add a new column to >> >>>>>>>>>> another >> >>>>>>>>>> table >> >>>>>>>>>> in >> >>>>>>>>>> the same database and compile/build the classes the new getter >> >>>>>>>>>> and >> >>>>>>>>>> setter >> >>>>>>>>>> method is added to the class. >> >>>>>>>>>> >> >>>>>>>>>> what could be the problem in this case? >> >>>>>>>>>> >> >>>>>>>>>> thanks for any help. >> >>>>>>>>>> -- >> >>>>>>>>>> View this message in context: >> >>>>>>>>>> >> http://www.nabble.com/aBator-does-not-create-getter-and-setter-for-new-column-in-table-tp22033078p22033078.html >> >>>>>>>>>> Sent from the iBATIS - User - Java mailing list archive at >> >>>>>>>>>> Nabble.com. >> >>>>>>>>>> >> >>>>>>>>>> >> >>>>>>>>> >> >>>>>>>>> >> >>>>>>>> >> >>>>>>>> -- >> >>>>>>>> View this message in context: >> >>>>>>>> >> http://www.nabble.com/aBator-does-not-create-getter-and-setter-for-new-column-in-table-tp22033078p22040640.html >> >>>>>>>> Sent from the iBATIS - User - Java mailing list archive at >> >>>>>>>> Nabble.com. >> >>>>>>>> >> >>>>>>>> >> >>>>>>> >> >>>>>>> >> >>>>>> >> >>>>>> -- >> >>>>>> View this message in context: >> >>>>>> >> http://www.nabble.com/aBator-does-not-create-getter-and-setter-for-new-column-in-table-tp22033078p22040983.html >> >>>>>> Sent from the iBATIS - User - Java mailing list archive at >> >>>>>> Nabble.com. >> >>>>>> >> >>>>>> >> >>>>> >> >>>>> >> >>>> >> >>>> -- >> >>>> View this message in context: >> >>>> >> http://www.nabble.com/aBator-does-not-create-getter-and-setter-for-new-column-in-table-tp22033078p22041937.html >> >>>> Sent from the iBATIS - User - Java mailing list archive at >> Nabble.com. >> >>>> >> >>>> >> >>> >> >>> >> >> >> >> -- >> >> View this message in context: >> >> >> http://www.nabble.com/aBator-does-not-create-getter-and-setter-for-new-column-in-table-tp22033078p22047468.html >> >> Sent from the iBATIS - User - Java mailing list archive at Nabble.com. >> >> >> >> >> > >> > >> >> -- >> View this message in context: >> http://www.nabble.com/aBator-does-not-create-getter-and-setter-for-new-column-in-table-tp22033078p22088891.html >> Sent from the iBATIS - User - Java mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://www.nabble.com/aBator-does-not-create-getter-and-setter-for-new-column-in-table-tp22033078p22089692.html Sent from the iBATIS - User - Java mailing list archive at Nabble.com.