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 57534 - A Problem by start Netbeans 4.1 beta in Mac OS X
Summary: A Problem by start Netbeans 4.1 beta in Mac OS X
Status: CLOSED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Filesystems (show other bugs)
Version: 4.x
Hardware: Macintosh Mac OS X
: P3 blocker (vote)
Assignee: rmatous
URL:
Keywords:
: 57690 57720 58550 (view as bug list)
Depends on:
Blocks: 59319
  Show dependency tree
 
Reported: 2005-04-06 11:37 UTC by dschultheis
Modified: 2008-12-22 20:34 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Error Dialog (43.87 KB, image/jpeg)
2005-04-26 15:40 UTC, dschultheis
Details
Log-File of Netbeans 4.1 RC1 (143.59 KB, application/octet-stream)
2005-04-28 14:39 UTC, dschultheis
Details
java.io.IOException: Operation not supported (706 bytes, text/plain)
2005-05-06 08:06 UTC, rmatous
Details

Note You need to log in before you can comment on or make changes to this bug.
Description dschultheis 2005-04-06 11:37:28 UTC
During the start of Nebeans 4.1 Beta i get an IOException. Hier is the messages.log for details:

*********** Exception occurred ************ at 12:06 PM on Apr 6, 2005
java.io.IOException: Bad file descriptor
	at sun.nio.ch.FileChannelImpl.release0(Native Method)
	at sun.nio.ch.FileChannelImpl.implCloseChannel(FileChannelImpl.java:105)
	at java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:97)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.WriteLock.<init>(WriteLock.java:108)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.WriteLock.tryLock(WriteLock.java:64)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.lock(FileObj.java:169)
	at org.netbeans.modules.masterfs.Delegate$FileLockImpl.lock(Delegate.java:293)
	at org.netbeans.modules.masterfs.Delegate$FileLockImpl.initLock(Delegate.java:256)
	at org.netbeans.modules.masterfs.Delegate$FileLockImpl.access$200(Delegate.java:243)
	at org.netbeans.modules.masterfs.Delegate.lock(Delegate.java:170)
	at org.netbeans.modules.masterfs.MasterFileObject.lock(MasterFileObject.java:152)
	at org.netbeans.spi.project.support.ant.PropertyUtils$2.run(PropertyUtils.java:135)
	at org.openide.util.Mutex.writeAccess(Mutex.java:310)
	at org.netbeans.spi.project.support.ant.PropertyUtils.putGlobalProperties(PropertyUtils.java:124)
[catch] at org.netbeans.modules.web.project.WebProjectModule$1.run(WebProjectModule.java:96)
	at org.openide.util.Mutex.postRequest(Mutex.java:987)
	at org.openide.util.Mutex.postWriteRequest(Mutex.java:438)
	at org.netbeans.modules.web.project.WebProjectModule.restored(WebProjectModule.java:59)
	at org.netbeans.core.modules.NbInstaller.loadCode(NbInstaller.java:322)
	at org.netbeans.core.modules.NbInstaller.load(NbInstaller.java:240)
	at org.netbeans.core.modules.ModuleManager.enable(ModuleManager.java:869)
	at org.netbeans.core.modules.ModuleList.installNew(ModuleList.java:350)
	at org.netbeans.core.modules.ModuleList.trigger(ModuleList.java:284)
	at org.netbeans.core.modules.ModuleSystem.restore(ModuleSystem.java:253)
	at org.netbeans.core.NonGui.run(NonGui.java:357)
	at org.netbeans.core.Main.run(Main.java:185)
	at org.netbeans.core.NbTopManager.getNbTopManager(NbTopManager.java:239)
	at org.netbeans.core.NbTopManager.get(NbTopManager.java:188)
	at org.netbeans.core.Main.start(Main.java:311)
	at org.netbeans.core.TopThreadGroup.run(TopThreadGroup.java:90)
	at java.lang.Thread.run(Thread.java:552)
