I believe I found a bug in the org.apache.jmeter.protocol.jdbc.util.DBConnectionManager class. The errant symptom was a NullPointerException being thrown with the following stack trace: java.lang.NullPointerException at java.util.Hashtable.get(Unknown Source) at org.apache.jmeter.protocol.jdbc.util.DBConnectionManager.releaseConnection (DBConnectionManager.java:211) at org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.sample (JDBCSampler.java:169) at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:138) at java.lang.Thread.run(Unknown Source) The conditions under which this exception was triggered were as follow: - Test Plan - Test Group (number of threads 1; ramp-up 0; loop count 100) - JDBC Database Connection Pool Defaults (pool size 5; max usage 50) - JDBC Database Login Defaults (...) - JDBC Request (pool size 5; max usage 50; query="[valid query]") - Constant Timer (thread delay 100 ms) - Graph Results - View Results Tree The exception is thrown in either of the following two scenarios: User "starts" the test (from the "Run" menu) User can either allow the test to complete or not... User "stops" the test (from the "Run" menu) Any starting or stopping of the test after this point, including the last mentioned stop, yields the aforementioned NullPointerException. The error is a simple one, though, and can be easily fixed. The solution is as follows: Insert between line 190 and line 191 the following lines of code: if(connectionArray==null) { setup(key); connectionArray=(ConnectionObject[])connections.get(key); }
Again, the solution is as follows: Insert between line 190 and line 191 the following lines of code: if(connectionArray==null) { setup(key); connectionArray=(ConnectionObject[])connections.get(key); }
My apologies; forgot to mention the class in error: Insert between line 190 and line 191 of class, org.apache.jmeter.protocol.jdbc.util.DBConnectionManager the following lines of code: if(connectionArray==null) { setup(key); connectionArray=(ConnectionObject[])connections.get(key); }
Marking all bugs RESOLVED before JMeter 1.8's release date as VERIFIED. Yes, it's pretty poor QA procedure, but there's bugs here lingering since JMeter 1.6, and we need to clean up a little.
Bulk-closing all bugs RESOLVED before JMeter 1.8 release date.
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/947