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.
It is currently called from inside DataEditorSupport.saveFromKitToStream (about line 368) which prevent implementation of MIME-based FileEncodingQueryImplementation due File Please refer to the stack trace in issue 121004 for more info.
I guess my task is to solve this exception: org.netbeans.modules.masterfs.filebasedfs.utils.FSException: Cannot get shared access to /hudson/workdir/jobs/trunk/workspace/visualweb/test/work/projects/SanityProject/SanityProject/web/WEB-INF/faces-config.xml (probably opened for writing). org.netbeans.modules.masterfs.filebasedfs.utils.FSException.io(FSException.java:125) org.netbeans.modules.masterfs.filebasedfs.fileobjects.MutualExclusionSupport.addResource(MutualExclusionSupport.java:97) org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.getInputStream(FileObj.java:129) Caused: java.io.FileNotFoundException org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.getInputStream(FileObj.java:154) org.openide.filesystems.MIMESupport$CachedFileObject.getInputStream(MIMESupport.java:284) org.netbeans.core.filesystems.MIMEResolverImpl$Type.accept(MIMEResolverImpl.java:583) org.netbeans.core.filesystems.MIMEResolverImpl$Type.access$1400(MIMEResolverImpl.java:458) [catch] at org.netbeans.core.filesystems.MIMEResolverImpl$FileElement.resolve(MIMEResolverImpl.java:425) org.netbeans.core.filesystems.MIMEResolverImpl$FileElement.access$100(MIMEResolverImpl.java:410) org.netbeans.core.filesystems.MIMEResolverImpl$Impl.findMIMEType(MIMEResolverImpl.java:139) org.openide.filesystems.MIMESupport$CachedFileObject.resolveMIME(MIMESupport.java:253) org.openide.filesystems.MIMESupport$CachedFileObject.getMIMEType(MIMESupport.java:241) org.openide.filesystems.MIMESupport.findMIMEType(MIMESupport.java:115) org.openide.filesystems.FileUtil.getMIMETypeOrDefault(FileUtil.java:1004) org.openide.filesystems.FileObject.getMIMEType(FileObject.java:489) org.netbeans.modules.masterfs.MasterFileObject.getMIMEType(MasterFileObject.java:219) org.netbeans.modules.xml.core.DefaultXmlFileEncodingQueryImpl.getEncoding(DefaultXmlFileEncodingQueryImpl.java:42) org.netbeans.api.queries.FileEncodingQuery.getEncoding(FileEncodingQuery.java:91) org.openide.text.DataEditorSupport.saveFromKitToStream(DataEditorSupport.java:368) org.openide.text.CloneableEditorSupport$1SaveAsReader.run(CloneableEditorSupport.java:847) I'll check what can be done in org.openide.text. However it seems to me that the root cause of the problem is in filesystems - one cannot ask for getMIMEType() while having open output stream. This is unfortunate, imho.
BTW I suggested a more limited fix for issue #121004 (check only file extension) which would make this issue still desirable but not necessary for 6.0.
IDE:------------------------------------------------- IDE: [5.11.07 10:41] Committing started Checking in test/unit/src/org/openide/text/DataEditorSupportTest.java; /shared/data/ccvs/repository/openide/loaders/test/unit/src/org/openide/text/DataEditorSupportTest.java,v <-- DataEditorSupportTest.java new revision: 1.11; previous revision: 1.10 done Checking in test/unit/src/org/openide/text/DataEditorSupportSaveAsTest.java; /shared/data/ccvs/repository/openide/loaders/test/unit/src/org/openide/text/DataEditorSupportSaveAsTest.java,v <-- DataEditorSupportSaveAsTest.java new revision: 1.5; previous revision: 1.4 done Checking in src/org/openide/text/DataEditorSupport.java; /shared/data/ccvs/repository/openide/loaders/src/org/openide/text/DataEditorSupport.java,v <-- DataEditorSupport.java new revision: 1.50; previous revision: 1.49 done IDE: [5.11.07 10:42] Committing finished
Seems good, thanks Jardo.