*********** Exception occurred ************ at 12:06 PM on Apr 6, 2005
java.io.IOException: Bad file descriptor
	at sun.nio.ch.FileChannelImpl.release0(Native Method)
	at sun.nio.ch.FileChannelImpl.implCloseChannel(FileChannelImpl.java:105)
	at java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:97)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.WriteLock.<init>(WriteLock.java:108)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.WriteLock.tryLock(WriteLock.java:64)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.lock(FileObj.java:169)
	at org.netbeans.modules.masterfs.Delegate$FileLockImpl.lock(Delegate.java:293)
	at org.netbeans.modules.masterfs.Delegate$FileLockImpl.initLock(Delegate.java:256)
	at org.netbeans.modules.masterfs.Delegate$FileLockImpl.access$200(Delegate.java:243)
	at org.netbeans.modules.masterfs.Delegate.lock(Delegate.java:170)
	at org.netbeans.modules.masterfs.MasterFileObject.lock(MasterFileObject.java:152)
	at org.netbeans.spi.project.support.ant.PropertyUtils$2.run(PropertyUtils.java:135)
	at org.openide.util.Mutex.writeAccess(Mutex.java:310)
	at org.netbeans.spi.project.support.ant.PropertyUtils.putGlobalProperties(PropertyUtils.java:124)
[catch] at org.netbeans.modules.java.j2seplatform.J2SEPlatformModule$1.run(J2SEPlatformModule.java:
49)
	at org.openide.util.Mutex.postRequest(Mutex.java:987)
	at org.openide.util.Mutex.postWriteRequest(Mutex.java:438)
	at 
org.netbeans.modules.java.j2seplatform.J2SEPlatformModule.updateBuildProperties(J2SEPlatformModule
.java:41)
	at org.netbeans.modules.java.j2seplatform.J2SEPlatformModule.restored(J2SEPlatformModule.java:
36)
	at org.netbeans.core.modules.NbInstaller.loadCode(NbInstaller.java:322)
	at org.netbeans.core.modules.NbInstaller.load(NbInstaller.java:240)
	at org.netbeans.core.modules.ModuleManager.enable(ModuleManager.java:869)
	at org.netbeans.core.modules.ModuleList.installNew(ModuleList.java:350)
	at org.netbeans.core.modules.ModuleList.trigger(ModuleList.java:284)
	at org.netbeans.core.modules.ModuleSystem.restore(ModuleSystem.java:253)
	at org.netbeans.core.NonGui.run(NonGui.java:357)
	at org.netbeans.core.Main.run(Main.java:185)
	at org.netbeans.core.NbTopManager.getNbTopManager(NbTopManager.java:239)
	at org.netbeans.core.NbTopManager.get(NbTopManager.java:188)
	at org.netbeans.core.Main.start(Main.java:311)
	at org.netbeans.core.TopThreadGroup.run(TopThreadGroup.java:90)
	at java.lang.Thread.run(Thread.java:552)
