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.

sahi support BASIC authentication problem in Linux platform

franklin373franklin373 Members
edited November -1 in Sahi - Open Source
This topic is continue of topic "Whether sahi support BASIC authentication"(topic id=1033, I do not have priviledge to post URL).

Later Narayan sent me a release that could do Basic Authentication(sahi_20090618.zip), it could work in Windows platform, now I want to transfer to Linux platform, and some problem occurs.

I use Fedora/1.5.0.7-7.fc6 Firefox/1.5.0.7,


[localhost bin]# ./sahi.sh


NOTE
When running a suite, if you get an 'already running, but is not responding' error alert on firefox,
don't worry, just click OK on the alerts and the next time you run the suite things will work fine.


>>>> Sahi started. Listening on port:9999
>>>> Configure your browser to use this server and port as its proxy
>>>> Browse any page and CTRL-ALT-DblClick on the page to bring up the Sahi Controller


Then, I use firefox to browser a web with Basic Authentication, firefox display authentication page, but the console show error:


java.security.NoSuchAlgorithmException: SunX509
at javax.net.ssl.KeyManagerFactory.getInstance(libgcj.so.7rh)
at net.sf.sahi.ssl.SSLHelper.getKeyManagerFactory(SSLHelper.java:93)
at net.sf.sahi.ssl.SSLHelper.getKeyManagerFactory(SSLHelper.java:86)
at net.sf.sahi.RemoteRequestProcessor.<clinit>(RemoteRequestProcessor.java:57)
at java.lang.Class.initializeClass(libgcj.so.7rh)
at net.sf.sahi.ProxyProcessor.<init>(ProxyProcessor.java:53)
at net.sf.sahi.Proxy.startProxy(Proxy.java:60)
at net.sf.sahi.Proxy.main(Proxy.java:40)


And then I input username and password, but I cannot login, and console display:
Added: {TP-LINK Wireless Router WR541G/542G=realm=TP-LINK Wireless Router WR541G/542G; username=admin; password=pass}




If I use the latest relase sahi_20090902
[localhost bin]# ./sahi.sh
Sahi properties file = /home/flin/sahi_20090902/config/sahi.properties
>>>> Sahi started. Listening on port:9999
>>>> Configure your browser to use this server and port as its proxy
>>>> Browse any page and CTRL-ALT-DblClick on the page to bring up the Sahi Controller


NOTE
When running a suite, if you get an 'already running, but is not responding' error alert on firefox,
don't worry, just click OK on the alerts and the next time you run the suite things will work fine.

Then, I use firefox to browser a web with Basic Authentication, firefox cannot display authentication page, it remains blank page, and the console show error:

java.security.NoSuchAlgorithmException: SunX509
at javax.net.ssl.KeyManagerFactory.getInstance(libgcj.so.7rh)
at net.sf.sahi.ssl.SSLHelper.getKeyManagerFactory(SSLHelper.java:93)
at net.sf.sahi.ssl.SSLHelper.getKeyManagerFactory(SSLHelper.java:86)
at net.sf.sahi.RemoteRequestProcessor.<clinit>(RemoteRequestProcessor.java:58)
at java.lang.Class.initializeClass(libgcj.so.7rh)
at net.sf.sahi.ProxyProcessor.<init>(ProxyProcessor.java:53)
at net.sf.sahi.Proxy.startProxy(Proxy.java:136)
at net.sf.sahi.Proxy.start(Proxy.java:89)
at net.sf.sahi.Proxy.main(Proxy.java:66)
java.lang.NullPointerException
at java.util.ArrayList.addAll(libgcj.so.7rh)
at java.util.ArrayList.addAll(libgcj.so.7rh)
at net.sf.sahi.HttpHeaders.addHeaders(HttpHeaders.java:58)
at net.sf.sahi.RemoteRequestProcessor.processHttp(RemoteRequestProcessor.java:119)
at net.sf.sahi.RemoteRequestProcessor.processHttp(RemoteRequestProcessor.java:74)
at net.sf.sahi.ProxyProcessor.processAsProxy(ProxyProcessor.java:129)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:86)
at java.lang.Thread.run(libgcj.so.7rh)
java.lang.NullPointerException
at net.sf.sahi.ProxyProcessor.processAsProxy(ProxyProcessor.java:130)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:86)
at java.lang.Thread.run(libgcj.so.7rh)



Thanks.

Comments

  • narayannarayan Administrators
    Franklin,

    You seem to be using libgcj instead of Sun's implementation of Java.
    You will need to download and install Java 1.5 or above from Sun's website.
    If you already have done that, make sure that you have that java in the path, or modify sahi.sh to use the full path of Sun's java.
    (Instead of java -cp... do /path/to/suns/java/bin/java -cp...)
    Do "which java" to find out the java you are using.

    Regards,
    Narayan
  • Thank for Narayan's help, now I update to the latest java version, then Basic Authentication works OK.
This discussion has been closed.