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 131943 - java.io.SyncFailedException when renaming a project
Summary: java.io.SyncFailedException when renaming a project
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Jancura
URL: http://statistics.netbeans.org/except...
Keywords: RANDOM
Depends on:
Blocks:
 
Reported: 2008-04-03 14:52 UTC by Lukas Hasik
Modified: 2009-10-07 00:08 UTC (History)
13 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 43302


Attachments
stacktrace (1.81 KB, text/plain)
2009-02-02 08:56 UTC, gekkothelizard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Hasik 2008-04-03 14:52:53 UTC
Build: NetBeans IDE Dev (Build 200803311426)
VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b20
OS: Windows Vista, 6.0, x86
User comments: Observed: when trying to export SVG animation as image to the path with already existing file with same
name java.io.SyncFailedException occurs - this occurs with any kind of export and as any kind of file.

Expected: dialog asking whether u want to rewrite/rename/abort/atd..

Steps to reproduce: invoke popup menu on some SVG file -> select some of the export.. options -> ok -> export it again
(so that now there is a file already in the path) ->ok
STACKTRACE: (first 10 lines)
java.io.SyncFailedException: D:\pcyh\mob\MobileApplication8\src\menu.png
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createData(FolderObj.java:275)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createDataImpl(FolderObj.java:233)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj$1.call(FolderObj.java:203)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj$1.call(FolderObj.java:202)
        at org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.runAsInconsistent(FileBasedFileSystem.java:112)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createData(FolderObj.java:206)
        at org.openide.filesystems.FileObject.createData(FileObject.java:709)
        at org.netbeans.modules.mobility.svgcore.export.AnimationRasterizer.rasterizeImage(AnimationRasterizer.java:466)
        at org.netbeans.modules.mobility.svgcore.export.AnimationRasterizer.export(AnimationRasterizer.java:302)
        at org.netbeans.modules.mobility.svgcore.export.AnimationRasterizer.export(AnimationRasterizer.java:291)
Comment 1 Andrew Korostelev 2008-06-18 16:10:04 UTC
I have added confirmation dialog to inform user that file will be replaced.
But making file path field editable is considered as topic for another issue.
Comment 2 Andrew Korostelev 2008-06-19 13:39:33 UTC
fixed in main trunk
http://hg.netbeans.org/main/rev/f2aba681c5bc

ask user to confirm rewriting. 
delete existing file before creating new with the same name.
Comment 3 Lukas Hasik 2008-06-23 20:07:35 UTC
changing TM to the right one
Comment 4 Exceptions Reporter 2009-01-29 01:40:04 UTC
Reopening - reproduced in NetBeans IDE 6.5 (Build 200811100001)
http://statistics.netbeans.org/exceptions/detail.do?id=42983
Comment 5 gekkothelizard 2009-02-02 08:56:39 UTC
Build: NetBeans IDE 6.5 (Build 200811100001)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Windows XP, 5.1, x86

User Comments: 
I renamed a project.

Stacktrace: 
java.io.SyncFailedException: D:\Users\Documents\Java projects\WetCom\x\DesktopAppTestModule2\nbproject\private\config.properties
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createData(FolderObj.java:287)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createDataImpl(FolderObj.java:245)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj$1.call(FolderObj.java:215)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj$1.call(FolderObj.java:214)
        at org.netbeans.modules.masterfs.filebasedfs.FileBasedFileSystem.runAsInconsistent(FileBasedFileSystem.java:112)
        at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FolderObj.createData(FolderObj.java:218)
Comment 6 gekkothelizard 2009-02-02 08:56:44 UTC
Created attachment 76443 [details]
stacktrace
Comment 7 Andrew Korostelev 2009-02-03 11:11:08 UTC
first filed exception is in mobility but is fixed.
Exception that caused issue reopening is from j2se projects.

Therefore reassigning issue to java. 
I'm also changing a summary.
Comment 8 gregorytechsoft 2009-02-09 05:03:52 UTC
I am wondering if this issue occurs either immediately preceding the project being re-shown in Projects, or sometime 
just afterward. In my case, I refactor/renamed a Java class library (out of 4 opened classlib projects) which was 
previously selected as the main project, but after the rename, this library project was not bolded indicating it was 
still set as the main project.
Probably related to the project being removed from the projects view, then re-added without concern for if it was 
previously a main project....
I hope this perspective is useful in diagnosing the problem.
Comment 9 Jan Jancura 2009-02-09 12:39:11 UTC
I am not able to reproduce this bug on current trunk version. I am trying different combinations of project create /
rename / configuration create / change / set main project / open and close project, and everything works. I am not able
to fix it without reproducible usecase. Can somebody attach some steps, please?
Comment 10 lytles 2009-02-11 15:08:33 UTC
with almost all of these exceptions, they aren't really what the description says. yes, the stack trace is the visible
manifestation, but the real problem happened before the stack trace. some sort of cache or index corruption. once that
happens, almost any refactoring or searching action will cause exceptions