Turning on modules:
	org.openide/1 [5.5 200502222100]
	org.netbeans.modules.servletapi23/1 [1.7 200502222100]
	org.openide.loaders [5.1 200502222100]
	org.netbeans.modules.queries/1 [1.4 200502222100]
	org.netbeans.modules.projectapi/1 [1.3 200502222100]
	org.netbeans.modules.j2eeapis/1 [1.3 200502222100]
	org.netbeans.swing.plaf [1.2 200502222100]
	org.netbeans.core/1 [1.27 200502222100]
	org.netbeans.modules.settings/1 [1.7 200502222100]
	org.netbeans.api.xml/1 [1.7.3.999.4 3.999.4 200502222100]
	org.netbeans.modules.schema2beans/1 [1.11 200502222100]
	org.openide.io [1.6 200502222100]
	org.openide.execution [1.5 200502222100]
	org.netbeans.api.java/1 [1.7 200502222100]
	org.netbeans.modules.project.libraries/1 [1.10 200502222100]
	org.openide.src [1.5 200502222100]
	org.netbeans.libs.j2eeeditor/1 [1.4 200502222100]
	org.netbeans.modules.j2eeserver/3 [1.6 200502222100]
	org.netbeans.modules.editor.util/1 [1.2 200502222100]
	org.netbeans.modules.editor.fold/1 [1.2 200502222100]
	org.netbeans.modules.editor.lib/1 [1.3 0.1 200502222100]
	org.openidex.util/3 [3.6 200502222100]
	org.netbeans.modules.editor/3 [1.19 200502222100]
	org.netbeans.modules.websvc.registry [0.2 200502222100]
	org.netbeans.core.output2/1 [1.3 200502222100]
	org.netbeans.core.execution/1 [1.6 200502222100]
	org.apache.tools.ant.module/3 [3.15 200502222100]
	org.netbeans.modules.xml.core/2 [1.6.3.999.4 3.999.4 200502222100]
	org.netbeans.modules.ant.grammar/1 [1.9.3.999.4 200502222100]
	org.netbeans.api.web.webmodule [1.2 200502222100]
	org.netbeans.libs.xerces/1 [1.5 2.6.2]
	org.netbeans.modules.j2ee.dd/1 [1.3 1.0 200502222100]
	org.netbeans.modules.project.ant/1 [1.6 200502222100]
	org.netbeans.modules.j2ee.api.ejbmodule [1.0 200502222100]
	org.netbeans.modules.java.editor.lib/1 [1.0 200502222100]
	org.netbeans.modules.css/2 [1.6.3.999.4 3.999.4 200502222100]
	org.netbeans.modules.servletapi/1 [1.6 200502222100]
	org.netbeans.modules.httpserver/2 [2.1 2.0-release40]
	org.netbeans.modules.html/1 [1.15 200502222100]
	org.netbeans.spi.viewmodel/1 [1.3 200502222100]
	org.netbeans.api.debugger/1 [1.3 200502222100]
	org.netbeans.api.debugger.jpda/1 [1.2 200502222100]
	org.netbeans.modules.xml.catalog/2 [1.5.3.999.4 3.999.4 200502222100]
	org.netbeans.modules.javahelp/1 [2.5 200502222100]
	org.netbeans.modules.db/1 [1.11 1.1 200502222100]
	org.netbeans.modules.dbschema/1 [1.3.2 1.1]
	org.netbeans.modules.projectuiapi/1 [1.4.4.0.0 4.0.0 200502222100]
	org.netbeans.modules.j2ee.sun.ide/1 [2.1 1.0]
	org.netbeans.modules.java.platform/1 [1.3 200502222100]
	org.netbeans.swing.tabcontrol [1.3 200502222100]
	org.netbeans.core.windows/2 [2.4 200502222100]
	org.netbeans.core.ui/1 [1.6 200502222100]
	org.netbeans.modules.masterfs/1 [1.4 200502222100]
	org.netbeans.modules.projectui [1.2.4.0.0 200502222100]
	javax.jmi.reflect/1 [1.4 200502222100]
	javax.jmi.model/1 [1.4 200502222100]
	org.netbeans.api.mdr/1 [1.1 200502222100]
	org.netbeans.jmi.javamodel/1 [1.13 200502222100]
	org.netbeans.modules.jmiutils/1 [1.1 1.0.0 200502222100]
	org.netbeans.modules.mdr/1 [1.1 1.0.0 200502222100]
	org.netbeans.modules.classfile/1 [1.14 200502222100]
	org.netbeans.modules.javacore/1 [1.5 200502222100]
	org.netbeans.modules.java/1 [1.20 1.0.0 200502222100]
	org.netbeans.modules.java.project/1 [1.3 200502222100]
	org.netbeans.modules.ant.freeform [1.5 200502222100]
	org.netbeans.modules.java.freeform [1.0 200502222100]
	org.netbeans.modules.j2ee.platform/1 [1.0 200502222100]
	org.netbeans.libs.commons_logging/1 [1.0 1.0.4 200502222100]
	org.netbeans.modules.servletapi24/1 [2.3 2.3 200502222100]
	org.netbeans.modules.web.jspparser/2 [2.2 200502222100]
	org.netbeans.modules.ant.browsetask [1.8 200502222100]
	org.netbeans.modules.j2ee.dd.webservice [1.0 1.0]
	org.netbeans.modules.websvc.websvcapi [1.0 200502222100]
	org.netbeans.modules.junit/2 [2.14 200502222100]
	org.netbeans.modules.j2ee.common/1 [1.0 1.0.1 200502222100]
	org.netbeans.core.multiview/1 [1.4.4.0.1 4.0.1 200502222100]
	org.netbeans.modules.xml.multiview/1 [1.0 1.0-release41]
	org.netbeans.modules.editor.plain.lib/1 [1.0 200502222100]
	org.netbeans.modules.editor.plain/1 [1.0 200502222100]
	org.netbeans.modules.xml.text/2 [1.6.3.999.4 3.999.4 200502222100]
	org.netbeans.modules.html.editor.lib/1 [1.0 200502222100]
	org.netbeans.modules.html.editor/1 [1.0 200502222100]
	org.netbeans.modules.java.editor/1 [1.0 200502222100]
	org.netbeans.modules.web.core.syntax/1 [1.17 200502222100]
	org.netbeans.modules.web.core/1 [1.20 release41 200502222100]
	org.netbeans.modules.web.project [1.4 1.1.1.1]
	org.netbeans.modules.j2ee.ejbjarproject [1.1 1.1.1]
	org.netbeans.modules.j2ee.ejbfreeform [1.0 200502222100]
	org.netbeans.modules.xml.tax/2 [1.6.3.999.4 3.999.4 200502222100]
	org.netbeans.modules.xml.tools/2 [1.6.3.999.4 3.999.4 200502222100]
	org.netbeans.modules.websvc.core [1.0 200502222100]
	org.netbeans.modules.websvc.dev/1 [1.1 200502222100]
	org.netbeans.core.ide/1 [1.6 200502222100]
	org.netbeans.modules.web.examples/1 [1.2 200502222100]
	org.netbeans.tasklistapi/1 [1.15.6 6 200502222100]
	org.netbeans.modules.diff/1 [1.10 promotionE 200502222100]
	org.netbeans.modules.vcscore/1 [1.13 promotionE 200502222100]
	org.netbeans.modules.vcs.advanced/1 [1.12 200502222100]
	org.netbeans.modules.vcs.profiles.vss/1 [1.6 200502222100]
	org.netbeans.modules.apisupport.ant [2.23 200502222100]
	org.netbeans.modules.j2ee.debug/1 [1.0 200502222100]
	org.netbeans.modules.web.freeform [1.0 200502222100]
	org.netbeans.modules.form/2 [1.16 200502222100]
	org.netbeans.modules.vcs.profiles.pvcs/1 [1.6 200502222100]
	org.netbeans.modules.tasklist.core/2 [1.32.613 13 200502222100]
	org.netbeans.modules.suggestions_framework/2 [1.10.6138 8 200502222100]
	org.netbeans.modules.tasklist.docscan/2 [1.18.61384 4 200502222100]
	org.netbeans.modules.web.jstl11/1 [2.3 2.3 200502222100]
	org.netbeans.modules.utilities/1 [1.18 200502222100]
	org.netbeans.modules.navigator/2 [4.1 promoe 200502222100]
	org.netbeans.modules.utilities.project/1 [1.2 200502222100]
	org.netbeans.modules.usersguide/1 [1.16 200502222100]
	org.netbeans.spi.debugger.ui/1 [2.5 200502222100]
	org.netbeans.modules.debugger.jpda/2 [1.13 200502222100]
	org.netbeans.modules.debugger.jpda.ui/1 [1.2 200502222100]
	org.netbeans.modules.debugger.jpda.ant [1.4 200502222100]
	org.netbeans.modules.java.j2seproject [1.2 1.2.0 200502222100]
	org.netbeans.modules.welcome/1 [1.7 200502222100]
	org.netbeans.modules.favorites/1 [1.8 200502222100]
	org.netbeans.modules.properties/1 [1.14 @BUILD_NUMBER_SUBST@]
	org.netbeans.modules.properties.syntax/1 [1.14 @BUILD_NUMBER_SUBST@]
	org.netbeans.modules.autoupdate/1 [2.12 200502222100]
	org.netbeans.modules.updatecenters/1 [1.3 200502222100]
	org.netbeans.modules.xsl/1 [1.6.3.999.4 3.999.4 200502222100]
	org.netbeans.modules.i18n/1 [1.17 200502222100]
	org.netbeans.modules.javadoc/1 [1.14 200502222100]
	org.netbeans.upgrader [4.2 200502222100]
	org.netbeans.modules.web.monitor/1 [1.12 200502222100]
	org.netbeans.modules.tomcat5/1 [1.3 200502222100]
	org.netbeans.modules.refactoring/1 [1.1 1.0 200502222100]
	org.netbeans.modules.image/1 [1.14 200502222100]
	org.netbeans.modules.apisupport.project [1.1 200502222100]
	org.netbeans.modules.j2ee.earproject [1.0 1.0.1 200502222100]
	org.netbeans.modules.web.debug/1 [2.4 200502222100]
	org.netbeans.modules.j2ee.blueprints/1 [1.5.1 200502222100]
	org.netbeans.modules.tomcat5.bundled/1 [1.3 200502222100]
	org.netbeans.modules.clazz/1 [1.16 200502222100]
	org.netbeans.modules.xml.schema/1 [1.6.3.999.4 3.999.4 200502222100]
	org.netbeans.modules.j2ee.ddloaders/1 [1.2 1.0]
	org.netbeans.modules.java.examples/1 [1.2 200502222100]
	org.netbeans.modules.i18n.form/2 [1.15 200502222100]
	org.netbeans.lib.cvsclient/1 [1.11 200502222100]
	org.netbeans.modules.java.j2seplatform/1 [1.2 1.2.0 200502222100]
	org.netbeans.modules.beans/1 [1.14 200502222100]
	org.netbeans.modules.j2ee.genericserver [1.0 200502222100]
	org.netbeans.modules.extbrowser/1 [1.6 200502222100]
	org.netbeans.modules.j2ee.ant [1.3 200502222100]
	org.netbeans.modules.vcs.profiles.cvsprofiles/1 [1.6 200502222100]
	org.netbeans.modules.javanavigation/1 [4.1 200502222100]
	org.netbeans.modules.j2ee.refactoring/1 [1.0 200502222100]
