Re: SQLException "Connection is closed. Operation is not

From: Ragnar Hafstað <gnari(at)simnet(dot)is>
To: Rajiv Verma <verma(dot)rk(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: SQLException "Connection is closed. Operation is not
Date: 2005-04-25 08:54:10
Message-ID: 1114419250.30043.33.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Mon, 2005-04-25 at 03:38 +0530, Rajiv Verma wrote:
> I'm accessing postgres database through tomcat 4.3.1.
> I'm able to execute the select and update query through my application
> but Insert query is giving following SQLException :
> Connection is closed. Operation is not permitted.

looks like your application is closing the database
connection before the insert.

are you doing the insert within the same tomcat
request as the selects ?

con you reproduce this using the simplest possible
test case. i.e:
have your doPost() only
a) open db connection
b) perform select
c) perform insert
d) close db connection
e) return ok page

gnari

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message K.RajaSekar 2005-04-25 10:07:53 Installation problem with the version 8.0.2
Previous Message Piotr Filipczuk 2005-04-25 08:53:57 column size in libpq