ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

DevTest JDBC Data Set with incorrect SQL statement causes the Virtual Service to fail

book

Article ID: 199657

calendar_today

Updated On:

Products

CLOUDTEST CA Application Test CA Cloud Test Mobile MOBILECLOUD Service Virtualization

Issue/Introduction

A JDBC Data Set with an incorrect SQL statement causes the Virtual Service to fail with the following error:
Exception executing Step: Error doing random data sets
Trapped Exception: Database query problem

Is there a way to avoid the Test or the Virtual Service stopping.

Environment

Release : 10.4, 10.5, 10.6

Component : CA Service Virtualization

Resolution

Options for preventing the Virtual Service failing are: 
1) Test all SQL commands before putting the VS in production.
2) The JDBC step can identify that there is a problem with the SQL command without this step failing.
Configure the following field in the step to handle an invalid statement: If SQL error
An additional JDBC step can be added just before the JDBC data set. If there is a problem with the SQL command, then the JDBC data set can be bypassed.
3) Alternatively, replace the JDBC data set with the JDBC step. Looping through the results from the step may require some recoding.

Additional Information

The most common reason for getting the error 'Error doing random data sets' is running out of rows. 
See:
https://knowledge.broadcom.com/external/article?articleId=7332