Comment 1 Marian Mirilovic 2005-04-11 13:42:36 UTC
*** Issue 57720 has been marked as a duplicate of this issue. ***
Comment 2 Jaromir Uhrik 2005-04-15 15:49:13 UTC
I am not able to reproduce this issue in current builds from release 4.1 branch
(build #200504142205; Java 1.4.2_05 VM 1.4.2-38; Mac OS X 10.3.8).
Comment 3 rmatous 2005-04-15 15:59:46 UTC
There is no known way how to reproduce. Many fixes has gone into related source
code since beta. I think this issue can be closed. 

But don't hasitate to reopen it if you are able to reproduce on one of the
latest builds. Thanks.
Comment 4 dschultheis 2005-04-25 09:00:49 UTC
Perhaps, you can reproduce this error, if you install netbeans in any network path. Our workstation use 
a server for data store. I think netbeans 4.1 has problem with file description, so you get than at start 
error dialog and an IOException in log-file.
Comment 5 dschultheis 2005-04-26 15:40:53 UTC
Created attachment 21873 [details]
Error Dialog
Comment 6 dschultheis 2005-04-26 17:16:01 UTC
I tested 4.1 RC1 again and found the way to reproduce the error. I get allways an error if my path for 
settings was too large like this: /Network/Servers/cubus.crosssoft.de/Volumes/cubedata/CS/GmbH/
User/dschultheis/.netbeans/4.1rc/ 
If I start netbeans as local user then I don't have any Exceptions.
Comment 7 Jaromir Uhrik 2005-04-28 14:26:01 UTC
I have no problem to start NB4.1 RC1 build from following remote location (Sun
Sparc with Solaris OS):
/mnt/MY_SERVER/dashboard/netbeans/Servers/cubuss.crosssoft.de/Volumes/cubedata/CS/netbeans/4.1/netbeans/
with userdir:
/mnt/MY_SERVER/dashboard/netbeans/Servers/cubuss.crosssoft.de/Volumes/cubedata/CS/GmBH/User/dshultheis/.netbeans/4.1rc

I tried even the case when the userdir has invalid permittion. Then I got the
following exception to the console and the IDE doesn't start:
java.io.IOException: Permission denied
        at java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.io.File.createNewFile(File.java:828)
        at org.netbeans.CLIHandler.initialize(CLIHandler.java:440)
        at org.netbeans.CLIHandler.initialize(CLIHandler.java:280)
        at org.netbeans.Main.execute(Main.java:158)
        at org.netbeans.Main.main(Main.java:39)

So I was not successfull with reproducing of this issue. Could you please
provide additional information about the server OS, FileSystem type and attach
the complete ide.log.

Thanks
.JARa 
Comment 8 dschultheis 2005-04-28 14:39:30 UTC
Created attachment 21908 [details]
Log-File of Netbeans 4.1 RC1
Comment 9 dschultheis 2005-04-28 14:48:31 UTC
Here is an additional Information about our Server:
Mac OS X 10.3.8
Filesystem: HFS
The complete Log-File I have attached to this issue. If I start netbeans 4.1 RC1 so I can't edit any File 
with him. Only if I start it localy I can edit something. By the same install of netbeans 4.0 we didn't have 
any problem. 
Comment 10 Milos Kleint 2005-04-28 14:54:44 UTC
I wonder if the issue is about network path or long path. Could you try creating
a local path that is as long as the network one, preferably with the path items
like "cubus.crosssoft.de" (meaining the dots in path)?

Comment 11 dschultheis 2005-04-28 16:15:55 UTC
I tried to use netbeans with another location (/Users/cubus.crosssoft.de/blabla/blabla/abrakadabra/.../
aplication/netbeans). It works if the setting-Location is local. How can I change the Setting-Location of 
netbeans (.netbeans)?
Comment 12 Jaromir Uhrik 2005-04-28 16:34:54 UTC
Did you try to start NetBeans with -userdir switch? Settings are then stored in
the folder that follows the -userdir parameter. The example of command is:
netbeans.exe -userdir C:\my_userdir -jdkhome D:\j2sdk1.5.0
Comment 13 dschultheis 2005-04-29 10:04:34 UTC
By starting of netbeans with -userdir /Localpath/../blabla it work properly. But if I open a Project from 
network path like this: /private/Network/Servers/cubus.crosssoft.de/Volumes/cubedata/CS/GmbH/
User/dschultheis/Workspace/Project1 then I get an Error in Log-File Bad-Filedescription and I can't edit 
Project anyway.
Comment 14 rmatous 2005-05-04 10:32:30 UTC
*** Issue 58550 has been marked as a duplicate of this issue. ***
Comment 15 Tomas Zezula 2005-05-04 15:05:04 UTC
*** Issue 58550 has been marked as a duplicate of this issue. ***
Comment 16 vanjab 2005-05-05 16:06:11 UTC
Just to add a few comments:
I converted my samba shares to NFS shares in order to avoid the 'bug', so that I can return to actual 
work... But I found out that the same 'bug' is affecting NFS shares too as I was unable to create a new 
project (or work on existing projects) on NFS shares as well. I am not sure whose bug is it and where 
the error lies, but there is a sense of urgency that I feel :-))) as I can't do any work on any networked 
drive...
What exactly is the bug/error/incompatibility here? Can I do something to help speed things up?

