You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@jmeter.apache.org by Alexander Guzman <ag...@tlcdelivers.com> on 2011/06/16 18:12:56 UTC
Help with JDBC Connection Configuration
JMeter Version: 2.4 r961953
I’m attempting to load the connection information from an external CSV file.
I’ve attached a Debug Sampler and can see that the variables are making it
into memory as seen below.
JMeterVariables:
DatabaseConnection=org.apache.jmeter.protocol.jdbc.config.DataSourceElement$DataSourceComponentImpl@29021f42
JMeterThread.last_sample_ok=true
JMeterThread.pack=org.apache.jmeter.threads.SamplePackage@4a523b16
START.HMS=172648
START.MS=1308094008358
START.YMD=20110614
TESTSTART.MS=1308155812780
databaseJDBCDriverClass=com.mysql.jdbc.Driver
databasePassword=test
databaseUrl=jdbc:mysql://localhost:3306/osax
databaseUser=test
But I’m unable to use any of the variables in the JDBC Connection
Configuration as seen below:
Thread Name: Thread Users 1-1
Sample Start: 2011-06-15 10:36:51 MDT
Load time: 0
Latency: 0
Size in bytes: 0
Sample Count: 1
Error Count: 1
Response code: 08001 0
Response message: java.sql.SQLException: No suitable driver found for
${databaseUrl}
Does anyone have any input because I’m lost at this point. Any help would be
appreciated.
Regards,
Xander
Re: Help with JDBC Connection Configuration
Posted by sebb <se...@gmail.com>.
In 16 June 2011 17:12, Alexander Guzman <ag...@tlcdelivers.com> wrote:
> JMeter Version: 2.4 r961953
>
>
>
> I’m attempting to load the connection information from an external CSV file.
Sorry, does not work, because the JDBC Config needs to read the
variables before the CSV Dataset creates them
See the coloured box at:
http://jakarta.apache.org/jmeter/usermanual/component_reference.html#CSV_Data_Set_Config
.
> I’ve attached a Debug Sampler and can see that the variables are making it
> into memory as seen below.
>
>
>
> JMeterVariables:
>
> DatabaseConnection=org.apache.jmeter.protocol.jdbc.config.DataSourceElement$DataSourceComponentImpl@29021f42
>
> JMeterThread.last_sample_ok=true
>
> JMeterThread.pack=org.apache.jmeter.threads.SamplePackage@4a523b16
>
> START.HMS=172648
>
> START.MS=1308094008358
>
> START.YMD=20110614
>
> TESTSTART.MS=1308155812780
>
> databaseJDBCDriverClass=com.mysql.jdbc.Driver
>
> databasePassword=test
>
> databaseUrl=jdbc:mysql://localhost:3306/osax
>
> databaseUser=test
>
>
>
> But I’m unable to use any of the variables in the JDBC Connection
> Configuration as seen below:
>
>
>
> Thread Name: Thread Users 1-1
>
> Sample Start: 2011-06-15 10:36:51 MDT
>
> Load time: 0
>
> Latency: 0
>
> Size in bytes: 0
>
> Sample Count: 1
>
> Error Count: 1
>
> Response code: 08001 0
>
> Response message: java.sql.SQLException: No suitable driver found for
> ${databaseUrl}
>
>
>
> Does anyone have any input because I’m lost at this point. Any help would be
> appreciated.
>
>
>
> Regards,
>
> Xander
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Help with JDBC Connection Configuration
Posted by "Konstantin S." <mk...@gmail.com>.
Ok,
so, Xander you can select Test Plan and add user defined variable
for example
name jss_id and value ${__CSVRead(jsession.txt,0)}
this will read value from file jsession.txt from 1st column
or you can use properties as Deepak suggested
On Thu, Jun 16, 2011 at 7:26 PM, sebb <se...@gmail.com> wrote:
> On 16 June 2011 17:21, Konstantin S. <mk...@gmail.com> wrote:
> > Response message: java.sql.SQLException: No suitable driver found for
> > ${databaseUrl}
> >
> > It looks like sample ( whichever you use) can not obtain value of
> variable
>
> Yes, because the JDBC Config reads the variable before CSV Dataset has run.
>
> Try defining the variables on the Test Plan.
>
> > and tries to pass this ${databaseUrl} instead of the value .
>
> > I guess error should be like...
> >
> > Response message: java.sql.SQLException: No suitable driver found for
> > jdbc:mysql://localhost:3306/osax
>
> Yes, it would be if the variable were defined but incorrect.
>
> >
> > On Thu, Jun 16, 2011 at 7:12 PM, Alexander Guzman
> > <ag...@tlcdelivers.com>wrote:
> >
> >> JMeter Version: 2.4 r961953
> >>
> >>
> >>
> >> I’m attempting to load the connection information from an external CSV
> >> file.
> >> I’ve attached a Debug Sampler and can see that the variables are making
> it
> >> into memory as seen below.
> >>
> >>
> >>
> >> JMeterVariables:
> >>
> >>
> >>
> DatabaseConnection=org.apache.jmeter.protocol.jdbc.config.DataSourceElement$DataSourceComponentImpl@29021f42
> >>
> >> JMeterThread.last_sample_ok=true
> >>
> >> JMeterThread.pack=org.apache.jmeter.threads.SamplePackage@4a523b16
> >>
> >> START.HMS=172648
> >>
> >> START.MS=1308094008358
> >>
> >> START.YMD=20110614
> >>
> >> TESTSTART.MS=1308155812780
> >>
> >> databaseJDBCDriverClass=com.mysql.jdbc.Driver
> >>
> >> databasePassword=test
> >>
> >> databaseUrl=jdbc:mysql://localhost:3306/osax
> >>
> >> databaseUser=test
> >>
> >>
> >>
> >> But I’m unable to use any of the variables in the JDBC Connection
> >> Configuration as seen below:
> >>
> >>
> >>
> >> Thread Name: Thread Users 1-1
> >>
> >> Sample Start: 2011-06-15 10:36:51 MDT
> >>
> >> Load time: 0
> >>
> >> Latency: 0
> >>
> >> Size in bytes: 0
> >>
> >> Sample Count: 1
> >>
> >> Error Count: 1
> >>
> >> Response code: 08001 0
> >>
> >> Response message: java.sql.SQLException: No suitable driver found for
> >> ${databaseUrl}
> >>
> >>
> >>
> >> Does anyone have any input because I’m lost at this point. Any help
> would
> >> be
> >> appreciated.
> >>
> >>
> >>
> >> Regards,
> >>
> >> Xander
> >>
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>
>
Re: Help with JDBC Connection Configuration
Posted by sebb <se...@gmail.com>.
On 16 June 2011 17:21, Konstantin S. <mk...@gmail.com> wrote:
> Response message: java.sql.SQLException: No suitable driver found for
> ${databaseUrl}
>
> It looks like sample ( whichever you use) can not obtain value of variable
Yes, because the JDBC Config reads the variable before CSV Dataset has run.
Try defining the variables on the Test Plan.
> and tries to pass this ${databaseUrl} instead of the value .
> I guess error should be like...
>
> Response message: java.sql.SQLException: No suitable driver found for
> jdbc:mysql://localhost:3306/osax
Yes, it would be if the variable were defined but incorrect.
>
> On Thu, Jun 16, 2011 at 7:12 PM, Alexander Guzman
> <ag...@tlcdelivers.com>wrote:
>
>> JMeter Version: 2.4 r961953
>>
>>
>>
>> I’m attempting to load the connection information from an external CSV
>> file.
>> I’ve attached a Debug Sampler and can see that the variables are making it
>> into memory as seen below.
>>
>>
>>
>> JMeterVariables:
>>
>>
>> DatabaseConnection=org.apache.jmeter.protocol.jdbc.config.DataSourceElement$DataSourceComponentImpl@29021f42
>>
>> JMeterThread.last_sample_ok=true
>>
>> JMeterThread.pack=org.apache.jmeter.threads.SamplePackage@4a523b16
>>
>> START.HMS=172648
>>
>> START.MS=1308094008358
>>
>> START.YMD=20110614
>>
>> TESTSTART.MS=1308155812780
>>
>> databaseJDBCDriverClass=com.mysql.jdbc.Driver
>>
>> databasePassword=test
>>
>> databaseUrl=jdbc:mysql://localhost:3306/osax
>>
>> databaseUser=test
>>
>>
>>
>> But I’m unable to use any of the variables in the JDBC Connection
>> Configuration as seen below:
>>
>>
>>
>> Thread Name: Thread Users 1-1
>>
>> Sample Start: 2011-06-15 10:36:51 MDT
>>
>> Load time: 0
>>
>> Latency: 0
>>
>> Size in bytes: 0
>>
>> Sample Count: 1
>>
>> Error Count: 1
>>
>> Response code: 08001 0
>>
>> Response message: java.sql.SQLException: No suitable driver found for
>> ${databaseUrl}
>>
>>
>>
>> Does anyone have any input because I’m lost at this point. Any help would
>> be
>> appreciated.
>>
>>
>>
>> Regards,
>>
>> Xander
>>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
Re: Help with JDBC Connection Configuration
Posted by "Konstantin S." <mk...@gmail.com>.
Response message: java.sql.SQLException: No suitable driver found for
${databaseUrl}
It looks like sample ( whichever you use) can not obtain value of variable
and tries to pass this ${databaseUrl} instead of the value .
I guess error should be like...
Response message: java.sql.SQLException: No suitable driver found for
jdbc:mysql://localhost:3306/osax
On Thu, Jun 16, 2011 at 7:12 PM, Alexander Guzman
<ag...@tlcdelivers.com>wrote:
> JMeter Version: 2.4 r961953
>
>
>
> I’m attempting to load the connection information from an external CSV
> file.
> I’ve attached a Debug Sampler and can see that the variables are making it
> into memory as seen below.
>
>
>
> JMeterVariables:
>
>
> DatabaseConnection=org.apache.jmeter.protocol.jdbc.config.DataSourceElement$DataSourceComponentImpl@29021f42
>
> JMeterThread.last_sample_ok=true
>
> JMeterThread.pack=org.apache.jmeter.threads.SamplePackage@4a523b16
>
> START.HMS=172648
>
> START.MS=1308094008358
>
> START.YMD=20110614
>
> TESTSTART.MS=1308155812780
>
> databaseJDBCDriverClass=com.mysql.jdbc.Driver
>
> databasePassword=test
>
> databaseUrl=jdbc:mysql://localhost:3306/osax
>
> databaseUser=test
>
>
>
> But I’m unable to use any of the variables in the JDBC Connection
> Configuration as seen below:
>
>
>
> Thread Name: Thread Users 1-1
>
> Sample Start: 2011-06-15 10:36:51 MDT
>
> Load time: 0
>
> Latency: 0
>
> Size in bytes: 0
>
> Sample Count: 1
>
> Error Count: 1
>
> Response code: 08001 0
>
> Response message: java.sql.SQLException: No suitable driver found for
> ${databaseUrl}
>
>
>
> Does anyone have any input because I’m lost at this point. Any help would
> be
> appreciated.
>
>
>
> Regards,
>
> Xander
>
Re: Help with JDBC Connection Configuration
Posted by Deepak Shetty <sh...@gmail.com>.
Use properties. See user.properties
On Jun 16, 2011 9:13 AM, "Alexander Guzman" <ag...@tlcdelivers.com> wrote:
> JMeter Version: 2.4 r961953
>
>
>
> I’m attempting to load the connection information from an external CSV
file.
> I’ve attached a Debug Sampler and can see that the variables are making it
> into memory as seen below.
>
>
>
> JMeterVariables:
>
>
DatabaseConnection=org.apache.jmeter.protocol.jdbc.config.DataSourceElement$DataSourceComponentImpl@29021f42
>
> JMeterThread.last_sample_ok=true
>
> JMeterThread.pack=org.apache.jmeter.threads.SamplePackage@4a523b16
>
> START.HMS=172648
>
> START.MS=1308094008358
>
> START.YMD=20110614
>
> TESTSTART.MS=1308155812780
>
> databaseJDBCDriverClass=com.mysql.jdbc.Driver
>
> databasePassword=test
>
> databaseUrl=jdbc:mysql://localhost:3306/osax
>
> databaseUser=test
>
>
>
> But I’m unable to use any of the variables in the JDBC Connection
> Configuration as seen below:
>
>
>
> Thread Name: Thread Users 1-1
>
> Sample Start: 2011-06-15 10:36:51 MDT
>
> Load time: 0
>
> Latency: 0
>
> Size in bytes: 0
>
> Sample Count: 1
>
> Error Count: 1
>
> Response code: 08001 0
>
> Response message: java.sql.SQLException: No suitable driver found for
> ${databaseUrl}
>
>
>
> Does anyone have any input because I’m lost at this point. Any help would
be
> appreciated.
>
>
>
> Regards,
>
> Xander