18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

Problems with _getDB()

Hi,

with the update to sahi OS 5.0 _getDB() fails with the errormessage
"Java constructor for "net.sf.sahi.plugin.DBClient" with arguments "string,string,string,string" not found. (RhinoScriptRunner.run#596)". Before it worked just fine. In my script it looks like this:
_getDB("com.microsoft.sqlserver.jdbc.SQLServerDriver", "jdbc:sqlserver://127.0.0.1;databaseName=somedatabase", "username", "password").
I am using the sqljdbc4.jar. Does anyone got an idea what could be wrong?
Thanks

Answers

  • Hi,

    I have just update to Sahi OS v5.0 (2014-11-05) and encountered the same error:
    "Java constructor for "net.sf.sahi.plugin.DBClient" with arguments "string,string,string,string" not found.".

    I also have sqljdbc4.jar on the Sahi classpath and my script was working fine with Sahi OS v4.4 (2013-04-29). I'm using Firefox 33.1 browser.

    After some debugging I found out that in my case the issue appears to be when I execute:
    ...
    $db.select($sql);
    ...

    Please, advise what might be wrong.

    Thank you.
  • HellrazahHellrazah Members
    edited November 2014
    Sorry, for some reason posted my previous comment twice :)
  • hello,

    Has anyone found a solution to the problem.

    Thank you :)
  • hello,
    Has anyone found a solution to the problem.
    Thank you :)
  • facilosfacilos Members
    edited December 2014
    sorry for repeating
  • Has anyone find the solution for not able to connect to Excel using _getDB. Getting error as "Java constructor for "net.sf.sahi.plugin.DBClient" with arguments "string,string,string,string" not found.
Sign In or Register to comment.