We are, of course, talking about MacOSX as the only affected OS.
I am running:
MacOSX 10.4 'Tiger'
Netbeans 4.1RC2
Java SDK 1.4.2_07
on
Dual Processor G5 with 1 GB ram

Thanks
Vanja Bucic
Icetec Inc.
Comment 17 rmatous 2005-05-06 08:02:54 UTC
Because this problem isn't bug in NB (see attachment), we can do a very little
for you, because  its hard to imagine whatever could be improved in NB 4.1. 

For next release we can provide some special property that would ensure that no
nio.FileLocks will be exploited. We could also consider to deliver patch with
this property for NB4.1 users.
Comment 18 rmatous 2005-05-06 08:06:12 UTC
Created attachment 22004 [details]
java.io.IOException: Operation not supported
Comment 19 rmatous 2005-05-06 08:11:09 UTC
Similar issue (reported on Win2000) #57690.
Comment 20 vanjab 2005-05-06 16:57:12 UTC
Thanks.
I understand that the Netbeans code is not doing anything wrong/buggy.
I have filed a bug report with Apple, together with sample code and output.

Here is a Linux report regarding file locking issues: 
http://lists.samba.org/archive/samba/2004-October/093732.html
http://lists.samba.org/archive/linux-cifs-client/2004-October/000418.html

