eppesuig
Posts: 1
|
Posted: 10/06/2008, 6:52 AM |
|
Hi all,
our application uses a pool of database connection. Sometimes a statement (often it is an INSERT or UPDATE statement) give and error that invalidate our transaction.
From that moment on, I get exceptions like this:
org.postgresql.util.PSQLException: ERROR: current transaction is aborted, commands ignored until end of transaction
block
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:1512)
at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1297)
at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:188)
at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:430)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:346)
at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:250)
at com.codecharge.db.RawCommand.getOneRow(RawCommand.java:208)
at Login.LoginDataObject.load(LoginDataObject.java:62)
at Login.LoginAction$LoginClass.read(LoginAction.java:133)
at Login.LoginAction$LoginClass.perform(LoginAction.java:100)
at Login.LoginAction.perform(LoginAction.java:52)
at com.codecharge.ControllerServlet.service(ControllerServlet.java:94)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
[...]
and no other database activity may be done.
The problem can be solved calling connection.rollback() when catching the first exception, but that code is automatically generated by codecarge so we cannot change it.
Is there any viable solution?
Thank you very much,
Giuseppe
|