Bug 64012 - Hardcoded enableAutoCommitOnReturn for dataSource cause failed test suite for some DBs
Summary: Hardcoded enableAutoCommitOnReturn for dataSource cause failed test suite for...
Status: NEW
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 5.2.1
Hardware: PC Mac OS X 10.1
: P2 normal (vote)
Target Milestone: JMETER_5.2
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-17 20:43 UTC by Dmitry Sherstobitov
Modified: 2019-12-17 20:43 UTC (History)
0 users



Attachments
Example JMX (6.91 KB, application/xml)
2019-12-17 20:43 UTC, Dmitry Sherstobitov
Details

Note You need to log in before you can comment on or make changes to this bug.
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.