Here is also an advisory from Sun:
http://java.sun.com/j2se/1.4.2/docs/api/java/nio/channels/FileLock.html

And we of course have the Win2000 case from the bug report #57690

I don't know what the resolution could be as I am not well versed in IO problems, but it just feels like 
this methodology of file locking needs to be reevaluated when network drives are in question. A great 
number of developers are required to deal with company SMB/NFS/Netware shares.

vb
Comment 21 rmatous 2005-05-06 18:08:41 UTC
Thanks for your comment - I plan to reevaluate it ASAP to get rid of these
problems. 
Comment 22 dschultheis 2005-05-17 16:22:26 UTC
What is with netbeans 4.1 Realease? This Filelocking "feature" is not fixed in release. What is about release 
notes? How can we use the netbeans 4.1? 
Comment 23 Jaromir Uhrik 2005-05-18 13:55:30 UTC
The issue remains in NetBeans 4.1 release. We have recommendation how to use
this release and avoid the issue.
The simple workaround is to copy module .jar file from NetBeans release 4.0
(netbeans/platform4/modules/org-netbeans-modules-masterfs.jar)
and paste it to release 4.1 build into the directory
netbeans/platform5/modules/
Filelocking feature is missing then of course.
I replaced the masterfs module and everything works fine when working with
project on remote server (accessed by samba). 
Comment 24 patrickmiddleton 2005-06-21 18:05:39 UTC
Seeing this when starting Netbeans 4.1 IDE on MacOSX 10.3.9.
This did not occur in Netbeans 4.0

