Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 85685 invoked from network); 27 Nov 2009 16:22:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Nov 2009 16:22:59 -0000 Received: (qmail 52249 invoked by uid 500); 27 Nov 2009 16:22:58 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 52174 invoked by uid 500); 27 Nov 2009 16:22:58 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 52166 invoked by uid 99); 27 Nov 2009 16:22:57 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Nov 2009 16:22:57 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of peter.ondruska@gmail.com designates 209.85.219.216 as permitted sender) Received: from [209.85.219.216] (HELO mail-ew0-f216.google.com) (209.85.219.216) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Nov 2009 16:22:49 +0000 Received: by ewy8 with SMTP id 8so2057851ewy.15 for ; Fri, 27 Nov 2009 08:22:28 -0800 (PST) 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; bh=SM/ANSEkKiXckJWuxamgqS4TpI1d18MiTNAeC3JKHx8=; b=SJQugERWvx0FBGk3HJ+cBH3nBmm9VM9xs8eifKxh0ACbbW3+UEdwUUu1nIZBZuMWPt 4UGOdY3QFcMRPf6085KNiENqAgS0OIlnnpbQLBc5zMMF50wep2D5magywJzUAkwDQox0 /7G7SWwB5eT9lwYLhpAT9O8hozUe3YHDnO46M= 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; b=wi95QcVoLwyWpbgFvIjuY9dsdl9IEB7g8yrBJWbG2j9WKRZb1bXj8TGUfoaOW0kKqg Hd/usC3FODQhSxjfn5SPy8hGyf6znKMr2cgREMH/wR8TtooFH7BsUK0EcrOlQpUJsPMt fjFRtD4zz83unNhUnyjrc3uORJuI8RAdiKcBw= MIME-Version: 1.0 Received: by 10.213.8.28 with SMTP id f28mr1078856ebf.38.1259338946417; Fri, 27 Nov 2009 08:22:26 -0800 (PST) In-Reply-To: <0773A3CE9DAC7B42B8F564C52805678D02647E87@EVS01.INTERN.INTERPAY.NL> References: <5268113955D1B54ABB357F639594DAB235DF4F@bcdc.boxicom.lan> <5268113955D1B54ABB357F639594DAB235E074@bcdc.boxicom.lan> <0773A3CE9DAC7B42B8F564C52805678D0264783D@EVS01.INTERN.INTERPAY.NL> <0773A3CE9DAC7B42B8F564C52805678D0264792C@EVS01.INTERN.INTERPAY.NL> <0773A3CE9DAC7B42B8F564C52805678D02647A00@EVS01.INTERN.INTERPAY.NL> <0773A3CE9DAC7B42B8F564C52805678D02647E72@EVS01.INTERN.INTERPAY.NL> <0773A3CE9DAC7B42B8F564C52805678D02647E87@EVS01.INTERN.INTERPAY.NL> Date: Fri, 27 Nov 2009 17:22:25 +0100 Message-ID: <4d2670740911270822s4d023bc8s139993b1821c8583@mail.gmail.com> Subject: Re: AW: AW: AW: OOM with millions of weakly-referenced Derby objects From: =?UTF-8?Q?Peter_Ondru=C5=A1ka?= To: Derby Discussion Content-Type: multipart/alternative; boundary=0015174bdc8c8dad9304795cb2ee X-Virus-Checked: Checked by ClamAV on apache.org --0015174bdc8c8dad9304795cb2ee Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I develop on Windows and deploy to AIX 5.3 using Java 6 (_17 on Windows) an= d SR4 http://www.ibm.com/developerworks/java/jdk/aix/j664/Java6_64.fixinfo.html a= nd never encountered anything unusual. On Fri, Nov 27, 2009 at 4:30 PM, wrote: > Hi Dag, > Thanks for your effort. The problem is as far I understand a special > behavoiour on AIX Java Mashine. Does anybody of the developing or testing > people got access on something like that? > > > -----Urspr=C3=BCngliche Nachricht----- > Von: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM] > Gesendet: Freitag, 27. November 2009 16:15 > An: Derby Discussion > Betreff: Re: AW: AW: AW: OOM with millions of weakly-referenced Derby > objects > > > Hi Malte, > > Malte.Kempff@de.equens.com writes: > > > > Hi Dag, The problem in my case is, that I don't have access to any > > AIX-Computer, and that is really a pity, because I cannot > > reconstruct the scenario on my own and watch it with my own eyes. > > That all happened on a production system and the provider denies > > trying it out again. But attached you can find the SQL-script > > without being UTF8. So that Problem should occur in the same way > > used on AIX (5.3) BTW: is there a way to be kind of independent of > > the input format? > > I converted the script you enclosed to UTF-8 and ran it through ij > without any problems. > > I also tried to run it with the enclosed program, and it gave me no > errors when the inout file was encoded with UTF-8 (Comments had > non-ASCII German character), and it printed no errors on my > OpenSolaris system (I don't have access to AIX). > > In any case, should you see this problem again, please feel free to > file a bug report(*), preferably with a repro and/or logs. > > As for independence of the input format, since runScript requires that > you specify the encoding, you could do some encoding auto-detect logic > on the script, I guess.. > > (*) http://db.apache.org/derby/DerbyBugGuidelines.html > > Hope this helps, > Dag > > > import org.apache.derby.tools.ij; > import java.sql.*; > import java.io.*; > > public class Foo { > > public Foo() {}; > > static public void main(String[] args) > throws SQLException, > UnsupportedEncodingException, > FileNotFoundException, > ClassNotFoundException { > Class.forName("org.apache.derby.jdbc.EmbeddedDriver"); > Connection c =3D > DriverManager.getConnection("jdbc:derby:wombat;create=3Dtrue"); > > FileInputStream fs =3D new FileInputStream(args[0]); > > int errs =3D ij.runScript(c, > fs, > "UTF-8", > System.out, > "UTF-8"); > > System.out.println("\n\nerrs=3D" + errs); > c.close(); > } > } > > > > > > > > Malte > > > > -----Urspr=C3=BCngliche Nachricht----- > > Von: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM] > > Gesendet: Freitag, 27. November 2009 01:19 > > An: Derby Discussion > > Betreff: Re: AW: AW: OOM with millions of weakly-referenced Derby objec= ts > > > > Malte.Kempff@de.equens.com writes: > > > >> Yes this is the API I am reffering to. Well actually it says that, > >> but in my case it did not do it. It needed a long time, several > >> minutes. Reason as it turned later out, after getting the output in > >> a file a lot of IOExcceptions. I never got those on windows nor on > >> Solaris. Thr original logic of the routine calling the runScript > >> Method was asking for the return code but either it never hit this > >> if statement and crashed somewhere within ij without giving the > >> Exception to the caller or ij gave something like 0 so the output > >> never was given to the logger. So there is something phony with > >> ij.runScript using it with AIX 5.3 and a SQL-Script not coded UTF8 > >> but declaring in the parameters as UTF8. Of course that is a fault > >> by my own, but it should tel me about it. > > > > I looked at the implementation for runScript in > > org.apache.derby.impl.tools.ij.utilMain#runScriptGuts and it does seem > > to catch exceptions, count them and return them. Are you able to > > provide a repro script showing that 0 or -1 is returned from runScript > > for the failing scenario? > > > > Thanks, > > Dag > > > >> > >> > >> > >> -----Urspr=C3=BCngliche Nachricht----- > >> Von: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM] > >> Gesendet: Freitag, 20. November 2009 19:54 > >> An: Derby Discussion > >> Betreff: Re: AW: OOM with millions of weakly-referenced Derby objects > >> > >> Malte.Kempff@de.equens.com writes: > >> > >>> In other words I would count that situation as not nice behaviour of > ij, since the return code should have been given as I would suppose it > looking at the method signature. > >> > >> Is this the API signature you are referring to? > >> > >> > http://db.apache.org/derby/docs/10.5/publishedapi/jdbc4/org/apache/derby/= tools/ij.html#runScript(java.sql.Connection,%20java.io.InputStream,%20java.= lang.String,%20java.io.OutputStream,%20java.lang.String) > >> > >> It says: > >> > >> Returns:h > >> Number of SQLExceptions thrown during the execution, -1 if not > >> known. > >> > >> If so, are you seeing 0 or -1 returned here? > >> > >> Dag > --0015174bdc8c8dad9304795cb2ee Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable I develop on Windows and deploy to AIX 5.3 using Java 6 (_17 on Windows) an= d SR4 =C2=A0http://www.ibm.com/developerworks/java/jdk/aix/j664/= Java6_64.fixinfo.html=C2=A0and never encountered anything unusual.

