Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id CC6879FA47A for ; Sun, 8 Jul 2007 18:11:32 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 64744-08 for ; Sun, 8 Jul 2007 18:11:29 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from beaver.fastcrypt.com (beaver.fastcrypt.com [64.7.141.17]) by postgresql.org (Postfix) with ESMTP id E484B9FA410 for ; Sun, 8 Jul 2007 18:11:28 -0300 (ADT) Received: from [192.168.1.14] (dcdsl.ebox.com [64.7.143.116]) by beaver.fastcrypt.com (Postfix) with ESMTP id A79D8158066C; Sun, 8 Jul 2007 17:24:38 -0400 (EDT) In-Reply-To: <330AD55C03209F4E910EC134D0158CD227ED0D@INHYDSRVXCH001.ipscorp.invensys.com> References: <330AD55C03209F4E910EC134D0158CD236A9A6@INHYDSRVXCH001.ipscorp.invensys.com> <330AD55C03209F4E910EC134D0158CD227ED0D@INHYDSRVXCH001.ipscorp.invensys.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: multipart/alternative; boundary=Apple-Mail-2--536554351 Message-Id: <983526EC-5AA9-4DC2-9B19-8B2E64EF2E6C@fastcrypt.com> Cc: From: Dave Cramer Subject: Re: Connection is closed. Operation is not permitted. ------HELP.... Date: Sun, 8 Jul 2007 17:11:15 -0400 To: "baisa, darwin" X-Mailer: Apple Mail (2.752.3) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/31 X-Sequence-Number: 17205 --Apple-Mail-2--536554351 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Hi Darwin, No, it's not likely to be a driver/JDK mismatch. It's more likely a bug that was in the original code that didn't manifest itself with the older jdk. Dave On 6-Jul-07, at 11:30 PM, baisa, darwin wrote: > Dave, > It is totally not expectable. Exception location is random and I > am unable track that. When i am trying to delete bulk of data which > includes hundreds of delete queries and will be executed > sequentially. In the middle of execution of these queries the > exception occurring and also when i am trying to cache (read) the > data. > Do you think is there any driver and JDK mismatch? > > Regards, > Darwin > > -----Original Message----- > From: Dave Cramer [mailto:pg@fastcrypt.com] > Sent: Fri 7/6/2007 8:01 PM > To: baisa, darwin > Cc: pgsql-jdbc@postgresql.org > Subject: Re: [JDBC] Connection is closed. Operation is not > permitted. ------HELP.... > > Hi, > > Show me the code before the exception occurs. So far this looks good. > > Dave > On 6-Jul-07, at 8:58 AM, baisa, darwin wrote: > > > Hi Dave, Thanks for a quick reply > > > > > > > > My code for getting connection follows like this. > > > > > > > > private static final String DRIVER_CLASS = > > "org.postgresql.Driver"; > > > > private static final String URL = "jdbc:postgresql:"; > > > > private static final String databaseName = "MYDB"; > > > > > > > > protected Connection getDbConnection() { > > > > Assertion.assrt(databaseName != null, "databaseName is > null"); > > > > Connection con = null; > > > > String dbStr = URL + databaseName; > > > > > > > > try { > > > > Class.forName(DRIVER_CLASS); > > > > con = DriverManager.getConnection(dbStr, username, ""); > > > > } catch (ClassNotFoundException e) { > > > > throw new MyOwnInternalError("Database driver for " + > > dbStr + " not found"); > > > > } catch (SQLException e) { > > > > throw new MyOwnQueryException("Error connecting to > > database: " + dbStr, e); > > > > } > > > > > > > > Assertion.assrt(con != null, "Connection creation failed"); > > > > return con; > > > > } > > > > > > > > > > > > This is the way I am using. Is this helpful? But one thing is that > > my application was working very fine with JDK1.4. After upgrading > > to JDK 1.6 release only this problem arise. > > > > Do you want some more information? I am ready to give. > > > > > > > > > > > > Thanks > > > > Darwin > > > > From: Dave Cramer [mailto:pg@fastcrypt.com] > > Sent: Friday, July 06, 2007 5:58 PM > > To: baisa, darwin > > Cc: pgsql-jdbc@postgresql.org > > Subject: Re: [JDBC] Connection is closed. Operation is not > > permitted. ------HELP.... > > > > > > > > We'd have to see more than this to help you. > > > > > > > > Can you show us how you are using the driver ? > > > > > > > > Davde > > > > On 6-Jul-07, at 7:31 AM, baisa, darwin wrote: > > > > > > > > > > Hi friends, > > > > I have an application built on top of postgres > > database. I recently updated my JRE from 1.4 to 1.6, with out > > changing the code. > > > > > > > > But my application is throwing following exception frequently. > > > > > > > > org.postgresql.util.PSQLException: Connection is closed. Operation > > is not permitted. > > > > at org.postgresql.jdbc1.AbstractJdbc1ResultSet.next > > (AbstractJdbc1ResultSet.java:138) > > > > > > > > I am using "PostgreSQL 7.4.1" database server and "pg74.1jdbc3.jar" > > driver. Can any one please help in this issue? It is affecting > > whole system. > > > > Do I need to upgrade my Driver also? If yes what is the correct > > driver for JDK 1.6 with PostgreSQL7.4.1 server? > > > > > > > > > > > > Thanks, > > > > Darwin > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Confidentiality Notice: The information contained in this > > electronic message and any attachment(s) to this message are > > intended for the exclusive use of the recipient(s) and may contain > > confidential, privileged or proprietary information. If you are not > > the intended recipient, please notify the sender immediately, > > delete all copies of this message and any attachment(s). Any other > > use of the E-Mail by you is prohibited. > > > > > > > > > > Confidentiality Notice: The information contained in this > > electronic message and any attachment(s) to this message are > > intended for the exclusive use of the recipient(s) and may contain > > confidential, privileged or proprietary information. If you are not > > the intended recipient, please notify the sender immediately, > > delete all copies of this message and any attachment(s). Any other > > use of the E-Mail by you is prohibited. > > > > > Confidentiality Notice: The information contained in this > electronic message and any attachment(s) to this message are > intended for the exclusive use of the recipient(s) and may contain > confidential, privileged or proprietary information. If you are not > the intended recipient, please notify the sender immediately, > delete all copies of this message and any attachment(s). Any other > use of the E-Mail by you is prohibited. --Apple-Mail-2--536554351 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=ISO-8859-1 Hi Darwin,