My home directory is imported over NFS.  An existing project in my home directory still opens; 
creating/saving/opening other projects does not I managed to create a new project on the local disk in 
/tmp/ ; having closed it , I can't reopen it.  [This stuff is probably mostly a second bug, but the NFS 
problem seems to be real]


java.io.IOException: Bad file descriptor
	at sun.nio.ch.FileChannelImpl.release0(Native Method)
	at sun.nio.ch.FileChannelImpl.implCloseChannel(FileChannelImpl.java:105)
	at java.nio.channels.spi.AbstractInterruptibleChannel.close(AbstractInterruptibleChannel.java:97)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.WriteLock.<init>(WriteLock.java:108)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.WriteLock.tryLock(WriteLock.java:64)
	at org.netbeans.modules.masterfs.filebasedfs.fileobjects.FileObj.lock(FileObj.java:179)
	at org.netbeans.modules.masterfs.Delegate$FileLockImpl.lock(Delegate.java:294)
	at org.netbeans.modules.masterfs.Delegate$FileLockImpl.initLock(Delegate.java:256)
	at org.netbeans.modules.masterfs.Delegate$FileLockImpl.access$200(Delegate.java:243)
	at org.netbeans.modules.masterfs.Delegate.lock(Delegate.java:170)
	at org.netbeans.modules.masterfs.MasterFileObject.lock(MasterFileObject.java:154)
	at org.netbeans.spi.project.support.ant.ProjectProperties$1.run(ProjectProperties.java:216)
	at org.openide.filesystems.EventControl.runAtomicAction(EventControl.java:89)
	at org.openide.filesystems.FileSystem.runAtomicAction(FileSystem.java:432)
	at org.netbeans.spi.project.support.ant.ProjectProperties$PP.write(ProjectProperties.java:203)
	at org.netbeans.spi.project.support.ant.ProjectProperties.write(ProjectProperties.java:109)
	at org.netbeans.spi.project.support.ant.AntProjectHelper.save(AntProjectHelper.java:525)
	at org.netbeans.spi.project.support.ant.AntProjectHelper.access$100(AntProjectHelper.java:63)
	at org.netbeans.spi.project.support.ant.AntProjectHelper$1.save(AntProjectHelper.java:101)
	at 
org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.saveProject(AntBasedProjectFactoryS
ingleton.java:146)
	at org.netbeans.api.project.ProjectManager$7.run(ProjectManager.java:515)
	at org.openide.util.Mutex.writeAccess(Mutex.java:310)
	at org.netbeans.api.project.ProjectManager.saveProject(ProjectManager.java:508)
	at org.netbeans.modules.web.project.WebProject$6.run(WebProject.java:599)
	at org.openide.util.Mutex.writeAccess(Mutex.java:274)
	at 
org.netbeans.modules.web.project.WebProject$ProjectOpenedHookImpl.projectOpened(WebProject.java
:584)
	at org.netbeans.spi.project.ui.ProjectOpenedHook$1.projectOpened(ProjectOpenedHook.java:49)
	at org.netbeans.modules.project.ui.OpenProjectList.notifyOpened(OpenProjectList.java:404)
	at org.netbeans.modules.project.ui.OpenProjectList.getDefault(OpenProjectList.java:121)
	at 
org.netbeans.modules.project.ui.OpenProjectsTrampolineImpl.<init>(OpenProjectsTrampolineImpl.java
:35)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
	at 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:
27)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
	at java.lang.Class.newInstance0(Class.java:308)
	at java.lang.Class.newInstance(Class.java:261)
	at org.openide.util.lookup.MetaInfServicesLookup$P.getInstance(MetaInfServicesLookup.java:346)
	at org.openide.util.lookup.AbstractLookup.lookup(AbstractLookup.java:298)
	at org.openide.util.lookup.ProxyLookup.lookup(ProxyLookup.java:140)
	at org.netbeans.modules.project.uiapi.Utilities.getOpenProjectsTrampoline(Utilities.java:45)
	at org.netbeans.api.project.ui.OpenProjects.<init>(OpenProjects.java:52)
	at org.netbeans.api.project.ui.OpenProjects.<clinit>(OpenProjects.java:47)
	at 
