Hi Kenneth,
I had experienced the almost the exact same problem in the last two days. I
suspect this is a JMeter bug and regression from 2.3.2, as the same test
scenario worked in 2.3.2. I posted this to the dev forum
http://www.nabble.com/Bug-report-for-JMeter-2.3.3-(regression-from-2.3.2)%3A-JDBC-error---org.postgresql.util.PSQLException%3A-This-statement-has-been-closed-td23818467.html
here .
By the way, in my case even a simple select (e.g. "select 1") fails with
this error, not only a prepared statement. Playing with the connection,
including setting pool size to 0, did not help.
-- Shaul (info@shauldar.com)
Kenneth Cox-2 wrote:
>
> I just started using JMeter-2.3.3 and set up a simple test plan with a
> postgres JDBC data source while reading the User Manual. A simple test
> plan works with a Select Statement. When I use a Prepared Select
> Statement instead, execution fails on the 2nd and subsequent queries with
> "This statement has been closed".
>
> Am I doing something obviously wrong or are Prepared Select Statements not
> working with jmeter-2.3.3 and postgres-8.3.7?
>
> I have read the Component Reference in the User Manual, and have googled
> "jmeter prepared select postgresql" and "jmeter
> org.postgresql.util.PSQLException: This statement has been closed." to no
> avail.
>
> I have boiled the test plan down to one integer and the template1
> database, provided below.
>
> Thanks for any assistance,
> Ken
> --
> <?xml version="1.0" encoding="UTF-8"?>
> <jmeterTestPlan version="1.2" properties="2.1">
> <hashTree>
> <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test
> Plan" enabled="true">
> <stringProp name="TestPlan.comments"></stringProp>
> <boolProp name="TestPlan.functional_mode">true</boolProp>
> <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
> <elementProp name="TestPlan.user_defined_variables"
> elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments"
> testname="User Defined Variables" enabled="true">
> <collectionProp name="Arguments.arguments"/>
> </elementProp>
> <stringProp name="TestPlan.user_define_classpath"></stringProp>
> </TestPlan>
> <hashTree>
> <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup"
> testname="Thread Group" enabled="true">
> <elementProp name="ThreadGroup.main_controller"
> elementType="LoopController" guiclass="LoopControlPanel"
> testclass="LoopController" testname="Loop Controller" enabled="true">
> <boolProp
> name="LoopController.continue_forever">false</boolProp>
> <stringProp name="LoopController.loops">2</stringProp>
> </elementProp>
> <stringProp name="ThreadGroup.num_threads">2</stringProp>
> <stringProp name="ThreadGroup.ramp_time">0</stringProp>
> <longProp name="ThreadGroup.start_time">1243879156000</longProp>
> <longProp name="ThreadGroup.end_time">1243879156000</longProp>
> <boolProp name="ThreadGroup.scheduler">false</boolProp>
> <stringProp
> name="ThreadGroup.on_sample_error">continue</stringProp>
> <stringProp name="ThreadGroup.duration"></stringProp>
> <stringProp name="ThreadGroup.delay"></stringProp>
> </ThreadGroup>
> <hashTree>
> <JDBCDataSource guiclass="TestBeanGUI"
> testclass="JDBCDataSource"
> testname="pool1 cfg" enabled="true">
> <boolProp name="autocommit">true</boolProp>
> <stringProp name="checkQuery">Select 1</stringProp>
> <stringProp name="connectionAge">5000</stringProp>
> <stringProp name="dataSource">pgpool1</stringProp>
> <stringProp
> name="dbUrl">jdbc:postgresql://${dbhost}/${dbname}</stringProp>
> <stringProp name="driver">org.postgresql.Driver</stringProp>
> <boolProp name="keepAlive">true</boolProp>
> <stringProp name="password"></stringProp>
> <stringProp name="poolMax">4</stringProp>
> <stringProp name="timeout">10000</stringProp>
> <stringProp name="trimInterval">60000</stringProp>
> <stringProp name="username">${dbuser}</stringProp>
> </JDBCDataSource>
> <hashTree/>
> <JDBCSampler guiclass="TestBeanGUI" testclass="JDBCSampler"
> testname="JDBC Request" enabled="true">
> <stringProp name="dataSource">pgpool1</stringProp>
> <stringProp name="query">select ?</stringProp>
> <stringProp name="queryArguments">1</stringProp>
> <stringProp name="queryArgumentsTypes">INTEGER</stringProp>
> <stringProp name="queryType">Prepared Select
> Statement</stringProp>
> <stringProp name="variableNames"></stringProp>
> </JDBCSampler>
> <hashTree/>
> <ResultCollector guiclass="TableVisualizer"
> testclass="ResultCollector" testname="View Results in Table"
> enabled="true">
> <boolProp
> name="ResultCollector.error_logging">false</boolProp>
> <objProp>
> <name>saveConfig</name>
> <value class="SampleSaveConfiguration">
> <time>true</time>
> <latency>true</latency>
> <timestamp>true</timestamp>
> <success>true</success>
> <label>true</label>
> <code>true</code>
> <message>true</message>
> <threadName>true</threadName>
> <dataType>true</dataType>
> <encoding>false</encoding>
> <assertions>true</assertions>
> <subresults>true</subresults>
> <responseData>false</responseData>
> <samplerData>false</samplerData>
> <xml>true</xml>
> <fieldNames>false</fieldNames>
> <responseHeaders>false</responseHeaders>
> <requestHeaders>false</requestHeaders>
> <responseDataOnError>false</responseDataOnError>
>
> <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
> <assertionsResultsToSave>0</assertionsResultsToSave>
> <bytes>true</bytes>
> </value>
> </objProp>
> <stringProp name="filename">/tmp/take1.log</stringProp>
> </ResultCollector>
> <hashTree/>
> </hashTree>
> <Arguments guiclass="ArgumentsPanel" testclass="Arguments"
> testname="User Defined Variables" enabled="true">
> <collectionProp name="Arguments.arguments">
> <elementProp name="dbhost" elementType="Argument">
> <stringProp name="Argument.name">dbhost</stringProp>
> <stringProp name="Argument.value">localhost</stringProp>
> <stringProp name="Argument.metadata">=</stringProp>
> </elementProp>
> <elementProp name="dbname" elementType="Argument">
> <stringProp name="Argument.name">dbname</stringProp>
> <stringProp name="Argument.value">template1</stringProp>
> <stringProp name="Argument.metadata">=</stringProp>
> </elementProp>
> <elementProp name="dbuser" elementType="Argument">
> <stringProp name="Argument.name">dbuser</stringProp>
> <stringProp name="Argument.value">postgres</stringProp>
> <stringProp name="Argument.metadata">=</stringProp>
> </elementProp>
> </collectionProp>
> </Arguments>
> <hashTree/>
> </hashTree>
> </hashTree>
> </jmeterTestPlan>
>
> --
> Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
--
View this message in context: http://www.nabble.com/jmeter-2.3.3-Prepared-Select-Statement-fails-with-%22This-statement-has-been-closed.%22-tp23821788p23831965.html
Sent from the JMeter - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
|