(在线)删除这个文件时报错

问题描述

VB.NET中我新建了一个文件用的是File.Create(文件名)然后用File.Delete(文件名)删除这个文件时报错说有个进程正在使用它怎么会事?

解决方案

解决方案二:
你把机子注销了
解决方案三:
Create方法返回的FileStream还没有Close(难道你是想等GC去回收这个文件流?)

时间: 2024-08-07 16:22:57

(在线)删除这个文件时报错的相关文章

spark计算hdfs上的文件时报错

问题描述 spark计算hdfs上的文件时报错 scala> val rdd = sc.textFile("hdfs://...") scala> rdd.count java.lang.VerifyError: class org.apache.hadoop.hdfs.protocol.proto.ClientNamenodeProtocolProtos$AppendRequestProto overrides final method getUnknownFields.

sqlite-在更新和删除SQLite数据库时报错NullPointerException

问题描述 在更新和删除SQLite数据库时报错NullPointerException 我的Activity首先打开了数据库. private DBAdapter dbAdepter; dbAdepter = new DBAdapter(this); dbAdepter.open(); 然后更新操作如下: public class Heimingdan_Alter extends Activity { private DBAdapter dbAdepter; private EditText e

ios开发中,运用nsfilehander写文件时报错,本人菜鸟,请教大神

问题描述 ios开发中,运用nsfilehander写文件时报错,本人菜鸟,请教大神 NSString *path = NSHomeDirectory(); NSString *filePath = [path stringByAppendingString:@""/test.txt""]; BOOL success =[[NSFileManager defaultManager] createFileAtPath:filePath contents:nil att

上传文件时报错?

问题描述 各位大侠们?麻烦帮我看下可以吗?上传文件时报这个错,谢谢:严重:Servlet.service()forservletactionthrewexceptioncom.mysql.jdbc.MysqlDataTruncation:Datatruncation:Datatoolongforcolumn'filepath'atrow1atcom.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2973)atcom.mysql.jdbc.Mys

编译文件时报错“./conf.sh: testing permissions”的解决方法

下载了rcs5.7, 用 ./configure && make && make install 时报错如下: &http://www.aliyun.com/zixun/aggregation/37954.html">nbsp;./conf.sh: testing permissions ... ./conf.sh: This command should not be run with superuser permissions. 我是以 root

项目启动时报错Element type "property" must be followed by either attri

项目启动时报错Element type "property" must be followed by either attribute specifications, ">" or "/>" 项目启动时,控制台报错,信息如下(有删减): Error creating bean with name 'supplierInfoDAO' defined in class path resource [conf/applicationCont

java调用python时报错。

问题描述 java调用python时报错. 我在用java调用一个main.py文件时报错,但是在同样的路劲下调用搜狗的.exe文件能运行 public static void main(String[] args) { Runtime rn = Runtime.getRuntime(); Process p = null; try { // PythonInterpreter interpreter = new PythonInterpreter(); // InputStream filep

删除一个文件夹目录里面含有很多文档的时候报错

今天同事在测试文件同步功能时,发现当删除一个文件夹目录,里面含有很多文档的时候就报: Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool exhausted at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:103) at org.apache.commons.dbc

sax-xml文件解析时报错,久不得解

问题描述 xml文件解析时报错,久不得解 报错的语句:Document document = builder.parse(new Proxool().getClass().getResourceAsStream("/proxool.xml")); 这是我的xml文件: 我就郁闷了,求指点~ 解决方案 jdbc:mysql://localhost:3306/db?useUnicode=true&characterEncoding=UTF-8 解决方案二: UTF-8改成utf8试