My Oracle Support Banner

WLS -Trying to Create and/or Read a File in a Network Mapped Directory Causes "The system cannot find the path specified" Error When WLS is Started as Service (Doc ID 775275.1)

Last updated on OCTOBER 15, 2018

Applies to:

Oracle WebLogic Server - Version 8.1 to 12.1.1.0
Information in this document applies to any platform.
***Checked for relevance on 15-Oct-2018***

Symptoms

When using a JSP in a webapp, the JSP is able to write/read a file in a network mapped drive when the server is started using the startWeblogic script. If the server is started as a service then the error:

"The system cannot find the path specified" is thrown.  Changing the log on identity of the service using the Windows management console did not work.

Sample JSP code:

<html>
<head><title>Write File</title></head>
<body>

<%
try {
java.io.File f = new File("H:\\testFile.txt"); \\(The H: drive is the network drive)
f.createNewFile();
out.println("File written successfully");
}
catch (Exception ex) {
out.println(ex.getMessage());
System.out.println(ex.getMessage());
}
%>

</body>
</html>

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.