org.netbeans.modules.editor.bookmarks.EditorBookmarksModule.restored(EditorBookmarksModule.jav
a:58)
	at org.netbeans.core.modules.NbInstaller.loadCode(NbInstaller.java:322)
	at org.netbeans.core.modules.NbInstaller.load(NbInstaller.java:240)
	at org.netbeans.core.modules.ModuleManager.enable(ModuleManager.java:869)
	at org.netbeans.core.modules.ModuleList.installNew(ModuleList.java:382)
	at org.netbeans.core.modules.ModuleList.trigger(ModuleList.java:316)
	at org.netbeans.core.modules.ModuleSystem.restore(ModuleSystem.java:253)
	at org.netbeans.core.NonGui.run(NonGui.java:355)
	at org.netbeans.core.Main.run(Main.java:185)
	at org.netbeans.core.NbTopManager.getNbTopManager(NbTopManager.java:241)
	at org.netbeans.core.NbTopManager.get(NbTopManager.java:190)
	at org.netbeans.core.Main.start(Main.java:311)
	at org.netbeans.core.TopThreadGroup.run(TopThreadGroup.java:90)
[catch] at java.lang.Thread.run(Thread.java:552)
Comment 25 rmatous 2005-07-07 12:23:23 UTC
nio.FileLock was ommited:

/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/Delegate.java,v  <-- 
new revision: 1.18; previous revision: 1.17

/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/MountTable.java,v  <-- 
new revision: 1.19; previous revision: 1.18

/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/FileObj.java,v
 new revision: 1.12; previous revision: 1.11

/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/WriteLock.java,v
 new revision: 1.6; previous revision: 1.5

/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/WriteLockFactory.java,v

/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/WriteLockFactory.java,v
 initial revision: 1.1

/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/WriteLockUtils.java,v
 initial revision: 1.1

/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/utils/FileInfo.java,v
 new revision: 1.7; previous revision: 1.6

/cvs/openide/masterfs/test/unit/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/WriteLockTest.java,v
 new revision: 1.2; previous revision: 1.1
Comment 26 Jaromir Uhrik 2005-07-13 14:11:05 UTC
I successfuly created project on mounted SMB and opened existing project too.
Works fine in trunk build from 2005/07/11.
Comment 27 Viliam Sivaninec 2005-07-13 14:54:00 UTC
This fix was backported to release41_fixes branch.

Checking in src/org/netbeans/modules/masterfs/Delegate.java;
/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/Delegate.java,v  <-- 
Delegate.java
new revision: 1.16.14.1.6.1; previous revision: 1.16.14.1
done
Checking in src/org/netbeans/modules/masterfs/MountTable.java;
/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/MountTable.java,v  <-- 
MountTable.java
new revision: 1.18.30.1; previous revision: 1.18
done
Checking in src/org/netbeans/modules/masterfs/filebasedfs/utils/FileInfo.java;
/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/utils/FileInfo.java,v
 <--  FileInfo.java
new revision: 1.6.18.1; previous revision: 1.6
done
Checking in src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/FileObj.java;
/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/FileObj.java,v
 <--  FileObj.java
new revision: 1.8.12.1; previous revision: 1.8
done
Checking in
src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/WriteLock.java;
/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/WriteLock.java,v
 <--  WriteLock.java
new revision: 1.3.16.1; previous revision: 1.3
done
Checking in
test/unit/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/WriteLockTest.java;
/cvs/openide/masterfs/test/unit/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/WriteLockTest.java,v
 <--  WriteLockTest.java
new revision: 1.1.26.1; previous revision: 1.1
done
Checking in WriteLockFactory.java;
/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/WriteLockFactory.java,v
 <--  WriteLockFactory.java
new revision: 1.1.2.1; previous revision: 1.1
done
Checking in WriteLockUtils.java;
/cvs/openide/masterfs/src/org/netbeans/modules/masterfs/filebasedfs/fileobjects/WriteLockUtils.java,v
 <--  WriteLockUtils.java
new revision: 1.1.2.1; previous revision: 1.1
done
Comment 28 vanjab 2005-07-13 16:38:14 UTC
Sorry for ignorance; how do I get the 'fixed' version of 4.1 or the fixes patch? What is the 'release41_fixes' 
branch and when does it become part of the official 4.1 release on the web page?
Thanks.
Comment 29 rmatous 2005-09-21 09:53:55 UTC
*** Issue 57690 has been marked as a duplicate of this issue. ***