Re: Connection is closed. Operation is not permitted. ------HELP....

Поиск
Список
Период
Сортировка
От Dave Cramer
Тема Re: Connection is closed. Operation is not permitted. ------HELP....
Дата
Msg-id 983526EC-5AA9-4DC2-9B19-8B2E64EF2E6C@fastcrypt.com
обсуждение исходный текст
Ответ на Re: Connection is closed. Operation is not permitted. ------HELP....  ("baisa, darwin" <darwin.baisa@ips.invensys.com>)
Список pgsql-jdbc
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.


В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Marek Lewczuk
Дата:
Сообщение: patch - support for multi-dimensional arrays and NULL values
Следующее
От: Marek Lewczuk
Дата:
Сообщение: Re: patch - support for multi-dimensional arrays and NULL values