Does the user that was logged onto Windows when you started STAFProc have 
read access to that file?   You may want to make sure by shutting down 
STAF (STAF local SHUTDOWN SHUTDOWN), making sure you are logged on to a 
Windows user that has access to that directory and file, and start 
STAFProc.

The ability to access a file should not be related to the STAF or STAX 
versions installed.  I have STAF V3.4.7 and STAX V3.5.1 installed on my 
Windows 7 and have no problems accessing files via STAF or via Jython 
within a STAX job (as you are doing).

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:   Oleg <oleg.salyak...@gmail.com>
To:     Sharon Lucas/Austin/IBM@IBMUS, 
Cc:     staf-users@lists.sourceforge.net
Date:   12/08/2011 10:59 AM
Subject:        Re: [staf-users] Problem with file access on Windows 7 
system



I see STAFProc.exe process only running on my system -- so I was thinking 
that Jython code runs under its credentials.

The file which I can't open via STAX is available -- I double checked it. 
Interesting, I can open different file in the same directory for writing, 
write something and close it - but I can't find it afterwards! Neither I 
have any erroe displayed.

Could it be problem with versions conflict? I have the latest packages 
installed for Windows.


On Thu, Dec 8, 2011 at 4:30 PM, Sharon Lucas <luc...@us.ibm.com> wrote:
The same Python code in a <script> element in my STAX job works fine. 
 Note that it is Jython (running within the STAX Java service) that is 
opening the file, not STAFProc. 

Does the user that was logged onto Windows when you started STAFProc have 
read access to that file?  

--------------------------------------------------------------
Sharon Lucas
IBM Austin,   luc...@us.ibm.com
(512) 286-7313 or Tieline 363-7313




From:        Oleg <oleg.salyak...@gmail.com> 
To:        staf-users@lists.sourceforge.net, 
Date:        12/08/2011 03:49 AM 
Subject:        [staf-users] Problem with file access on Windows 7 system 




Hi All.

I'm a very new user in STAX and stuck with the following problem in my 
first exercise:

<script>
 f = open('C:/Temp/log.txt', 'rb');
 ...
</script>

IOError: (2, 'No such file or directory', 'C:/Temp/log.txt')

The file exists and contains data. I checked with 'filemon' that 
STAFProc.exe doesn't even try to open it! Maybe it is a security 
restriction of Jython -- I don't know - the same code works fine when you 
run it via python command line.

Anybody has a clue? 

Thanks,
Oleg.

------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point 
of 
discussion for anyone considering optimizing the pricing and packaging 
model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users


------------------------------------------------------------------------------
Cloud Services Checklist: Pricing and Packaging Optimization
This white paper is intended to serve as a reference, checklist and point of 
discussion for anyone considering optimizing the pricing and packaging model 
of a cloud services business. Read Now!
http://www.accelacomm.com/jaw/sfnl/114/51491232/
_______________________________________________
staf-users mailing list
staf-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/staf-users

Reply via email to