Forum Discussion

khaled_igou's avatar
khaled_igou
Occasional Contributor
6 years ago
Solved

JDBC Connection String, Issue with the password

Hello you all,

 

So I am trying to connect to my database using a JDBC teststep in SoapUI. I am using this connection string :

 

When I test this connection I get the error shown in this image :

 

After some researches, I found that the problem come from the '@' in the password (my password is '@12345').I changed the database password to '12345' and obviously it worked.

 

Is there any solution for me to connect to my database without changing the password ?

  • jhanzeb1's avatar
    jhanzeb1
    6 years ago

    What operating system are you using? 

     

    The script is fine, the only reason you are seeing is because soapUI cannot find the jar. 

    Could you also put this jar in soapUI/lib  and restart.

     

     

8 Replies

  • jhanzeb1's avatar
    jhanzeb1
    Frequent Contributor

    Hi,

     

    You can pass your password in a string like below:

     

    import groovy.sql.Sql 

    sql = Sql.newInstance("jdbc: oracle:thin: @HOST:1521 : S I D " , "USER", "@12345", "oracle.jdbc.pool.OracleDataSource")

     

    Please remove spaces from there, I had to put them in to avoid emojis haha

    • khaled_igou's avatar
      khaled_igou
      Occasional Contributor

      Hello,

       

      Thank you for your response. I tried your code and I got this error :

      • jhanzeb1's avatar
        jhanzeb1
        Frequent Contributor

        Hi,

         

        That's because you need an oracle jdbc7 or 8 jar depending on your windows version. 

         

        Also, once that you have downloaded the jar from oracle website - you need to place it in SoapUI>bin>ext and restart soapUI and it should work

         

        Goodluck