Oracle Web center网站上的FileNotFoundException 12C FileInputStream inStream=newfileinputstream(new 文件(ics.GetCgi(“resumeFileUpload”).getFile()); 执行上述行时,我们收到以下异常 java.io.FileNotFoundException:文件:\C:\Oracle\MIDDLE~1\Oracle~1\USER\u P~1\domains\MIASTA~1\servers\wcsites\u server1\tmp\fwcs tmp\temp795\dcs60836878448684979201.tmp(文件名、目录名或卷标语法不正确) 位于java.io.FileInputStream.open0(本机方法) 在java.io.FileInputStream.open(FileInputStream.java:195) 位于java.io.FileInputStream。(FileInputStream.java:138)
请查看以下环境详细信息 服务器:Weblogic 12.2.1.3.0 Java:1.8 OS:Win2012 R2 Orcale网络中心网站12COracle Web center网站上的FileNotFoundException 12C FileInputStream inStream=newfileinputstream(new 文件(ics.GetCgi(“resumeFileUpload”).getFile()); 执行上述行时,我们收到以下异常 java.io.FileNotFoundException:文件:\C:\Oracle\MIDDLE~1\Oracle~1\USER\u P~1\domains\MIASTA~1\servers\wcsites\u server1\tmp\fwcs tmp\temp795\dcs60836878448684979201.tmp(文件名、目录名或卷标语法不正确) 位于java.io.FileInputStream.open0(本机方法) 在java.io.FileInputStream.open(FileInputStream.java:195) 位于java.io.FileInputStream。(FileInputStream.java:138),java,webcenter,webcenter-sites,Java,Webcenter,Webcenter Sites,请查看以下环境详细信息 服务器:Weblogic 12.2.1.3.0 Java:1.8 OS:Win2012 R2 Orcale网络中心网站12C FileInputStream inStream = new FileInputStream(new File(ics.GetCgi("resumeFileUpload").getFile())); While executing the above line we have received below Exception
FileInputStream inStream = new FileInputStream(new
File(ics.GetCgi("resumeFileUpload").getFile()));
While executing the above line we have received below Exception
java.io.FileNotFoundException: file:\C:\Oracle\MIDDLE~1\ORACLE~1\USER_P~1\domains\MIASTA~1\servers\wcsites_server1\tmp\fwcs-tmp\temp795\dcs6083687448684979201.tmp (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
你能试试上面的吗
这与上载的文件是否超过最大文件上载大小有关,也与它是否被持久化到磁盘有关,因此获取InputStream最安全的方法是使用getStream()因为无论它是在内存中还是在磁盘上,它都会工作什么时候发生这种情况?我们有一个包含一些字段的表单,可以上载文件。我们已经提交了表单,并尝试使用以下代码读取该文件,我们收到了异常FileInputStream inStream=new FileInputStream(新文件(ics.GetCgi(“resumeFileUpload”).getFile());
// If you want the bytes
FTVAL bindata = ics.GetCgi("resumeFileUpload");
if (bindata != null) {
bytes = bindata.getBlob();
}
// if you want the InputStream
FTVAL bindata = ics.GetCgi("resumeFileUpload");
if (bindata != null) {
inputStream = bindata.getStream();
}