Question


Ruletek
US
Last activity: 19 Apr 2017 9:31 EDT
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: Proprietary information hidden)
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.
Thanks you,
Bryant
***Updated by moderator: Lochan to add Categories***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution


Pegasystems Inc.
US
Just want to clarify the resolution of this issue. This looks like a bug in the ojdbc7.jar version Proprietary information hidden.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
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4443)
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4490)
at oracle.jdbc.driver.T4CConnection.doSetAutoCommit(T4CConnection.java:943)
at oracle.jdbc.driver.PhysicalConnection.setAutoCommit(PhysicalConnection.java:4320)
at com.pega.pegarules.data.internal.access.DatabaseConnectionImpl.setAutoCommit(DatabaseConnectionImpl.java:794)
at com.pega.pegarules.data.internal.access.ConnectionManagerImpl.getConnectionFromDatabaseName(ConnectionManagerImpl.java:830)
... 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.
Just want to clarify the resolution of this issue. This looks like a bug in the ojdbc7.jar version Proprietary information hidden.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
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4443)
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4490)
at oracle.jdbc.driver.T4CConnection.doSetAutoCommit(T4CConnection.java:943)
at oracle.jdbc.driver.PhysicalConnection.setAutoCommit(PhysicalConnection.java:4320)
at com.pega.pegarules.data.internal.access.DatabaseConnectionImpl.setAutoCommit(DatabaseConnectionImpl.java:794)
at com.pega.pegarules.data.internal.access.ConnectionManagerImpl.getConnectionFromDatabaseName(ConnectionManagerImpl.java:830)
... 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 Proprietary information hidden.0 version and also with the ojdbc7 Proprietary information hidden.0 and it works as expected so I think the issue is just with the ojdbc7.jar Proprietary information hidden.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 Proprietary information hidden.0 version of the driver.


Pegasystems Inc.
US
Bryant,
What is your server configuration? (e.g., App server platform, DB platform, using XA driver or not etc)


Ruletek
US
I will answer as best I can but I am not sure what XA Driver is. If I miss anything specific let me know:
I will answer as best I can but I am not sure what XA Driver is. If I miss anything specific let me know:
PegaRULES Build Information
BuildName | coreAssemblyCached_717_644 |
BuildMajorVersion | 07 |
BuildMinorVersion | 10 |
Environment Information
ServerInfo: | JBoss Web/7.2.2.Final-redhat-1 |
System Properties
os.name | Linux |
os.arch | amd64 |
os.version | 2.6.18-406.el5 |
java.version | 1.7.0_03 |
java.vendor | Oracle Corporation |
PegaDatabase Information
DBName | pegarules |
DBProductName | Oracle |
DBProductVersion | Oracle Database 11g Enterprise Edition Release Proprietary information hidden.0 - 64bit Production With the Partitioning, Real Application Clusters, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options |
DBDriverName | Oracle JDBC driver |
DBDriverVersion | Proprietary information hidden.0 |


Pegasystems Inc.
US
ok, you are using JBoss. Can you attach the full logs with error stack and also the standalone.xml? Looks like you are able to replicate every single time, is that right?


Ruletek
US
Yes I can post the details when I get back into the office tomorrow. What is odd about this is that it is every other time but I can replicate it yes.
Updated: 29 Oct 2015 11:33 EDT