don't expect reproducibility, and don't think that because you can't reproduce it that it doesn't exist
Comment 11 David Strupl 2009-03-31 16:00:41 UTC
Resolving all issues with milestone "future" as LATER. If you feel strongly that
it should be implemented please reopen and set the target milestone to "next".
Comment 12 Tim Lebedkov 2009-07-04 20:12:06 UTC
(I'm reopening this issue as I'm not quite sure whether you'll get an email if it is closed.
Please close it again if ther is not enough information to fix it.)

Just found this issue while investigating another bug.
The corresponding piece of code in my module:

        FileObject gwt = libsFolder.getFileObject(libxml);
        if (gwt == null) {
            gwt = libsFolder.createData(libxml);
        }

So clearly the file does *not* exist as it is created.

and the exception is:

SEVERE: File gwt1.6.4.xml already exists in filesystem 
/Users/jean/.netbeans/6.7/config (/Users/jean/.netbeans/6.7/config/org-
netbeans-api-project-libraries/Libraries/gwt1.6.4.xml).
msg
Caused: java.io.SyncFailedException: File gwt1.6.4.xml already exists in 
filesystem /Users/jean/.netbeans/6.7/config 
(/Users/jean/.netbeans/6.7/config/org-netbeans-api-project-
libraries/Libraries/gwt1.6.4.xml).
        at 
org.openide.filesystems.LocalFileSystem.createData(LocalFileSystem.java:278)
        at 
org.openide.filesystems.LocalFileSystem$Impl.createData(LocalFileSystem.java
:555)
        at 
org.openide.filesystems.AbstractFileObject.createData(AbstractFileObject.java
:470)
        at org.openide.filesystems.FileUtil.createData(FileUtil.java:798)
        at 
org.openide.filesystems.MultiFileObject.createData(MultiFileObject.java:1085)
        at org.openide.filesystems.FileUtil.createData(FileUtil.java:798)
        at 
org.openide.filesystems.MultiFileObject.createData(MultiFileObject.java:1085)
        at org.openide.filesystems.FileObject.createData(FileObject.java:820)
        at 
org.netbeans.modules.gwt4nb.GWTFrameworkProvider.createGWTUserLibrary
(GWTFrameworkProvider.java:549)
        at 
org.netbeans.modules.gwt4nb.GWTFrameworkProvider$1.run(GWTFramework
Provider.java:114)
        at 
org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:120)
        at 
org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:509)
[catch] at 
org.netbeans.modules.gwt4nb.GWTFrameworkProvider.extend(GWTFramewor
kProvider.java:98)
        at 
org.netbeans.modules.web.webmodule.WebModuleExtenderBridge.extend(We
bModuleExtenderBridge.java:111)
        at 
org.netbeans.modules.web.project.ui.wizards.NewWebProjectWizardIterator.in
stantiate(NewWebProjectWizardIterator.java:184)
        at 
org.openide.loaders.TemplateWizard$InstantiatingIteratorBridge.instantiate(T
emplateWizard.java:1016)
        at 
org.openide.loaders.TemplateWizard.handleInstantiate(TemplateWizard.java:5
88)
        at 
org.openide.loaders.TemplateWizard.instantiateNewObjects(TemplateWizard.j
ava:409)
        at 
org.openide.loaders.TemplateWizardIterImpl.instantiate(TemplateWizardIterI
mpl.java:253)
        at 
org.openide.loaders.TemplateWizardIteratorWrapper.instantiate(TemplateWiz
ardIteratorWrapper.java:165)
        at 
org.openide.WizardDescriptor.callInstantiateOpen(WizardDescriptor.java:1524
)
        at 
org.openide.WizardDescriptor.callInstantiate(WizardDescriptor.java:1481)
        at 
org.openide.WizardDescriptor.access$1700(WizardDescriptor.java:127)
        at 
org.openide.WizardDescriptor$Listener$2$1.run(WizardDescriptor.java:2052)
        at 
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:577)
        at 
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:1030
)
ALL [null]: File gwt1.6.4.xml already exists in filesystem 
/Users/jean/.netbeans/6.7/config (/Users/jean/.netbeans/6.7/config/org-
netbeans-api-project-libraries/Libraries/gwt1.6.4.xml).
INFO [org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater]: 
Resolving dependencies took: 10 ms
Comment 13 Peter Pis 2009-09-02 08:34:29 UTC
stacktrace was added. Could you please re-evaluate? Thanks.
Comment 14 Tomas Zezula 2009-09-30 19:59:37 UTC
To lebedkov: It's safer to use FileUtil.createData(File) than the FileObject.createData() in such a case.
Comment 15 Tomas Zezula 2009-10-01 08:29:20 UTC
Fixed in jet-main dc8aae6de684
Comment 16 Quality Engineering 2009-10-05 08:50:39 UTC
Integrated into 'main-golden', will be available in build *200910030241* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/dc8aae6de684
User: Tomas Zezula <tzezula@netbeans.org>
Log: #131943:java.io.SyncFailedException when renaming a project
Comment 17 Quality Engineering 2009-10-07 00:08:10 UTC
Integrated into 'main-golden', will be available in build *200910061401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/dc8aae6de684
User: Tomas Zezula <tzezula@netbeans.org>
Log: #131943:java.io.SyncFailedException when renaming a project