[Anthill-pro] RE: No such file exception
Steve Boone
sbb at urbancode.com
Fri May 16 07:51:42 CDT 2008
The file would have to be on the agent.
I understand you ar trying to read in a particular file, where is the file
located? Is it on the agent, or on the server? Is the server and agent on
the same machine?
On Fri, May 16, 2008 at 5:45 AM, Maxim Bruy <maxim.bruy at ctco.lv> wrote:
> 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*
>
> >>
>
> >>
>
>
>
> _______________________________________________
> Anthill-pro mailing list
> Anthill-pro at lists.urbancode.com
> 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/25b5ab97/attachment.htm
More information about the Anthill-pro
mailing list