This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 218038 - org.netbeans.modules.masterfs.filebasedfs.utils.FSException: Cannot delete file SONIA in Y:/sites/all/modules/science/research_data/lib.
Summary: org.netbeans.modules.masterfs.filebasedfs.utils.FSException: Cannot delete fi...
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 7.1
Hardware: All All
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-10 05:02 UTC by Exceptions Reporter
Modified: 2017-07-13 14:25 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 134153


Attachments
stacktrace (2.92 KB, text/plain)
2012-09-10 05:02 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Exceptions Reporter 2012-09-10 05:02:33 UTC
This bug was originally marked as duplicate of bug 154816, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 7.1.2 (Build 201204101705)
VM: Java HotSpot(TM) Client VM, 20.6-b01, Java(TM) SE Runtime Environment, 1.6.0_31-b05
OS: Windows 7

User Comments:
GUEST: Esse analisador de projetos sempre trava, sempre, sempre em varios computadores diferentes

sreimers: Navigating to JavaSource File




Stacktrace: 
org.netbeans.modules.masterfs.filebasedfs.utils.FSException: Cannot delete file SONIA in Y:/sites/all/modules/science/research_data/lib.
   at org.netbeans.modules.masterfs.filebasedfs.utils.FSException.io(FSException.java:118)
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.delete(FolderObj.java:411)
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.BaseFileObj$2.call(BaseFileObj.java:730)
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.BaseFileObj$2.call(BaseFileObj.java:725)
   at org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.runAsInconsistent(FileBasedFileSystem.java:119)
   at org.netbeans.modules.masterfs.filebasedfs.fileobjects.BaseFileObj.delete(BaseFileObj.java:739)
Comment 1 Exceptions Reporter 2012-09-10 05:02:35 UTC
Created attachment 124074 [details]
stacktrace
Comment 2 Ralph Ruijs 2012-09-10 12:35:05 UTC
I do not understand why you reassigned this to refactoring. Only one report from the exception reporter is from safe delete, but all others are from different places. Shouldn't we try to fix this in core, instead of all api users?
Comment 3 Jaroslav Tulach 2012-09-10 13:14:51 UTC
Right, I looked only at this one report.

How should I fix this in core? You ask an I/O and the I/O fails you get an IOException (FSException is subclass). The exception contains localized message. Can you tell me what else the filesystems are supposed to do?

It is responsibility of the caller (refactoring in this case) to present this failure in a nice way, so users don't report this as a system error.

What do you use to report the exception? core can certainly help you report the exception in a nice way, but that is a job for other core components, not for filesystems.
Comment 4 Jaroslav Tulach 2012-09-10 13:23:19 UTC
SafeDeleteAction is using plain logger to report the exception:
  LOGGER.log(Level.WARNING, null, ioe);
that is wrong. You are not facing a NetBeans system problem to report the exception this way.

What alternative you would find most suitable after reading
http://bits.netbeans.org/dev/javadoc/org-openide-util/org/openide/util/doc-files/logging.html
?