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.

file upload error log

ponsoponso Members
edited November -1 in Sahi - Open Source
can anyone help me with this error log? I'm trying to upload a file also using _setfile. I was able to do it with Build: 2009-09-22, but since I've upgraded to Build: 2010-04-30, the script errors. Thanks all.

my mime:
.htm text/html
.html text/html
.js application/javascript
.css text/css
.gif image/gif
.jpg image/jpeg
.jpeg image/jpeg
.csv application/csv
.xls application/xls
.pdf application/pdf

my error:

Jun 8, 2010 2:23:18 PM net.sf.sahi.command.FileUpload appendFiles
INFO: Uploading: fileName = resolved to C:\sahi\userdata
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.command.MockResponder.getResponse(MockResponder.java:66)
at net.sf.sahi.ProxyProcessor.handleDifferently(ProxyProcessor.java:157)

at net.sf.sahi.ProxyProcessor.processAsProxy(ProxyProcessor.java:137)
at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:93)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source
)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: net.sf.sahi.util.FileIsDirectoryException
at net.sf.sahi.util.Utils.readFile(Utils.java:159)
at net.sf.sahi.util.Utils.readFile(Utils.java:146)
at net.sf.sahi.command.FileUpload.appendFiles(FileUpload.java:83)
... 12 more

Comments

  • narayannarayan Administrators
    Hi Ponso,

    INFO: Uploading: fileName = resolved to C:\sahi\userdata
    The file seems to be resolved to userdata directory. What is the name you have specified?

    There has been a change in the way paths are resolved. Now _setFile paths will be resolved relative to userdata directory, so that you can keep all scripts, upload files etc. in a single place (ie. within userdata dir).

    Regards,
    Narayan
  • Hi Narayan,

    Am also facing with the same problem, the path that i have specified is "E:\\sahi\\userdata\\scripts\\bulkpayments.csv". please help me out.

    Thanks & Regards,
    Bhaswanth
  • SumitraSumitra Members
    Hi Bhaswanth,

    Can you please paste the error?

    Regards
    Sumitra
  • Hi Sumitra,

    This is the error am facing:

    WARNING: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Sourc
    at java.lang.reflect.Method.invoke(Unknown Source)
    at net.sf.sahi.command.CommandExecuter.execute(CommandExecuter.j
    at net.sf.sahi.command.MockResponder.getResponse(MockResponder.j
    at net.sf.sahi.ProxyProcessor.handleDifferently(ProxyProcessor.j

    at net.sf.sahi.ProxyProcessor.processAsProxy(ProxyProcessor.java
    at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:93)
    at net.sf.sahi.ProxyProcessor.processConnect(ProxyProcessor.java
    at net.sf.sahi.ProxyProcessor.processAsProxy(ProxyProcessor.java
    at net.sf.sahi.ProxyProcessor.run(ProxyProcessor.java:93)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknow
    )
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown So
    at java.lang.Thread.run(Unknown Source)
    Caused by: net.sf.sahi.util.FileIsDirectoryException
    at net.sf.sahi.util.Utils.readFile(Utils.java:173)
    at net.sf.sahi.util.Utils.readFile(Utils.java:160)
    at net.sf.sahi.command.FileUpload.appendFiles(FileUpload.java:83
    ... 15 more
  • SumitraSumitra Members
    Hi Bhaswanth,

    Kindly look at this URL:

    http://sahi.co.in/forums/viewtopic.php?id=2467

    Regards
    Sumitra
Sign In or Register to comment.