Forum Discussion

StevenC's avatar
StevenC
Contributor
7 years ago

The JDBC driver [oracle.jdbc.driver.OracleDriver] is already registered.

Using SoapUI Pro in ReadyAPI 1.9.0 I am all of a sudden having trouble connecting to our Oracle Database. Testcases which have Database Steps in them which worked in the past can no longer connect. When I try to connect using the TestConnection button or run the query I get a pop up message that says

java.sql.SQLException: Io exception: The Network Adapter could not establish the connection

No error is thrown in the error log but in the ready!API Log the following message appears...

The JDBC driver [oracle.jdbc.driver.OracleDriver] is already registered.

The connection string is unchanged from when it previously worked and I have verified that I can access that database with Oracles SQLDeveloper using the same connection string.

Other than upgrading from ReadyAPI 1.8.3 the only other thing that has changed is some network routing to the database, however given that I can connect to the database using SQL Developer that should not be the issue. I have also verified that the Oracle driver is in the readyAPI 1.9.0 ext folder. 

Finally  the driver and my connect string format I am using are-
oracle.jdbc.driver.OracleDriver

jdbc:oracle:thin:{username}/{password}@{url}:{port}:{sid}


Any idea what I can do to fix this or even start debugging why this is not working?

  • Found the issue.

    We have to reset our DB passwords every 60 days and I last had to update it at the same time as they made the server change to require a VPN connection to access the database. Oracle in their infinite wisdom allows you to create passwords that includes the at sign. SQLDeveloper apparently uses a connection string format which allows for this however the oracle jdbc driver connection strings do not because they use the at sign to denote the beginning of the server address (name or IP), then rather than giving a useful error code indicating that the connect string was incorrect they just throw an "unable to connect" error.

  • Found the issue.

    We have to reset our DB passwords every 60 days and I last had to update it at the same time as they made the server change to require a VPN connection to access the database. Oracle in their infinite wisdom allows you to create passwords that includes the at sign. SQLDeveloper apparently uses a connection string format which allows for this however the oracle jdbc driver connection strings do not because they use the at sign to denote the beginning of the server address (name or IP), then rather than giving a useful error code indicating that the connect string was incorrect they just throw an "unable to connect" error.

    • Nastya_Khovrina's avatar
      Nastya_Khovrina
      SmartBear Alumni (Retired)

      Steven, thank you for explaining the cause of the issue!

    • StevenC's avatar
      StevenC
      Contributor

      no we do not use a tnsnames.ora file

      Further even if we did that would not explain why I used to be able to connect to the database but cannot any longer as nothing about that has changed.

      Literally the only change was in network routing where I need to be on the VPN to access it however I verified that I can reach the database on the VPN by connecting via SQLdeveloper at the same time I was unable to connect via SoapUi

  • That oracle issue is not the same as this and the solution will not work but I do think it tells me what the issue is.

    In the linked oracle issue they are setting an oracle database up on the local machine and then want to use it as a shared service. This causes an issue because it is requiring the network card to address itself. To solve the issue they add the loopback service which in effect creates a virtual network adapter and one is bound to the outbound call and the other to the response.

    In my case Oracle is not installed on the local machine, it is a remote server so the loopback service is irrelevant, however I do have 2 network interfaces, the physical card itself and a virtual one for the VPN connection which I have to be on to address the database server. If I had to guess SoapUi is for whatever reason continuing to use he physical network interface and not the VPN when making DB calls. Unfortunately even if this is the case it doesn't help because I don't see any way to force SoapUi to use the VPN connection