1

Getting java.sql.SQLRecoverableException: IO Error: NL Exception was generated

Trying to connect to Oracle sql developer DB.

Connection string used is :

 jdbc:oracle:thin:@(DESCRIPTION=(CID=ValidCID)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=ValidHost)(PORT=1521)))(CONNECT_DATA=(SID =ValidSID)(SERVER = DEDICATED))); User Id=UID;Password=Pwd;

I use the same set of parameters while connecting from QTP. What could be the issue here ?

1 Answer 1

1

I found it...

instead of supplying User ID and password through connection string, one needs to supply them through the method. So, my connection string would become

 String strConnString = "jdbc:oracle:thin:@(DESCRIPTION=(CID=ValidCID)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=ValidHost)(PORT=1521)))(CONNECT_DATA=(SID =ValidSID)(SERVER = DEDICATED)))";

and I would use the following method to creation a connection

 Connection con = DriverManager.GetConnection(strConnString, UserID, Password);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.