3
votes

I have configured JDBC connection in my JMeter test plan. The database settings in JDBC connection are configured correctly. I am extracting employee id from one of my requests response.(i.e Employee_Id) By using BSF PostProcessor, i have stored the employee id into a variable called as Emp_ID I want to insert the extracted employee id into my database.

Database used is Oracle SQL developer, Version 4.0.1.14,Build MAIN-14.48. Table name is : Employee_Details Column name is : Employee_id ,Datatype: VARCHAR2

In JDBC request,i have selected "Query Type" as "Update Statement" and entered the following query:

Query 1: INSERT INTO Employee_Details (Employee_id) 
         VALUES (${Emp_ID})

Query 2: INSERT Employee_id='${Emp_ID}'

Parameter Types is given as VARCHAR2.

On both the execution, JMeter displays error as "Cannot create PoolableConnectionFactory (ORA-00923: FROM keyword not found where expected)"

Please provide your valuable suggestion on this.

3

3 Answers

3
votes

I found a workaround for this that avoids having problems:

JDBC Request Query Type needs to be: Update Statement The query needs to be processed as a block

BEGIN

SQL Statement

END;
2
votes

My expectation is that you have incorrect validation query:

JDBC Validation Query

If you left the "Validation Query" box value default - Select 1 - Oracle may not like it very much. You need to change it to select 1 from dual

References:

0
votes

There are 3 things as follows:

  1. Check the validation query and keep it blank. Screenshot is attached
  2. When you are executing insert query, keep Query Type as Updated
  3. When you are executing query please add database.tablename and then execute.

enter image description here