I am having an error when using an RDB-List or Obj-Browse method. Every other time I run the activity to access this table I get the following error:
(Pega 7.1.7) I am having an error when using an RDB-List or Obj-Browse method. Every other time I run the activity to access this table I get the following error:
com.pega.pegarules.pub.database.DatabaseException: Database-General Problem encountered when getting connection for database fdmsub 17273 99999 Could not commit with auto-commit set on From: (HB1FCCC0406A68E36E65C47464B3E57EA:126.96.36.199)
Caused by SQL Problems.
Problem #1, SQLState 99999, Error code 17273: java.sql.SQLException: Could not commit with auto-commit set on
I have the rest of the log error if needed.
As a note, this same process functions properly in Pega 6.
If any more information is needed let me know and I will respond.
***Updated by moderator: Lochan to add Categories***
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
Just want to clarify the resolution of this issue. This looks like a bug in the ojdbc7.jar version 188.8.131.52.0. I do not think it is related to whether this is part of a global transaction or not.
Caused by: java.sql.SQLException: Could not commit with auto-commit set on
... 124 more
If you look at this stack trace the Pega code has a database connection and is trying to setAutoCommit. For an RDB it would be setting it to true.
As we can see from the Oracle driver documentation and from the stack trace it is the Oracle driver that is actually issuing the commit statement.
Oracle JDBC 12.1 drivers comply with JDBC specification 4.1 and will:
throw SQLException when Connection.commit() or Connection.rollback() is invoked when auto-commit is true.
issue an implicit commit of the local transaction when Connection.setAutoCommit(boolean) is called and the mode is changed from false to true.
Per the documentation an implicit commit is called when setAutoCommit is changed from false to true. If they did the commit check when autocommit is false and before it is changed to true then this exception wouldn't be thrown. Either they are not issuing the commit until after it has been changed to true and/or are also issue the commit check for true to true or true to false transitions.
ie, false to false, true to true, true to false should all not be testing the commit
I wrote a simple Java program to confirm this. I have tried this with the ojdbc6.jar 184.108.40.206.0 version and also with the ojdbc7 220.127.116.11.0 and it works as expected so I think the issue is just with the ojdbc7.jar 18.104.22.168.0 version that you are using. The resolution would be to either keep the compliance check shutoff by adding this JVM argument (-Doracle.jdbc.autoCommitSpecCompliant=false) or to upgrade to the 22.214.171.124.0 version of the driver.
Keep up to date on this post and subscribe to comments
- Performance of Obj-Browse and RDB-list
- RDB-List or Obj-Browse?
- ORA-00942: table or view does not exist, when trying to execute RDB-List method.
- obj-browse running to error when using "integer property Is Equal intege param number" as the select condition...
- AutoComplete Using RDB-List Method in Activity