On Fri, Nov 27, 2009 at 4:30 PM, <Malte.Kempff@de.= equens.com> wrote:
Hi Dag,
Thanks for your effort. The problem is as far I understand a special behavo= iour on AIX Java Mashine. Does anybody of the developing or testing people = got access on something like that?


-----Urspr=C3=BCngliche Nachricht-----
Von: Dag.Wanvik@Sun.COM [mailto:Dag.W= anvik@Sun.COM]
Gesendet: Freitag, 27. November 2009 16:15
An: Derby Discussion
Betreff: Re: AW: AW: AW: OOM with millions of weakly-referenced Derby objec= ts


Hi Malte,

Malte.Kempff@de.equens.com writes:


> Hi Dag, The problem in my case is, that I don't have access to any=
> AIX-Computer, and that is really a pity, because I cannot
> reconstruct the scenario on my own and watch it with my own eyes.
> That all happened on a production system and the provider denies
> trying it out again. =C2=A0But attached you can find the SQL-script > without being UTF8. =C2=A0So that Problem should occur in the same way=
> used on AIX (5.3) BTW: is there a way to be kind of independent of
> the input format?

I converted the script you enclosed to UTF-8 and ran it through ij
without any problems.

I also tried to run it with the enclosed program, and it gave me no
errors when the inout file was encoded with UTF-8 (Comments had
non-ASCII German character), and it printed no errors on my
OpenSolaris system (I don't have access to AIX).

In any case, should you see this problem again, please feel free to
file a bug report(*), preferably with a repro and/or logs.

As for independence of the input format, since runScript requires that
you specify the encoding, you could do some encoding auto-detect logic
on the script, I guess..

(*)
http://db.apache.org/derby/DerbyBugGuidelines.html

Hope this helps,
Dag


import org.apache.derby.tools.ij;
import java.sql.*;
import java.io.*;

public class Foo {

=C2=A0 =C2=A0public Foo() {};

=C2=A0 =C2=A0static public void main(String[] args)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0throws SQLException,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Unsupported= EncodingException,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 FileNotFoun= dException,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 ClassNotFou= ndException {
=C2=A0 =C2=A0 =C2=A0 =C2=A0Class.forName("org.apache.derby.jdbc.Embed= dedDriver");
=C2=A0 =C2=A0 =C2=A0 =C2=A0Connection c =3D DriverManager.getConnection(&q= uot;jdbc:derby:wombat;create=3Dtrue");

=C2=A0 =C2=A0 =C2=A0 =C2=A0FileInputStream fs =3D new FileInputStream(args= [0]);

=C2=A0 =C2=A0 =C2=A0 =C2=A0int errs =3D ij.runScript(c,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0fs,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"UTF-8",
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0System.out,
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"UTF-8");

=C2=A0 =C2=A0 =C2=A0 =C2=A0System.out.println("\n\nerrs=3D" + er= rs);
=C2=A0 =C2=A0 =C2=A0 =C2=A0c.close();
=C2=A0 =C2=A0}
}




>
> Malte
>
> -----Urspr=C3=BCngliche Nachricht-----
> Von: Dag.Wanvik@Sun.COM [mailto:= Dag.Wanvik@Sun.COM]
> Gesendet: Freitag, 27. November 2009 01:19
> An: Derby Discussion
> Betreff: Re: AW: AW: OOM with millions of weakly-referenced Derby obje= cts
>
> Malte.Kempff@de.equens.c= om writes:
>
>> Yes this is the API I am reffering to. =C2=A0Well actually it says= that,
>> but in my case it did not do it. =C2=A0It needed a long time, seve= ral
>> minutes. Reason as it turned later out, after getting the output i= n
>> a file a lot of IOExcceptions. I never got those on windows nor on=
>> Solaris. Thr original logic of the routine calling the runScript >> Method was asking for the return code but either it never hit this=
>> if statement and crashed somewhere within ij without giving the >> Exception to the caller or ij gave something like 0 so the output<= br> >> never was given to the logger. =C2=A0So there is something phony w= ith
>> ij.runScript using it with AIX 5.3 and a SQL-Script not coded UTF8=
>> but declaring in the parameters as UTF8. Of course that is a fault=
>> by my own, but it should tel me about it.
>
> I looked at the implementation for runScript in
> org.apache.derby.impl.tools.ij.utilMain#runScriptGuts and it does seem=
> to catch exceptions, count them and return them. Are you able to
> provide a repro script showing that 0 or -1 is returned from runScript=
> for the failing scenario?
>
> Thanks,
> Dag
>
>>
>>
>>
>> -----Urspr=C3=BCngliche Nachricht-----
>> Von: Dag.Wanvik@Sun.COM [mailto:Dag.Wanvik@Sun.COM]
>> Gesendet: Freitag, 20. November 2009 19:54
>> An: Derby Discussion
>> Betreff: Re: AW: OOM with millions of weakly-referenced Derby obje= cts
>>
>> Malte.Kempff@de.eque= ns.com writes:
>>
>>> In other words I would count that situation as not nice behavi= our of ij, since the return code should have been given as I would suppose = it looking at the method signature.
>>
>> Is this the API signature you are referring to?
>>
>> http://db.apache.org/derby/docs/10.5/publishedapi/jdbc4/= org/apache/derby/tools/ij.html#runScript(java.sql.Connection,%20java.io.Inp= utStream,%20java.lang.String,%20java.io.OutputStream,%20java.lang.String)
>>
>> It says:
>>
>> Returns:h
>> =C2=A0 =C2=A0 Number of SQLExceptions thrown during the execution,= -1 if not
>> =C2=A0 =C2=A0 known.
>>
>> If so, are you seeing 0 or -1 returned here?
>>
>> Dag

--0015174bdc8c8dad9304795cb2ee--