Re: Reg: 25P02, current transaction is aborted, commands ignored until end of transaction block - Mailing list pgsql-bugs

From ajay labade
Subject Re: Reg: 25P02, current transaction is aborted, commands ignored until end of transaction block
Date
Msg-id 25677673.post@talk.nabble.com
Whole thread Raw
In response to Reg: 25P02, current transaction is aborted, commands ignored until end of transaction block  ("Durgabhavani.g" <durgabhavani.g@ocimumbio.com>)
Responses Re: Reg: 25P02, current transaction is aborted, commands ignored until end of transaction block  (ajay labade <ajaylabade@gmail.com>)
Re: Reg: 25P02, current transaction is aborted, commands ignored until end of transaction block  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-bugs
bhavani gade wrote:
>
> Dear all,
>
>     I am trying to port my application from Oracle to PostGREs. I have a
> problem while doing so. In my application i need to update record if the
> delete on the respective record is failed due to Constraint Violation. But
> SQL Error: 0, SQLState: 25P02 ERROR [JDBCExceptionReporter] ERROR: current
> transaction is aborted, commands ignored until end of transaction block is
> being generated while updating the record. But with Oracle i am able to do
> this.
>
> I have tried with latest Jar [postgresql-8.3-604.jdbc3.jar] too, but
> problem still exists.
>
> Here is the code that i worked on:
>
> try{
>     session = sessionManager.getSession();
>     transaction = session.beginTransaction();
>     session.delete(objects[i]);
>     session.flush();
> }catch(ConstraintViolationException e){
>     objects[i].setDeleted(Integer.valueOf(1));
>     session.saveOrUpdate(object[i]);
>     session.flush();
> }
> transaction.commit();
> sessionManager.closeSession(session);
>
> I am using platform java 1.5, jBoss 4.2.3, Hibernate v3.3, PostGREs v8.3
> and OS Windows me.
>
> Thanks in advance,
> Bhavani.G
>

--
View this message in context:
http://www.nabble.com/Reg%3A-25P02%2C-current-transaction-is-aborted%2C-commands-ignored-until-end-of-transaction-block-tp22986191p25677673.html
Sent from the PostgreSQL - bugs mailing list archive at Nabble.com.

pgsql-bugs by date:

Previous
From: "Yamashkin Alex"
Date:
Subject: BUG #5089: not supported plpsql
Next
From: ajay labade
Date:
Subject: Re: Reg: 25P02, current transaction is aborted, commands ignored until end of transaction block