18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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.
java.lang.reflect.InvocationTargetException...please help me asap
Hi ,
I am new to sahi,I am facing these exceptions ,when i run my suite using ant in cmd prompt.
I ran the test suite with different browsers,but i am getting the same exceptions. I am trying to get the solution for this for last one week,but i could n't able to find the solution.
But i did the same thing in my laptop at home...test is working fine,but i couldn't able to find why it's not working in office..
could u please help me asap.....
>>>> 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 Cont
roller
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:206)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:71)
at java.lang.Thread.run(Unknown Source)
Caused by: net.sf.sahi.util.FileNotFoundRuntimeException: java.io.FileNotFoundEx
ception: ..\scripts\mtours\mtour.suite (The system cannot find the file specifie
d)
at net.sf.sahi.util.Utils.readFile(Utils.java:112)
at net.sf.sahi.util.Utils.readFile(Utils.java:99)
at net.sf.sahi.test.SuiteLoader.processSuiteFile(SuiteLoader.java:55)
at net.sf.sahi.test.SuiteLoader.loadScripts(SuiteLoader.java:35)
at net.sf.sahi.test.SuiteLoader.<init>(SuiteLoader.java:27)
at net.sf.sahi.test.SahiTestSuite.loadScripts(SahiTestSuite.java:83)
at net.sf.sahi.test.SahiTestSuite.<init>(SahiTestSuite.java:78)
at net.sf.sahi.command.Suite.start(Suite.java:39)
... 9 more
Caused by: java.io.FileNotFoundException: ..\scripts\mtours\mtour.suite (The sys
tem cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at net.sf.sahi.util.Utils.readFile(Utils.java:109)
... 16 more
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:206)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:71)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at net.sf.sahi.command.Suite.kill(Suite.java:83)
... 9 more
Regards,
vani.
I am new to sahi,I am facing these exceptions ,when i run my suite using ant in cmd prompt.
I ran the test suite with different browsers,but i am getting the same exceptions. I am trying to get the solution for this for last one week,but i could n't able to find the solution.
But i did the same thing in my laptop at home...test is working fine,but i couldn't able to find why it's not working in office..
could u please help me asap.....
>>>> 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 Cont
roller
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:206)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:71)
at java.lang.Thread.run(Unknown Source)
Caused by: net.sf.sahi.util.FileNotFoundRuntimeException: java.io.FileNotFoundEx
ception: ..\scripts\mtours\mtour.suite (The system cannot find the file specifie
d)
at net.sf.sahi.util.Utils.readFile(Utils.java:112)
at net.sf.sahi.util.Utils.readFile(Utils.java:99)
at net.sf.sahi.test.SuiteLoader.processSuiteFile(SuiteLoader.java:55)
at net.sf.sahi.test.SuiteLoader.loadScripts(SuiteLoader.java:35)
at net.sf.sahi.test.SuiteLoader.<init>(SuiteLoader.java:27)
at net.sf.sahi.test.SahiTestSuite.loadScripts(SahiTestSuite.java:83)
at net.sf.sahi.test.SahiTestSuite.<init>(SahiTestSuite.java:78)
at net.sf.sahi.command.Suite.start(Suite.java:39)
... 9 more
Caused by: java.io.FileNotFoundException: ..\scripts\mtours\mtour.suite (The sys
tem cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at net.sf.sahi.util.Utils.readFile(Utils.java:109)
... 16 more
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:206)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:71)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at net.sf.sahi.command.Suite.kill(Suite.java:83)
... 9 more
Regards,
vani.
Comments
From the error log it appears that either the suite file is not present at the mentioned location or there might be some problem in the script where some extra slashes in the file path might pose some problems
its not easy to figure out without having a look at the script. Or some expertise can throw somw light on this
See why it is saying that it cant find the mtour.suite file.
Caused by: net.sf.sahi.util.FileNotFoundRuntimeException: java.io.FileNotFoundEx
ception: ..\scripts\mtours\mtour.suite (The system cannot find the file specifie
d)
Regards,
Pankaj.