Bug 64012

Summary: Hardcoded enableAutoCommitOnReturn for dataSource cause failed test suite for some DBs
Product: JMeter - Now in Github Reporter: Dmitry Sherstobitov <sdn.xaoc>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: NEW ---    
Severity: normal    
Priority: P2    
Version: 5.2.1   
Target Milestone: JMETER_5.2   
Hardware: PC   
OS: Mac OS X 10.1   
Attachments: Example JMX

Description Dmitry Sherstobitov 2019-12-17 20:43:18 UTC
Created attachment 36920 [details]
Example JMX

Currently confirmed for Derby DB:

1. Create 2 JDBC Connections: first with autoCommit=true, other with autoCommit=false
2. Create 2 JDBC Samples with any statements (create table in example jmx file. change user_define_classpath property in the example)
3. While executing this test suite - exception occurs:

java.sql.SQLException: Cannot create PoolableConnectionFactory (Cannot close a connection while a transaction is still active.)


Commenting following line of code solves this issue:
org/apache/jmeter/protocol/jdbc/config/DataSourceElement.java:232
dataSource.setEnableAutoCommitOnReturn(false);

(This code was introduced in 3.3 version)


This behavior is hardcoded and there is no way no change this inside Jmeter.
Comment 1 The ASF infrastructure team 2022-09-24 20:38:18 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/5211