Answered

Getting error "No suitable driver found" while running step with DB connection

Did anyone had similar error "No suitable driver found for jdbc:sqlserver://hdwdb.test.hrsa.gov:1433;DatabaseName=OPHC" while running step with any DB connection? 

The behavior is not consistent. Basically, if i create fresh script with one of the steps to connect to DB and pull data and run it for the first time during the day i get mentioned above error. Then, if i run one of my older scripts with the same DB connection step, it works. And then it works fine during the day. But next morning i get the same issue and in order to run new script i need to run first any of my older scripts. Sometimes it happens on local and cloud.

 

0
4 comments
Avatar
Rex Feizi

Generally, this error means either the query has issues or the connection. Make sure you add and remove the semi-colon at the end of your query and see if that is the issue.  

Otherwise, let's try to build a step by step troubleshooting procedure: 

I) Make sure the connection object created is fine.

     1. Make sure there are no params and/or templates. Basically hardcode URL, username, and password

     2. Use a very simple query like "Select count(*) from table_name. 

     3. Use the connection and this query in one step. 

II) Parameterize your connection if required and test it with the same above query. 

III) Once you make sure the connection is ok, try to use another query that is a bit more sophisticated. 

IV) Use your query (for your test) without any parameters first with the above connection and make sure it works. 

0
Comment actions Permalink
Avatar
Vitaly Melnik

Thank you Rex for reply. As I already mentioned that this issue is inconsistent. It was happening awhile back on my local machine and then it stopped. Now it started happening on the cloud and after I created this thread it seems to be working fine. Maybe patches which we have installed on our machines are affecting this behavior somehow. But when it will happens again, i'll follow your suggested steps to troubleshoot. 

0
Comment actions Permalink
Avatar
Vitaly Melnik

I got this issue again today. I followed your suggestions and still getting this error. Then I ran my older script which has same DB connection step and old script was able to make connection successfully. Then I ran the script which was giving me trouble and it was able to make DB connection successfully. What I noticed is that this error occurs every time when Subject 7 Local Player is restarted. 

Currently, I have work around but it is pain in the neck because every time it happens I need to find and execute older script locally and on the cloud in order to run new scripts which have DB connection steps.

0
Comment actions Permalink
Avatar
Vitaly Melnik

So, mentioned above issue was occurring with the "Set_List" method when I tried to connect to DB to pull the data. What i learned so far is that if I create simple "Get_DB_Value" step (with simple query) right before the "Set_List" step it works even if I restart Local Player. So, I can't really assume that the issue is with my "Set_List" step because it works just fine without any changes right after "Get_DB_Value" step runs. Looks like "Get_DB_Value" step unlocks the driver somehow. Anyway, i'm really confused with this problem.

0
Comment actions Permalink

Please sign in to leave a comment.