io error network path not found

Questions, tips and tricks and techniques for scripting in Servoy

io error network path not found

Postby Hans Nieuwenhuis » Fri Jun 07, 2013 2:11 pm

Hi,

I see the error below several times ( with different filenames, but same path ) in the log :

Does this mean ( as i guess ) that the network path was not avaliable ?
or could there be another cause ??

Because I see that most of the time the files are saved, but sometimes this error is generated...

Code: Select all
2013-06-07 13:49:01,462 ERROR [pool-6-thread-5] com.servoy.j2db.util.Debug - Throwable
java.io.FileNotFoundException: \\fileserver\Data\Bijlagen_IBIS\documenten\2013\54C950B7-05C0-40A2-99E3-4093C959DD6B.jpg (The network path was not found)
   at java.io.FileOutputStream.open(Native Method)
   at java.io.FileOutputStream.<init>(Unknown Source)
   at java.io.FileOutputStream.<init>(Unknown Source)
   at com.servoy.extensions.plugins.file.FileProvider.js_writeFile(FileProvider.java:788)
   at com.servoy.extensions.plugins.file.FileProvider.js_writeFile(FileProvider.java:771)
   at sun.reflect.GeneratedMethodAccessor1103.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
   at java.lang.reflect.Method.invoke(Unknown Source)
   at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179)
   at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:353)
   at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3666)
   at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
   at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
   at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
   at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3135)
   at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:165)
   at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:476)
   at com.servoy.j2db.plugins.ClientPluginAccessProvider$MethodExecutor.run(ClientPluginAccessProvider.java:511)
   at com.servoy.j2db.server.headlessclient.SessionClient.invokeAndWait(SessionClient.java:1171)
   at com.servoy.j2db.server.headlessclient.SessionClient.invokeLater(SessionClient.java:1161)
   at com.servoy.j2db.plugins.ClientPluginAccessProvider$1.run(ClientPluginAccessProvider.java:439)
   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)


Regards,
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands

Re: io error network path not found

Postby Hans Nieuwenhuis » Tue Jun 11, 2013 9:38 am

New Info :

the path \\fileserver\Data is a mapped network drive on the (windows) Servoy app-server.
Servoy runs as a service in this server.
The solution that gives the error is a headless client that runs every minute.

I added an extra read statement that writes its result to a logfile.

Code: Select all
if (jsFile.canRead()) {
   var txt = plugins.file.readTXTFile(jsFile);
                <write log>
   
}
else {
   <write log>
}


I noticed that when I stay logged on on this server, the error never occurs.
As soon as I log off, the read check will fail about once an hour ( on average ).

Any one ever seen this ??
Hans Nieuwenhuis
Betagraphics
http://www.deltics.nl
http://www.betagraphics.nl

Servoy Version 7.3.1
Java version 1.7.0.x
Database Oracle 11g
User avatar
Hans Nieuwenhuis
 
Posts: 1026
Joined: Thu Apr 12, 2007 12:36 pm
Location: Hengelo, The Netherlands


Return to Methods

Who is online

Users browsing this forum: No registered users and 10 guests