From vinni_@yahoo.com Fri Nov 22 02:02:44 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B0211475E25 for ; Thu, 21 Nov 2002 21:02:44 -0500 (EST) Received: from web41007.mail.yahoo.com (web41007.mail.yahoo.com [66.218.93.6]) by postgresql.org (Postfix) with SMTP id E7AFA475B85 for ; Thu, 21 Nov 2002 21:02:43 -0500 (EST) Message-ID: <20021122020247.18059.qmail@web41007.mail.yahoo.com> Received: from [63.71.204.137] by web41007.mail.yahoo.com via HTTP; Thu, 21 Nov 2002 18:02:47 PST Date: Thu, 21 Nov 2002 18:02:47 -0800 (PST) From: Vinni Subject: Problem To: pgsql-jdbc@postgresql.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1471931867-1037930567=:17868" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/293 X-Sequence-Number: 5590 --0-1471931867-1037930567=:17868 Content-Type: text/plain; charset=us-ascii I problem, in my application storage word with accent example "descripción" and view "descripci?n". I use servlet and connection jdbc. Anytimes in bd have word with accent "corrección" but read servlet view "correcci?n" Use linux 7.3, and postgres this version. After funtion ok in linux 7.1 and this version, i not understand the problem. Is linux ? is postgres ? is java-servlets? Thanks.. sorry for my english --------------------------------- Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-1471931867-1037930567=:17868 Content-Type: text/html; charset=us-ascii

I problem, in my application storage word with accent example "descripción" and view "descripci?n". I use servlet and connection jdbc.

Anytimes in bd have word with accent "corrección" but read servlet view "correcci?n"

Use linux 7.3, and postgres this version.

After funtion ok in linux 7.1 and this version, i not understand the problem.

Is linux ? is postgres ? is java-servlets?

Thanks..

