Forum Discussion

abg's avatar
abg
New Contributor
8 years ago

SoapUI JDBC connection not working in ReadyAPI

Hi-

 

I'm trying to set up a JDBC connection to a database using a SoapUI project I imported from a colleague. The project works perfectly in SoapUI Pro V5.1.2 but I consistently get an error message when trying to execute it in Ready!API (V1.8.5):

 

Failed to init connection for driver [JDBC-ODBCBridge/sun.jdbc.odbc.JdbcOdbcDriver], connectionString [jdbc:odbc:Driver={SQL Server Native Client 10.0};Server=ourdbserver;Database=VP_ENT;Trusted_Connection=yes]

 

My drivers are up to date for V1.8.5 and installed in the correct directory.  I tried to set up a connection for a new project manually to the same DB but I cannot find any option for using my Windows credentials for the login (the Trusted_Connection option in the connection).

 

If anyone has suggestions for steps I can take to fix this, particularly specific sections in the documentation, I'd really appreciate it.

 

Thanks in advance,

Alan Glendinning

4 Replies

  •  

    Try this Groovy

     

    import oracle.jdbc.driver.OracleDriver

    import groovy.sql.Sql

    com.eviware.soapui.support.GroovyUtils.registerJdbcDriver("oracle.rdb.jdbc.rdbThin.Driver")

    sql = Sql.newInstance("jdbc:rdbThin://servername:port/dbname","username","password") def query = "select * from table"

    def res = sql.rows(query)

  • M_McDonald's avatar
    M_McDonald
    Super Contributor

    Do you have the sqljdbc_auth.dll file in your SoapUI /bin directory (or possibly \Windows\System32)? I think this is necessary for trusted connections.

    • abg's avatar
      abg
      New Contributor

      No, I don't see that file (sqljdbc_auth.dll) anywhere on my system.

       

      I was able to get around the problem by switching my license from Ready!API to SoapUI Pro V5.2.1.  Apparently that version of Soap uses Java V7 and it's Java V8 that no longer supports the driver.  Using SoapUI, the project runs perfectly.

       

      Unfortunately, it appears that I will be forced to fix this when our license for SoapUI Pro expires early next year as the SoapUI splash screen says that there will not be any more renewals given by SmartBear for SoapUI and I'll have to move back to Ready!API.  At least that gives us 4 months to get a fix in place.

       

      Thanks for the suggestion,

      ABG

      • reachpgr's avatar
        reachpgr
        Occasional Contributor

        I have the same issue. I am connecting to Excel using the following comment

         

        sql = Sql.newInstance("jdbc:odbc:DRIVER=Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb);DBQ=${path};ReadOnly=True","","", "sun.jdbc.odbc.JdbcOdbcDriver")

         

        Ready API 1.3 works just fine for the the above script. But any version beyond that throws the following error

        *************************************************

        java.lang.NullPointerException

         

        Thu Oct 20 16:39:09 EDT 2016:INFO:sun.jdbc.odbc.JdbcOdbcDriver

        *************************************************

         

        Anyone else resolved this issue.