Thanks, that gave me a clue how to solve the problem.


It turned out that ${dbport} variable reference and all other database
variables` references were not replaced, although the values were read from
file and assigned to variables correctly (I checked it with Java Request).
Moreover other, non-database values (like Server name or port number) WERE
replaced.

I used the CSVRead function and the problem disapeared. 

Similar problem occured with Thread Properties in Thread group element. When
Number of Threads, Ramp_Up Period and Loop Count variables were assigned by
CSV Data Set Config the test plan didn`t work, but CSVRead function made it
working.

My guess is that sth wrong is with CSV Data Set Config. It would be really
useful element if it worked with all variables. 
When one, for getting data form file, has to use CSV Data Set Config for
some variables and CSVRead function fo others, I wonder if it makes any
sense...

Regards

Michal


-----Original Message-----
From: sebb [mailto:[EMAIL PROTECTED] 
Sent: Thursday, November 02, 2006 4:53 PM
To: JMeter Users List
Subject: Re: Database port read from file

Variables are stored as strings.

Most fields on JMeter samplers are text, even if the contents are expected
to contain only certain characters ...

The database URL is expected to be entered as text - but some parts of it
are restricted to certain characters, e.g. the port should consist of
digits.

If the ${dbport} variable reference is not being replaced, then the JDBC
syntax checker will object because ${dbport} is not a string of digits.

Try using a fixed string first, then replace the parts one by one.

If it does support variables, then the __log() function can be used to show
what is being passed to the sampler.

S.
S
On 02/11/06, Aycock, Glenn W. (JSC-IS)[TES] <[EMAIL PROTECTED]> wrote:
> Is it possible that this component does not interpret variables?
>
> -----Original Message-----
> From: Michal Kaczmarzyk [mailto:[EMAIL PROTECTED]
> Sent: Thursday, November 02, 2006 8:45 AM
> To: JMeter Users List
> Subject: Database port read from file
>
>
> Hi,
>
> I have a problem with database connection, when all necessary 
> parameters are stored in a file and CSV Data Set Config is getting 
> them out from a file.
>
> Jmeter seems to have problem with interpretation of port number.
> In JDBC Connection Configuration element, Database URL looks like this:
> jdbc:oracle:thin:@${dbhost}:${dbport}:${dbSID}.
>
> When I run the scenario, the message is:
> HTTP response message: java.sql.SQLException: Invalid number format 
> for port number.
>
> The ${dbport} variable contains a number, but is it possible that CSV 
> Data Set Config saves it as string variable?
> If so, how can I make it 'real' number?
>
> What else might be the cause of a problem?
>
>
> Thanks in advance
>
> Michal
>
>
>
>
>
> --
> Empowering business
> http://webinars.comarch.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Empowering business
http://webinars.comarch.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to