Service Virtualization

  • 1.  Unexpected Exception on JDBC SQL Query Data Set

    Posted Dec 07, 2015 07:25 PM

    Hi,

     

    I'm trying to use the 'Read Rows from a JDBC table' data set step in my VSM.

     

    The driver class, connect string user ID and password provided seem to connect, however when entering a SQL query I get an unexpected exception message from the data set.

     

    The query is a simple select query as follows:

     

    SELECT * 

    FROM [databasename].dbo.[tablename]



  • 2.  Re: Unexpected Exception on JDBC SQL Query Data Set

    Posted Dec 07, 2015 11:11 PM

    Please provide the error/exception message.



  • 3.  Re: Unexpected Exception on JDBC SQL Query Data Set

    Posted Dec 07, 2015 11:14 PM

    The error message shown is only a single pop up ''Unexpected Exception'

    We are using CA LISA 7.5.1

    Thanks,

    Sunil



  • 4.  Re: Unexpected Exception on JDBC SQL Query Data Set

    Posted Dec 08, 2015 09:35 AM

    Please provide the screenshot of the configuration(JDBC step screenshot for VSM/TestCase step)



  • 5.  Re: Unexpected Exception on JDBC SQL Query Data Set

    Posted Dec 09, 2015 04:47 PM

    Thanks for your help. Please find attached configuration below with error message.

    JDBC_Config.JPG

     

    Once this is configured we would like to call this data for our Virtual Service. In a number of the request and response attributes we want to use the stored data. Could you please advise on steps on how to achieve this? Can this version support excel/jdbc drivers for virtual services?

     

    Any help would be much appreciated.

    We are using CA LISA 7.5.1

     

    Thanks,
    Sunil



  • 6.  Re: Unexpected Exception on JDBC SQL Query Data Set

    Posted Dec 09, 2015 06:16 PM

    Hi Sunil,

     

    To help with the data set configuration, please try to change your Connect String for something like:

    jdbc:sqlserver://<SERVER>:<PORT>;databaseName=<DatabaseName>

     

    Hope it helps.

     

    Thank you,

    Heloisa



  • 7.  Re: Unexpected Exception on JDBC SQL Query Data Set

    Posted Dec 09, 2015 07:21 PM

    Thank you for your quick response.

     

    We have tried the above names configuration along with integrated Security path

     

    jdbc:microsoft:sqlserver://<SERVER>:<PORT>;databaseName=<DatabaseName>;integratedSecurity=true

     

    This is still giving the same error message.

    I've also tried adding sqljdbc_auth.dll to the hotDeploy folder along with the jdbc driver version 4.1 and getting the same error message.

     

    Any further advice would be greatly appreciated.

     

    Thanks,
    Sunil



  • 8.  Re: Unexpected Exception on JDBC SQL Query Data Set
    Best Answer

    Posted Dec 09, 2015 10:10 PM

    Hi Maria,

     

    I found the following configuration worked:

     

    JDBC Driver: com.microsoft.sqlserver.jdbc.SQLServerDriver

    Connection String: jdbc:sqlserver://<SERVER>:<PORT>databaseName=<DatabaseName>;IntegratedSecurity=true

     

    I also had to add sqljdbc_auth.dll to the LISA\Bin directory for it to work.

    The JDBC driver version 4.1 also needs to be added to the hotDeploy folder.

     

    Thanks for your assistance.

     

    Cheers,

    Sunil