Ruletek
US
ERROR **Removed Address**|***MODERATOR REMOVED IP ADDRESS*** - Error in RDB-List
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:***MODERATOR REMOVED IP ADDRESS)
Caused by SQL Problems.
Problem #1, SQLState 99999, Error code 17273: java.sql.SQLException: Could not commit with auto-commit set on
at com.pega.pegarules.data.internal.access.ExceptionInformation.createExceptionDueToDBFailure(ExceptionInformation.java:257)
at com.pega.pegarules.data.internal.access.ConnectionManagerImpl.getConnectionFromDatabaseName(ConnectionManagerImpl.java:856)
at com.pega.pegarules.data.internal.access.ConnectionManagerImpl.getConnection(ConnectionManagerImpl.java:1187)
at com.pega.pegarules.data.internal.access.ConnectionManagerImpl.getConnection(ConnectionManagerImpl.java:1129)
at com.pega.pegarules.data.internal.access.ConnectionManagerImpl.getConnection(ConnectionManagerImpl.java:343)
at com.pega.pegarules.data.internal.access.ThreadConnectionStoreImpl.getConnection(ThreadConnectionStoreImpl.java:424)
at com.pega.pegarules.data.internal.access.RDBPageResultPackager.getConnection(RDBPageResultPackager.java:923)
at com.pega.pegarules.data.internal.access.DatabaseImpl.list(DatabaseImpl.java:5839)
ERROR **Removed Address**|***MODERATOR REMOVED IP ADDRESS*** - Error in RDB-List
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:***MODERATOR REMOVED IP ADDRESS)
Caused by SQL Problems.
Problem #1, SQLState 99999, Error code 17273: java.sql.SQLException: Could not commit with auto-commit set on
at com.pega.pegarules.data.internal.access.ExceptionInformation.createExceptionDueToDBFailure(ExceptionInformation.java:257)
at com.pega.pegarules.data.internal.access.ConnectionManagerImpl.getConnectionFromDatabaseName(ConnectionManagerImpl.java:856)
at com.pega.pegarules.data.internal.access.ConnectionManagerImpl.getConnection(ConnectionManagerImpl.java:1187)
at com.pega.pegarules.data.internal.access.ConnectionManagerImpl.getConnection(ConnectionManagerImpl.java:1129)
at com.pega.pegarules.data.internal.access.ConnectionManagerImpl.getConnection(ConnectionManagerImpl.java:343)
at com.pega.pegarules.data.internal.access.ThreadConnectionStoreImpl.getConnection(ThreadConnectionStoreImpl.java:424)
at com.pega.pegarules.data.internal.access.RDBPageResultPackager.getConnection(RDBPageResultPackager.java:923)
at com.pega.pegarules.data.internal.access.DatabaseImpl.list(DatabaseImpl.java:5839)
at com.pega.pegarules.data.internal.access.DatabaseImpl.executeRDB(DatabaseImpl.java:6473)
at com.pega.pegarules.data.internal.access.DatabaseImpl.executeRDB(DatabaseImpl.java:6429)
at com.pega.pegarules.data.internal.access.DatabaseImpl.listRDB(DatabaseImpl.java:6377)
at com.pegarules.generated.activity.sh_action_getfir_2eb00e5259a8267afa2fc8c6c630a005.step3_circum0(sh_action_getfir_2eb00e5259a8267afa2fc8c6c630a005.java:396)
at com.pegarules.generated.activity.sh_action_getfir_2eb00e5259a8267afa2fc8c6c630a005.perform(sh_action_getfir_2eb00e5259a8267afa2fc8c6c630a005.java:110)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3375)
at com.pega.pegarules.session.internal.mgmt.Executable.doAction(Executable.java:3096)
at com.pegarules.generated.activity.ra_action_pyrunrecordexecute_2bd86d392e84ac741a2083e8db29d3a9.step1_circum0(ra_action_pyrunrecordexecute_2bd86d392e84ac741a2083e8db29d3a9.java:190)
at com.pegarules.generated.activity.ra_action_pyrunrecordexecute_2bd86d392e84ac741a2083e8db29d3a9.perform(ra_action_pyrunrecordexecute_2bd86d392e84ac741a2083e8db29d3a9.java:69)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3375)
at com.pega.pegarules.session.internal.mgmt.Executable.invokeActivity(Executable.java:10450)
at com.pegarules.generated.activity.ra_action_pzrunrecordexecute_4cd34c6d9fc3e5a3369c6d2e321acb33.step8_circum0(ra_action_pzrunrecordexecute_4cd34c6d9fc3e5a3369c6d2e321acb33.java:787)
at com.pegarules.generated.activity.ra_action_pzrunrecordexecute_4cd34c6d9fc3e5a3369c6d2e321acb33.perform(ra_action_pzrunrecordexecute_4cd34c6d9fc3e5a3369c6d2e321acb33.java:193)
at com.pega.pegarules.session.internal.mgmt.Executable.doActivity(Executable.java:3375)
at com.pega.pegarules.session.internal.mgmt.base.ThreadRunner.runActivitiesAlt(ThreadRunner.java:641)
at com.pega.pegarules.session.internal.mgmt.PRThreadImpl.runActivitiesAlt(PRThreadImpl.java:435)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.runActivities(HttpAPI.java:3252)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequestInner(EngineAPI.java:384)
at sun.reflect.GeneratedMethodAccessor136.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.performTargetActionWithLock(PRSessionProviderImpl.java:1188)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:926)
at com.pega.pegarules.session.internal.PRSessionProviderImpl.doWithRequestorLocked(PRSessionProviderImpl.java:811)
at com.pega.pegarules.session.external.engineinterface.service.EngineAPI.processRequest(EngineAPI.java:330)
at com.pega.pegarules.session.internal.engineinterface.service.HttpAPI.invoke(HttpAPI.java:839)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl._invokeEngine_privact(EngineImpl.java:315)
at com.pega.pegarules.session.internal.engineinterface.etier.impl.EngineImpl.invokeEngine(EngineImpl.java:263)
at com.pega.pegarules.session.internal.engineinterface.etier.ejb.EngineBean.invokeEngine(EngineBean.java:225)
at sun.reflect.GeneratedMethodAccessor112.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:338)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:379)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:216)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingException(AppServerBridgeToPega.java:238)
at com.pega.pegarules.internal.etier.ejb.EngineBeanBoot.invokeEngine(EngineBeanBoot.java:168)
at sun.reflect.GeneratedMethodAccessor111.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.jboss.as.ee.component.ManagedReferenceMethodInterceptorFactory$ManagedReferenceMethodInterceptor.processInvocation(ManagedReferenceMethodInterceptorFactory.java:72)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:58)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.WeavedInterceptor.processInvocation(WeavedInterceptor.java:53)
at org.jboss.as.ee.component.interceptors.UserInterceptorFactory$1.processInvocation(UserInterceptorFactory.java:58)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.invocationmetrics.ExecutionTimeInterceptor.processInvocation(ExecutionTimeInterceptor.java:43)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.jpa.interceptor.SBInvocationInterceptor.processInvocation(SBInvocationInterceptor.java:47)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.tx.EjbBMTInterceptor.handleInvocation(EjbBMTInterceptor.java:104)
at org.jboss.as.ejb3.tx.BMTInterceptor.processInvocation(BMTInterceptor.java:56)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.InitialInterceptor.processInvocation(InitialInterceptor.java:21)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.interceptors.ComponentDispatcherInterceptor.processInvocation(ComponentDispatcherInterceptor.java:53)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.pool.PooledInstanceInterceptor.processInvocation(PooledInstanceInterceptor.java:51)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.interceptors.CurrentInvocationContextInterceptor.processInvocation(CurrentInvocationContextInterceptor.java:41)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.security.SecurityContextInterceptor.processInvocation(SecurityContextInterceptor.java:76)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.interceptors.ShutDownInterceptorFactory$1.processInvocation(ShutDownInterceptorFactory.java:64)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.interceptors.LoggingInterceptor.processInvocation(LoggingInterceptor.java:59)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.interceptors.EjbExceptionTransformingInterceptorFactories$2.processInvocation(EjbExceptionTransformingInterceptorFactories.java:89)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ejb3.component.interceptors.AdditionalSetupInterceptor.processInvocation(AdditionalSetupInterceptor.java:55)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.as.ee.component.TCCLInterceptor.processInvocation(TCCLInterceptor.java:45)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.ViewService$View.invoke(ViewService.java:165)
at org.jboss.as.ee.component.ViewDescription$1.processInvocation(ViewDescription.java:182)
at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:288)
at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:61)
at org.jboss.as.ee.component.ProxyInvocationHandler.invoke(ProxyInvocationHandler.java:72)
at com.pega.pegarules.internal.etier.interfaces.EngineLocal$$$view8.invokeEngine(Unknown Source)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngineInner(JNDIEnvironment.java:278)
at com.pega.pegarules.priv.context.JNDIEnvironment.invokeEngine(JNDIEnvironment.java:223)
at com.pega.pegarules.web.impl.WebStandardImpl.makeEtierRequest(WebStandardImpl.java:485)
at com.pega.pegarules.web.impl.WebStandardImpl.doPost(WebStandardImpl.java:290)
at sun.reflect.GeneratedMethodAccessor134.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethod(PRBootstrap.java:338)
at com.pega.pegarules.internal.bootstrap.PRBootstrap.invokeMethodPropagatingThrowable(PRBootstrap.java:379)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethodPropagatingThrowable(AppServerBridgeToPega.java:216)
at com.pega.pegarules.boot.internal.extbridge.AppServerBridgeToPega.invokeMethod(AppServerBridgeToPega.java:265)
at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doPost(WebStandardBoot.java:118)
at com.pega.pegarules.internal.web.servlet.WebStandardBoot.doGet(WebStandardBoot.java:89)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:734)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:407)
at org.jboss.as.web.session.ClusteredSessionValve.handleRequest(ClusteredSessionValve.java:134)
at org.jboss.as.web.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:99)
at org.jboss.as.web.session.JvmRouteValve.invoke(JvmRouteValve.java:92)
at org.jboss.as.web.session.LockingValve.invoke(LockingValve.java:64)
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:145)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:336)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:920)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.sql.SQLException: Could not commit with auto-commit set on
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4443)
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4490)
at oracle.jdbc.driver.T4CConnection.doSetAutoCommit(T4CConnection.java:943)
at oracle.jdbc.driver.PhysicalConnection.setAutoCommit(PhysicalConnection.java:4320)
at com.pega.pegarules.data.internal.access.DatabaseConnectionImpl.setAutoCommit(DatabaseConnectionImpl.java:794)
at com.pega.pegarules.data.internal.access.ConnectionManagerImpl.getConnectionFromDatabaseName(ConnectionManagerImpl.java:830)
... 124 more


