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.

Does Sahi work on windows server 2008?

newguynewguy Members
edited February 2010 in Sahi - Open Source
I was trying to make Sahi work on windows server 2008 but when I start sahi I got this exception:
Exception in thread "Thread-0" java.lang.NullPointerException
at net.sf.sahi.util.Diagnostics.run(Diagnostics.java:13)
at java.lang.Thread.run(Thread.java:619)
As Narayan said it should be working fine even if I get this exception,
But after I run this script, there's another exception:
#### Running Script: G:\sahi-demo\scripts\bis.sah
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at net.sf.sahi.command.CommandExecuter.execute(CommandExecuter.java:52)
at net.sf.sahi.LocalRequestProcessor.getLocalResponse(LocalRequestProces
sor.java:42)
at net.sf.sahi.ProxyProcessor.processLocally(ProxyProcessor.java:157)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:71)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExec
utor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.NullPointerException
at net.sf.sahi.test.ProcessHelper.getPIDs(ProcessHelper.java:93)
at net.sf.sahi.test.ProcessHelper.execute(ProcessHelper.java:41)
at net.sf.sahi.test.BrowserLauncher.openURL(BrowserLauncher.java:23)
at net.sf.sahi.test.TestLauncher.execute(TestLauncher.java:98)
at net.sf.sahi.test.SahiTestSuite.executeTest(SahiTestSuite.java:152)
at net.sf.sahi.test.SahiTestSuite.executeSuite(SahiTestSuite.java:266)
at net.sf.sahi.test.SahiTestSuite.run(SahiTestSuite.java:214)
at net.sf.sahi.command.Suite.start(Suite.java:50)
... 11 more

Any idea? Thank you.

Comments

  • narayannarayan Administrators
    Hi,

    Open sahi/config/os.properties and add Windows\ 2008=xp after Windows\ XP=xp

    So it may look like:
    Windows\ XP=xp
    Windows\ 2003=xp
    Windows\ 7=xp
    Windows\ 2008=xp
    Windows\ NT=nt
    Windows\ 2000=nt
    Mac\ OS=linux
    Linux=linux
    Mac\ OS\ X=linux
    Solaris=linux
    SunOS=linux
    HP-UX=linux
    AIX=linux
    

    Explanation: Sahi needs to monitor and kill browser processes after each script. But the commands for getting the list of processes are different for various operating systems. In order to fix this, we have moved the various PID extracting and killing commands to os.properties.

    Most Windows OSes after XP use tasklist and taskkill, and Sahi should have defaulted to XP in case the OS was not listed in os.properties. We have fixed this in the coming build. Mean while please make the above mentioned change and let us know if it works for you.

    Regards,
    Narayan
  • Hi Narayan,

    I forgot to tell you I alreay changed the os.properties file like you said before I posted my topic.
    But it is not working. Where else do I need to change to make it work?
  • narayannarayan Administrators
    Let me have a look.

    Meanwhile, could you run "tasklist" without quotes on a command line and tell us whether that works?

    -Narayan
  • newguynewguy Members
    edited February 2010
    both tasklist and taskkill work fine.
Sign In or Register to comment.