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

From Durgabhavani.g
Subject Reg: 25P02, current transaction is aborted, commands ignored until end of transaction block
Date
Msg-id 000801c9b9c2$6b89b270$f102a8c0@ocimumbio.net
Whole thread Raw
Responses Re: Reg: 25P02, current transaction is aborted, commands ignored until end of transaction block  (toruvinn <toruvinn@lain.pl>)
Re: Reg: 25P02, current transaction is aborted, commands ignored until end of transaction block  (ajay labade <ajaylabade@gmail.com>)
List pgsql-bugs
Dear all,

    I am trying to port my application from Oracle to PostGREs. I have a pr=
oblem while doing so. In my application i need to update record if the dele=
te on the respective record is failed due to Constraint Violation. But SQL =
Error: 0, SQLState: 25P02 ERROR [JDBCExceptionReporter] ERROR: current tran=
saction is aborted, commands ignored until end of transaction block is bein=
g 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 proble=
m still exists.

Here is the code that i worked on:

try{
    session =3D sessionManager.getSession();
    transaction =3D 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 an=
d OS Windows me.

Thanks in advance,
Bhavani.G=

pgsql-bugs by date:

Previous
From: "Vlad"
Date:
Subject: BUG #4754: erro
Next
From: Peter Eisentraut
Date:
Subject: Re: libpq 8.4 beta1: $PGHOST complains about missing root.crt