Pegasystems Inc.
US
thanks, Bryant. Please go ahead and create a SR with your standalone.xml and the complete server log (PegaRULES and server.log from JBoss) - someone from Pega will help you.


Pegasystems Inc.
US
Hi Bryant Pitman,
Were you able to create an SR per Kevin Zheng's request above? If so, please let us know the SR so that we can add it to the thread for tracking!
Thanks!


Pegasystems Inc.
US
Perfect! Thank you Bryant!


Ruletek
US
Here is the response from Pega Support that eventually fixed my issue:
"In your 6.x environment you are using the Proprietary information hidden.0 version of the Oracle JDBC driver. In 7.x you are using the Proprietary information hidden.0 version. There is a change in behavior with the 12.x version of the driver which I believe is causing this problem. I would like to test this theory out. In the 7.x environment could you either try using the older version of the driver or add this JVM argument (-Doracle.jdbc.autoCommitSpecCompliant=false) and then test this again and see if the behavior reverts to the working scenario."
We used the JVM argument and it fixed the error. Apparently my RDB_List query should not have been using the auto commit as it is not a global transaction. They are still trying to see why it was the case here.
Thanks,
Bryant
Accepted Solution


Pegasystems Inc.
US
Just want to clarify the resolution of this issue. This looks like a bug in the ojdbc7.jar version Proprietary information hidden.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
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4443)
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4490)
at oracle.jdbc.driver.T4CConnection.doSetAutoCommit(T4CConnection.java:943)
at oracle.jdbc.driver.PhysicalConnection.setAutoCommit(PhysicalConnection.java:4320)
at com.pega.pegarules.data.internal.access.DatabaseConnectionImpl.setAutoCommit(DatabaseConnectionImpl.java:794)
at com.pega.pegarules.data.internal.access.ConnectionManagerImpl.getConnectionFromDatabaseName(ConnectionManagerImpl.java:830)
... 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.
Just want to clarify the resolution of this issue. This looks like a bug in the ojdbc7.jar version Proprietary information hidden.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
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4443)
at oracle.jdbc.driver.PhysicalConnection.commit(PhysicalConnection.java:4490)
at oracle.jdbc.driver.T4CConnection.doSetAutoCommit(T4CConnection.java:943)
at oracle.jdbc.driver.PhysicalConnection.setAutoCommit(PhysicalConnection.java:4320)
at com.pega.pegarules.data.internal.access.DatabaseConnectionImpl.setAutoCommit(DatabaseConnectionImpl.java:794)
at com.pega.pegarules.data.internal.access.ConnectionManagerImpl.getConnectionFromDatabaseName(ConnectionManagerImpl.java:830)
... 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 Proprietary information hidden.0 version and also with the ojdbc7 Proprietary information hidden.0 and it works as expected so I think the issue is just with the ojdbc7.jar Proprietary information hidden.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 Proprietary information hidden.0 version of the driver.