0

I have a WebLogic server and oracle db. At some point WebLogic server returns with ORA-1422 error but while executing the same procedure from backend it works. Also this will work when I restart the WebLogic server.

Any idea why its happening like this and any resolutions?

  • Perhaps data changed in between? At some point query really returned TOO_MANY_ROWS, but then user fixed it so query returned result (once executed at backend). Restarting the server didn't have any impact (as data was already fixed). – Littlefoot Jan 26 '23 at 08:33
  • No data changed. When this issue happened we tried with the same data in backend and it works – syam kumar c Jan 26 '23 at 08:34

1 Answers1

2

If you have uncommitted data then it is only visible to the session in which the data was inserted/updated and each connection will be a different session even if you are connecting as the same user.

Therefore, if you insert/update some data and end up with duplicate data but forget to COMMIT it in the WebLogic server then you will only see the issue in the WebLogic server (particularly if you are using a connection pool and you are reusing the same connection and session over-and-over) because that session is the only one that can see the uncommitted data.

You will not see the issue from other connections (i.e. if you connect to the backend or if you close and reopen the WebLogic server's connections).

You need to check that you are always committing your data.

MT0
  • 143,790
  • 11
  • 59
  • 117
  • I'm using stored procedure.How can we able to debug more from weblogic??How can i tell server to use new session? – syam kumar c Jan 26 '23 at 11:01
  • @syamkumarc If this is your problem then you do not want to change your connections or use new sessions; you want to make sure that you always `COMMIT` your data. (Then you need to debug why you are getting duplicates; but if you `COMMIT` then you should be able to replicate the error in other sessions.) – MT0 Jan 26 '23 at 11:24
  • Yes,after validation we are inserting and commiting – syam kumar c Jan 26 '23 at 13:36