Return-Path: Delivered-To: apmail-ibatis-dev-archive@www.apache.org Received: (qmail 9931 invoked from network); 12 May 2009 07:33:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 12 May 2009 07:33:09 -0000 Received: (qmail 59720 invoked by uid 500); 12 May 2009 07:33:08 -0000 Delivered-To: apmail-ibatis-dev-archive@ibatis.apache.org Received: (qmail 59618 invoked by uid 500); 12 May 2009 07:33:08 -0000 Mailing-List: contact dev-help@ibatis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ibatis.apache.org Delivered-To: mailing list dev@ibatis.apache.org Received: (qmail 59597 invoked by uid 99); 12 May 2009 07:33:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 May 2009 07:33:08 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of karel.rank@gmail.com designates 209.85.221.111 as permitted sender) Received: from [209.85.221.111] (HELO mail-qy0-f111.google.com) (209.85.221.111) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 May 2009 07:33:00 +0000 Received: by qyk9 with SMTP id 9so4516741qyk.4 for ; Tue, 12 May 2009 00:32:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=gBKK095W/iltRpiCVR34dIkI8tGYtmGrofuIGn7116g=; b=Zc/0c/ulZq8uxmn2mwZ/ewSIbnhRa0iw7CD3kBDxbZImBABmBNxY6akXJpZWSle//4 aQlR11yvSHd5W2nWxeJRyCzs1EnUemYGbSF+a3XJHiB/DBiw/7z0mW7Fw4DrapqwFBz9 2SDDE9lRn7RT5rJ/TmVaczzlqm9O3clbfWqDI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=VnCc8pL11Xy9/0EbkJ59n97syzPnsQ++IDBOu8drYwmCW8lrPtEEMHzJM4OToosSCf Afy0ePL3WmwpDn5OeB67Hpk9GJ7J+GsQRYZp0O5HyavT9H0TXA452+x4A/3parVEPxOc 3mopK8B0n5ELhZbMzTvlDhhQzx4fanV9PMveM= MIME-Version: 1.0 Received: by 10.220.86.134 with SMTP id s6mr12292673vcl.4.1242113559232; Tue, 12 May 2009 00:32:39 -0700 (PDT) In-Reply-To: References: Date: Tue, 12 May 2009 09:32:39 +0200 Message-ID: Subject: Re: Ibator - InvalidConfigurationException does not print errors From: Karel Rank To: dev@ibatis.apache.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org On Tue, May 12, 2009 at 12:38 AM, Jeff Butler wrote= : > This is a good catch! =C2=A0I'd like to fix it a different way to keep > consistency with the Ant and Eclipse client implementations. =C2=A0Thanks > for the heads up! > > Jeff Butler > > On Mon, May 11, 2009 at 3:19 PM, Karel Rank wrote: >> Hi, >> >> I tried Ibator, but I had configuration problem in config XML. Ibator >> printed stack trace with InvalidConfigurationException and nothing >> else. >> >> org.apache.ibatis.ibator.exception.InvalidConfigurationException >> =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.apache.ibatis.ibator.config.IbatorConf= iguration.validate(IbatorConfiguration.java:74) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.apache.ibatis.ibator.api.Ibator.= (Ibator.java:110) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.apache.ibatis.ibator.api.IbatorRunner.= main(IbatorRunner.java:102) >> >> Here is a patch which overrides method Exception.getMessage. This >> method now prints whole list of errors passed to instance >> InvalidConfigurationException. Now in case of throwing exception, >> stack trace looks like this: >> >> org.apache.ibatis.ibator.exception.InvalidConfigurationException: One >> or more errors in configuration! >> 1. SQL Statement is required if a generated key is specified in table >> configuration for table adnot.sites >> 2. SQL Statement is required if a generated key is specified in table >> configuration for table adnot.adverts >> =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.apache.ibatis.ibator.config.IbatorConf= iguration.validate(IbatorConfiguration.java:74) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.apache.ibatis.ibator.api.Ibator.= (Ibator.java:110) >> =C2=A0 =C2=A0 =C2=A0 =C2=A0at org.apache.ibatis.ibator.api.IbatorRunner.= main(IbatorRunner.java:102) >> >> The patch is also fixing indentation of code (changing tabs to 4 spaces) >> >> Is this patch useful? Are there any comments or suggestions? >> >> Best Regards >> Karel Rank >> > Welcome! karl