[Anthill-pro] RE: No such file exception

Maxim Bruy maxim.bruy at ctco.lv
Fri May 16 04:45:39 CDT 2008


Can be there is an opportunity to be connected to file system of the agent
because it's look like that the script works on a server side
 
>The error is saying that it can not find the file called "file.to.read"
>change your script so that
>
>String path = "/file.to.read";
>
>actually is the name of the file you are trying to read.
>
>
>
>
>On Thu, May 15, 2008 at 9:40 AM, Maxim Bruy <maxim.bruy at ctco.lv
<http://lists.urbancode.com/mailman/listinfo/anthill-pro> > wrote:
>
>>  Running this script
>>
>> import java.io.InputStreamReader;
>>
>> import java.io.FileInputStream;
>>
>>
>>
>> String path = "/file.to.read";
>>
>> BufferedReader in = new BufferedReader(new InputStreamReader(new
FileInputStream(path)));
>>
>> String s; 
>>
>> while ((s = in.readLine()) != null) {
>>
>>  print "done";
>>
>> }
>>
>> in.close();
>>
>>
>>
>> I'm getting exception like:
>>
>>
>>
>> 2008-05-15 16:31:54,946 ERROR 674931 0 0 - Exception:
>>
>> 2008-05-15 16:31:54,946 ERROR 674931 0 0 - org.apache.bsf.BSFException:
The application script threw an exception: java.io.FileNotFoundException:
/file.to.read (No such file or directory) BSF info: noFile at line: 0
column: columnNo
>>
>> 2008-05-15 16:31:54,946 ERROR 674931 0 0 -
com.urbancode.anthill3.runtime.scripting.ScriptException:
org.apache.bsf.BSFException: The application script threw an exception:
java.io.FileNotFoundException: /file.to.read (No such file or directory) BSF
info: noFile at line: 0 column: columnNo
>>
>>
>>
>>
>>
>> _______________________________________________
>> Anthill-pro mailing list
>> Anthill-pro at lists.urbancode.com
<http://lists.urbancode.com/mailman/listinfo/anthill-pro> 
>> http://lists.urbancode.com/mailman/listinfo/anthill-pro
>>
>>

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.urbancode.com/pipermail/anthill-pro/attachments/20080516/68d2c4cf/attachment.htm


More information about the Anthill-pro mailing list