sorry for my english



Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now --0-1471931867-1037930567=:17868-- From pedro-b-salazar@ptinovacao.pt Wed Nov 27 10:33:43 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id B9E5C475AE5 for ; Wed, 27 Nov 2002 05:33:43 -0500 (EST) Received: from exchange_geral.intra.cet.pt (unknown [194.65.138.11]) by postgresql.org (Postfix) with ESMTP id 4C7B94759BD for ; Wed, 27 Nov 2002 05:33:42 -0500 (EST) Received: by mailgeral.intra.cet.pt with Internet Mail Service (5.5.2653.19) id ; Wed, 27 Nov 2002 10:33:28 -0000 Message-ID: From: Pedro Salazar To: Vinni , pgsql-jdbc@postgresql.org Subject: Re: Problem Date: Wed, 27 Nov 2002 10:33:42 -0000 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/295 X-Sequence-Number: 5592 Are you using the locale parameter in the JDBC URL to your database (charSet)?=20=20 For example, to Portugal [PT] jdbc:postgresql://localhost:5432/db?charSet=3DPT regards, Pedro Salazar -----Original Message----- From: Vinni [mailto:vinni_@yahoo.com] Sent: sexta-feira, 22 de Novembro de 2002 2:03 To: pgsql-jdbc@postgresql.org Subject: [JDBC] Problem I problem, in my application storage word with accent example "descripci=F3= n" and view "descripci?n". I use servlet and connection jdbc.=20 Anytimes in bd have word with accent "correcci=F3n" but read servlet view "correcci?n" Use linux 7.3, and postgres this version. After funtion ok in linux 7.1 and this version, i not understand the problem.=20 Is linux ? is postgres ? is java-servlets? Thanks..=20 sorry for my english Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now From fnasser@redhat.com Wed Nov 27 17:16:43 2002 Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 7D65F4762E2 for ; Wed, 27 Nov 2002 12:16:43 -0500 (EST) Received: from touchme.toronto.redhat.com (to-velocet.redhat.com [216.138.202.10]) by postgresql.org (Postfix) with ESMTP id 9407247666B for ; Wed, 27 Nov 2002 12:16:20 -0500 (EST) Received: from redhat.com (tooth.toronto.redhat.com [172.16.14.29]) by touchme.toronto.redhat.com (Postfix) with ESMTP id 3BC2B80008A; Wed, 27 Nov 2002 12:16:25 -0500 (EST) Message-ID: <3DE4FFFB.4070008@redhat.com> Date: Wed, 27 Nov 2002 12:25:15 -0500 From: Fernando Nasser Organization: Red Hat Canada User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020607 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Pedro Salazar Cc: Vinni , pgsql-jdbc@postgresql.org Subject: Re: Problem References: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/299 X-Sequence-Number: 5596 Pedro, charSet seems to be a no-op if te backend is 7.3(beta or whatever). I don't know what backend version he is using though. But the system current locale may define what is the JVM platform default character encoding. Maybe this has changed between his Linux 7.1 and the 7.3 installations. Regards, Fernando Pedro Salazar wrote: > Are you using the locale parameter in the JDBC URL to your database > (charSet)? > > For example, to Portugal [PT] > jdbc:postgresql://localhost:5432/db?charSet=PT > > regards, > Pedro Salazar > > -----Original Message----- > From: Vinni [mailto:vinni_@yahoo.com] > Sent: sexta-feira, 22 de Novembro de 2002 2:03 > To: pgsql-jdbc@postgresql.org > Subject: [JDBC] Problem > > > I problem, in my application storage word with accent example "descripción" > and view "descripci?n". I use servlet and connection jdbc. > Anytimes in bd have word with accent "corrección" but read servlet view > "correcci?n" > Use linux 7.3, and postgres this version. > After funtion ok in linux 7.1 and this version, i not understand the > problem. > Is linux ? is postgres ? is java-servlets? > Thanks.. > sorry for my english > -- Fernando Nasser Red Hat Canada Ltd. E-Mail: fnasser@redhat.com 2323 Yonge Street, Suite #300 Toronto, Ontario M4P 2C9 From mauricio.solis.h@gmail.com Fri Mar 27 17:09:49 2009 Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 3259763F51B for ; Fri, 27 Mar 2009 14:09:49 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 25533-02-9 for ; Fri, 27 Mar 2009 14:09:45 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qy0-f115.google.com (mail-qy0-f115.google.com [209.85.221.115]) by mail.postgresql.org (Postfix) with ESMTP id A90B4638BD8 for ; Fri, 27 Mar 2009 14:09:39 -0300 (ADT) Received: by qyk13 with SMTP id 13so2173230qyk.15 for ; Fri, 27 Mar 2009 10:09:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :user-agent:mime-version:to:subject:content-type :content-transfer-encoding; bh=hqRBEg+qaydRKhJbzfsdAppBEenVFmqMxLCjcqbWi1Y=; b=ho29PAQ8VCjwYOgD287F7wUrv/TrAiLeRFgf5psFj8eqFdNMDRWfJsd9WUN362KfvI FPW9SDdTuV1ULnYW5dgyRBN7HwPyaCaJXSQPSX1siYeTSEDCJuiiUATyGHrzUPca7EBO JDbRv/EbHPvsbAmWyQdTeK8+S/+UDicIaNvUE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:user-agent:mime-version:to:subject :content-type:content-transfer-encoding; b=Ek7JkjGGi0q4vD+VxY/PoYBsYJ7/4jtDV5H9XydqWyNPKXXNU1WgZpMFuk89L3xIt2 bW4DuonHQA+MtuOKyoaBvQ0PMIx8f/Fr+Pa4hWprocOfNvSv973xL7V2bsMHe2vYxiqV mbufFJRnKDPm0Q/HzN+NFqjj+QUIaNLuMaUME= Received: by 10.229.73.141 with SMTP id q13mr1045978qcj.15.1238173777200; Fri, 27 Mar 2009 10:09:37 -0700 (PDT) Received: from ?200.1.27.110? (proy1.cima.utfsm.cl [200.1.27.110]) by mx.google.com with ESMTPS id 4sm410993yxq.53.2009.03.27.10.09.36 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 27 Mar 2009 10:09:36 -0700 (PDT) Message-ID: <49CD084B.8000900@gmail.com> Date: Fri, 27 Mar 2009 13:09:31 -0400 From: Mauricio Solis Reply-To: mauricio.solis.h@gmail.com User-Agent: Thunderbird 2.0.0.14 (X11/20080502) MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Problem Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/115 X-Sequence-Number: 19445 Hi: I have a problem wiht de driver. If the IP address of the postgresql server is wrong, then the aplication take a lot of time in finish, iven I try to set DriverManager.setLoginTimeout(3), but the problem still. I used a sniffer (tcpdump) and I realiced that my java aplication insist in try to connect to the wrong IP. How I can finish the aplication when the IP server is wrong ??? Please Help My From laurenz.albe@wien.gv.at Tue Mar 31 08:17:24 2009 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 5E4C463420B for ; Tue, 31 Mar 2009 05:17:24 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 95798-08 for ; Tue, 31 Mar 2009 05:17:16 -0300 (ADT) X-Greylist: delayed 00:22:51.95091 by SQLgrey-1.7.6 Received: from relay-fr112.magwien.gv.at (relay-fr112.magwien.gv.at [217.149.225.66]) by mail.postgresql.org (Postfix) with ESMTP id B2DEE6327D9 for ; Tue, 31 Mar 2009 05:17:15 -0300 (ADT) Received: from localhost (localhost.localdomain [127.0.0.1]) by relay-fr112.magwien.gv.at (Postfix) with ESMTP id C4C3D4C5A91; Tue, 31 Mar 2009 09:54:20 +0200 (CEST) X-Virus-Scanned: by amavisd-new using Sophie and ClamAV at magwien.gv.at Received: from exrat0.host.magwien.gv.at (exrat0.host.magwien.gv.at [10.153.0.104]) by relay-fr112.magwien.gv.at (Postfix) with ESMTP id 9D0BE4C5A94; Tue, 31 Mar 2009 09:54:20 +0200 (CEST) Received: from exadv11.host.magwien.gv.at ([10.153.17.1]) by exrat0.host.magwien.gv.at with Microsoft SMTPSVC(6.0.3790.3959); Tue, 31 Mar 2009 09:53:39 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: Re: Problem Date: Tue, 31 Mar 2009 09:53:39 +0200 Message-ID: In-Reply-To: <49CD084B.8000900@gmail.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [JDBC] Problem Thread-Index: AcmvGNRFqsMHDMN/TgGYpoWyD6a4BgCuT2KA References: <49CD084B.8000900@gmail.com> From: "Albe Laurenz" To: , X-OriginalArrivalTime: 31 Mar 2009 07:53:39.0910 (UTC) FILETIME=[CE011E60:01C9B1D5] X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200903/116 X-Sequence-Number: 19446 Mauricio Solis wrote: > I have a problem wiht de driver. >=20 > If the IP address of the postgresql server is wrong, then the = aplication=20 > take a lot of time in finish, iven I try to set=20 > DriverManager.setLoginTimeout(3), but the problem still. >=20 > I used a sniffer (tcpdump) and I realiced that my java aplication = insist=20 > in try to connect to the wrong IP. How I can finish the aplication = when=20 > the IP server is wrong ??? I don't think that you run into the login timeout here, you rather = encounter a TCP timeout. Before JDBC can connect, a TCP connection must be = established. Since the destination IP address does not exist, your computer is = sending SYN requests that do not receive an answer until the TCP layer "gives = up". You can find this described in chapter 4.2.3.5 of RFC 1122, which also = states that the timeout "for a SYN segment MUST be set large enough to provide retransmission of the segment for at least 3 minutes". If you wait long enough, you eventually get an exception, right? It's just that the length of time it takes is unacceptable for you. JDBC cannot influence this as it is on a lower layer. I can think of two options: - You can configure the TCP stack in your operating system kernel to make this timeout shorter. The drawback is that this usually affects all connections from this machine and can be a dangerous thing to do. - You can try to work around it in Java by using threads that watch each other and report an error to the user if the connection attempt exceeds a certain time. Maybe you can avoid this problem by not using IP addresses at all. If you use DNS names, you will get a name resolution error quickly if you try to connect to a host that does not exist. Yours, Laurenz Albe From oliver@opencloud.com Tue Mar 31 09:05:52 2009 Received: from localhost (unknown [200.46.204.183]) by mail.postgresql.org (Postfix) with ESMTP id 2BBC5632B45 for ; Tue, 31 Mar 2009 06:05:52 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 51444-02 for ; Tue, 31 Mar 2009 06:05:48 -0300 (ADT) X-Greylist: delayed 00:33:56.68019 by SQLgrey-1.7.6 Received: from tremor.opencloud.co.nz (tremor.opencloud.co.nz [131.203.101.230]) by mail.postgresql.org (Postfix) with ESMTP id 0EF916328FC for ; Tue, 31 Mar 2009 06:05:47 -0300 (ADT) Received: from 219-89-243-186.adsl.xtra.co.nz ([219.89.243.186] helo=[192.168.1.3]) by tremor.opencloud.co.nz with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1LoZNi-0003WZ-4w; Tue, 31 Mar 2009 21:31:38 +1300 Message-ID: <49D1D4E6.8000709@opencloud.com> Date: Tue, 31 Mar 2009 21:31:34 +1300 From: Oliver Jowett User-Agent: Thunderbird 2.0.0.21 (X11/20090318) MIME-Version: 1.0 To: Albe Laurenz CC: mauricio.solis.h@gmail.com, pgsql-jdbc@postgresql.org Subject: Re: Problem References: <49CD084B.8000900@gmail.com> In-Reply-To: X-Enigmail-Version: 0.95.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/117 X-Sequence-Number: 19447 Albe Laurenz wrote: > Mauricio Solis wrote: >> I have a problem wiht de driver. >> >> If the IP address of the postgresql server is wrong, then the aplication >> take a lot of time in finish, iven I try to set >> DriverManager.setLoginTimeout(3), but the problem still. >> >> I used a sniffer (tcpdump) and I realiced that my java aplication insist >> in try to connect to the wrong IP. How I can finish the aplication when >> the IP server is wrong ??? > > I don't think that you run into the login timeout here, you rather encounter > a TCP timeout. Before JDBC can connect, a TCP connection must be established. > Since the destination IP address does not exist, your computer is sending > SYN requests that do not receive an answer until the TCP layer "gives up". Yes, but if you set a login timeout the driver will do the connect in a separate thread, so while that thread is indeed blocked waiting for a TCP-level timeout, the main application thread should not remain blocked. Mauricio, do you have a testcase that shows the problem? -O