No, it's not likely to be a = driver/JDK mismatch. It's more likely a bug that was in the original = code that didn't manifest itself with the older jdk.=A0

Dave
On = 6-Jul-07, at 11:30 PM, baisa, darwin wrote:

Dave,
=A0It is totally not expectable. Exception location = is random and I am unable track that. When i am trying to delete bulk of = data which includes hundreds of delete queries and will be executed = sequentially. In the middle of execution of these queries the exception = occurring and also when i am trying to cache (read) the data.
Do you = think is there any driver and JDK mismatch?

Regards,
= Darwin

-----Original Message-----
From: Dave Cramer [mailto:pg@fastcrypt.com]
Sent: = Fri 7/6/2007 8:01 PM
To: baisa, darwin
Cc: pgsql-jdbc@postgresql.org Subject: Re: [JDBC] Connection is closed.=A0 Operation is not = permitted. ------HELP....

Hi,

Show me the code before = the exception occurs. So far this looks good.

Dave
On = 6-Jul-07, at 8:58 AM, baisa, darwin wrote:

> Hi Dave, Thanks = for a quick reply
>
>
>
> My code for = getting connection follows like this.
>
>
>
= >=A0=A0=A0=A0 private static final String DRIVER_CLASS =3D=A0
= > "org.postgresql.Driver";
>
>=A0=A0=A0=A0 private = static final String URL =3D "jdbc:postgresql:";
>
>=A0=A0=A0= =A0 private static final String databaseName =3D "MYDB";
>
= >
>
>=A0=A0=A0=A0 protected Connection = getDbConnection() {
>
>=A0=A0=A0=A0=A0=A0=A0=A0 = Assertion.assrt(databaseName !=3D null, "databaseName is null");
= >
>=A0=A0=A0=A0=A0=A0=A0=A0 Connection con =3D null;
= >
>=A0=A0=A0=A0=A0=A0=A0=A0 String dbStr =3D URL + = databaseName;
>
>
>
>=A0=A0=A0=A0=A0=A0=A0=A0 = try {
>
>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 = Class.forName(DRIVER_CLASS);
>
>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0 con =3D DriverManager.getConnection(dbStr, username, "");
= >
>=A0=A0=A0=A0=A0=A0=A0=A0 } catch (ClassNotFoundException e) = {
>
>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 throw new = MyOwnInternalError("Database driver for " +=A0
> dbStr + " not = found");
>
>=A0=A0=A0=A0=A0=A0=A0=A0 } catch (SQLException = e) {
>
>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 throw new = MyOwnQueryException("Error connecting to=A0
> database: " + = dbStr, e);
>
>=A0=A0=A0=A0=A0=A0=A0=A0 }
>
= >
>
>=A0=A0=A0=A0=A0=A0=A0=A0 Assertion.assrt(con !=3D = null, "Connection creation failed");
>
>=A0=A0=A0=A0=A0=A0=A0= =A0 return con;
>
>=A0=A0=A0=A0 }
>
>
= >
>
>
> This is the way I am using. Is this = helpful? But one thing is that=A0
> my application was working = very fine with JDK1.4. After upgrading=A0
> to JDK 1.6 release = only this problem arise.
>
> Do you want some more = information? I am ready to give.
>
>
>
>
= >
> Thanks
>
> Darwin
>
> From: = Dave Cramer [mailto:pg@fastcrypt.com]
> = Sent: Friday, July 06, 2007 5:58 PM
> To: baisa, darwin
> = Cc: pgsql-jdbc@postgresql.org > Subject: Re: [JDBC] Connection is closed. Operation is not=A0
= > permitted. ------HELP....
>
>
>
> We'd = have to see more than this to help you.
>
>
>
= > Can you show us how you are using the driver ?
>
= >
>
> Davde
>
> On 6-Jul-07, at 7:31 AM, = baisa, darwin wrote:
>
>
>
>
> Hi = friends,
>
>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 I have an = application built on top of postgres=A0
> database. I recently = updated my JRE from 1.4 to 1.6, with out=A0
> changing the = code.
>
>
>
> But my application is throwing = following exception frequently.
>
>
>
> = org.postgresql.util.PSQLException: Connection is closed.=A0 = Operation=A0
> is not permitted.
>
>=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 at = org.postgresql.jdbc1.AbstractJdbc1ResultSet.next
> = (AbstractJdbc1ResultSet.java:138)
>
>
>
> I = am using "PostgreSQL 7.4.1" database server and "pg74.1jdbc3.jar"=A0
= > driver. Can any one please help in this issue? It is affecting=A0
= > whole system.
>
> Do I need to upgrade my Driver = also? If yes what is the correct=A0
> driver for JDK 1.6 with = PostgreSQL7.4.1 server?
>
>
>
>
>
= > Thanks,
>
> Darwin
>
>
>
= >
>
>
>
>
>
>
>
= >
>
>
>
>
> Confidentiality = Notice: The information contained in this=A0
> electronic message = and any attachment(s) to this message are=A0
> intended for the = exclusive use of the recipient(s) and may contain=A0
> = confidential, privileged or proprietary information. If you are not=A0
= > the intended recipient, please notify the sender immediately,=A0
= > delete all copies of this message and any attachment(s). Any = other=A0
> use of the E-Mail by you is prohibited.
>
= >
>
>
> Confidentiality Notice: The information = contained in this=A0
> electronic message and any attachment(s) = to this message are=A0
> intended for the exclusive use of the = recipient(s) and may contain=A0
> confidential, privileged or = proprietary information. If you are not=A0
> the intended = recipient, please notify the sender immediately,=A0
> delete all = copies of this message and any attachment(s). Any other=A0
> use = of the E-Mail by you is prohibited.



Confidentiality Notice: The information contained in this = electronic message and any attachment(s) to this message are intended = for the exclusive use of the recipient(s) and may contain confidential, = privileged or proprietary information. If you are not the intended = recipient, please notify the sender immediately, delete all copies of = this message and any attachment(s). Any other use of the E-Mail by you = is prohibited.

= --Apple-Mail-2--536554351--