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.
This is a regression. Nevada Build 030407, Win XP, JDK 1.4.1_02 -Check Out an EJB Module from CVS repository; -Make some changes to EJB Module; -Selected an EJB Module > CVS > Commit. Commit is finished and EJB Module was versioned correctly. -Exited an IDE via 'X' button, clicked 'Save All' button in the 'Save' dialog. Observed the following exception: Annotation: An exception occurred while saving Annotation: Invalid lock [org.openide.filesystems.AbstractFileObject$AfLock@320e7a] for file pcImpl0/moduleComp0/chris/Clare/ManufactureTbl.java in C:\DOCUME~1\solodky\LOCALS~1\Temp\ShadowDir0 with current lock [null]. org.openide.filesystems.FSException: Invalid lock [org.openide.filesystems.AbstractFileObject$AfLock@320e7a] for file pcImpl0/moduleComp0/chris/Clare/ManufactureTbl.java in C:\DOCUME~1\solodky\LOCALS~1\Temp\ShadowDir0 with current lock [null]. at org.openide.filesystems.FSException.io(FSException.java:100) at org.openide.filesystems.AbstractFileObject.testLock(AbstractFileObject.java:232) at org.openide.filesystems.AbstractFileObject.getOutputStream(AbstractFileObject.java:190) at org.openide.filesystems.AbstractFileObject.getOutputStream(AbstractFileObject.java:176) at org.openide.text.DataEditorSupport$Env.outputStream(DataEditorSupport.java:341) at org.openide.text.CloneableEditorSupport.saveDocument(CloneableEditorSupport.java:458) at org.openide.text.DataEditorSupport.saveDocument(DataEditorSupport.java:231) at org.openide.text.EditorSupport$Del.superSaveDocument(EditorSupport.java:694) at org.openide.text.EditorSupport.saveDocument(EditorSupport.java:224) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:421) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:403) at org.openide.text.EditorSupport$EntryEnv.save(EditorSupport.java:816) at org.netbeans.core.ExitDialog.save(ExitDialog.java:166) at org.netbeans.core.ExitDialog.save(ExitDialog.java:144) at org.netbeans.core.ExitDialog.actionPerformed(ExitDialog.java:125) at org.netbeans.core.NbPresenter$ButtonListener.actionPerformed(NbPresenter.java:938) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1764) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1817) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:419) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:257) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:245) at java.awt.Component.processMouseEvent(Component.java:5134) at java.awt.Component.processEvent(Component.java:4931) at java.awt.Container.processEvent(Container.java:1566) at java.awt.Component.dispatchEventImpl(Component.java:3639) at java.awt.Container.dispatchEventImpl(Container.java:1623) at java.awt.Component.dispatchEvent(Component.java:3480) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095) at java.awt.Container.dispatchEventImpl(Container.java:1609) at java.awt.Window.dispatchEventImpl(Window.java:1590) at java.awt.Component.dispatchEvent(Component.java:3480) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:450) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:140) at java.awt.Dialog.show(Dialog.java:538) at org.netbeans.core.NbPresenter.superShow(NbPresenter.java:690) at org.netbeans.core.NbPresenter.doShow(NbPresenter.java:733) at org.netbeans.core.NbPresenter.run(NbPresenter.java:721) at org.openide.util.Mutex$1.run(Mutex.java:952) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:171) at java.awt.EventQueue.dispatchEvent(EventQueue.java:448) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136) at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
I've no idea what the problem might be. There's nothig from VCS modules in the exception stack trace => I'm moving this to openide for evaluation.
Radek, please look at it, thanks in advance :)
A user (lamont_gilbert@rigidsoftware.com) on nbdev reported a similar thing: I am using the latest build 200304092350 on JDK1.3.1_07. I unzipped it into a directory, then I started it with a fresh userdirectory. I then started a new project, added a folder to the filesystem. Then I added several folders using windows which are my packages. I did this as opposed to adding the package through NB. I then added a JFrame, which appeared with the correct packaging. But when I try to save the simple almost empty JFrame I get and error, invalid lock. I have to trash the file. How could this get into the 3.5dev build with all the vigorous testing and all!?! *********** Exception occurred ************ at Thu Apr 10 10:22:30 EDT 2003 Annotation: Invalid lock [org.openide.filesystems.AbstractFileObject$AfLock@26b7a] for file com/rigidsoftware/JWorkBench /MainWindow.java in C:\JavaStuff\Workbox\JWorkBench\src with current lock [null]. org.openide.filesystems.FSException: Invalid lock [org.openide.filesystems.AbstractFileObject$AfLock@26b7a] for file com /rigidsoftware/JWorkBench/MainWindow.java in C:\JavaStuff\Workbox\JWorkBench\src with current lock [null]. at org.openide.filesystems.FSException.io(FSException.java:100) at org.openide.filesystems.AbstractFileObject.testLock(AbstractFileObject.java:232) at org.openide.filesystems.AbstractFileObject.getOutputStream(AbstractFileObject.java:190) at org.openide.filesystems.AbstractFileObject.getOutputStream(AbstractFileObject.java:176) at org.openide.text.DataEditorSupport$Env.outputStream(DataEditorSupport.java:341) at org.openide.text.CloneableEditorSupport.saveDocument(CloneableEditorSupport.java:458) at org.openide.text.DataEditorSupport.saveDocument(DataEditorSupport.java:231) at org.openide.text.EditorSupport$Del.superSaveDocument(EditorSupport.java:694) at org.openide.text.EditorSupport.saveDocument(EditorSupport.java:224) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:421) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:403) at org.openide.text.EditorSupport$Del.saveDocument(EditorSupport.java:690) [catch] at org.openide.text.CloneableEditorSupport.canClose(CloneableEditorSupport.java:654) at org.openide.text.DataEditorSupport.canClose(DataEditorSupport.java:215) at org.openide.text.EditorSupport$Del.superCanClose(EditorSupport.java:723) at org.openide.text.EditorSupport.canClose(EditorSupport.java:386) at org.openide.text.EditorSupport$Del.canClose(EditorSupport.java:726) at org.openide.text.CloneableEditor.closeLast(CloneableEditor.java:284) at org.openide.windows.CloneableTopComponent$Ref.unregister(CloneableTopComponent.java:293) at org.openide.windows.CloneableTopComponent$Ref.access$300(CloneableTopComponent.java:200) at org.openide.windows.CloneableTopComponent.canClose(CloneableTopComponent.java:142) at org.openide.text.CloneableEditor.canClose(CloneableEditor.java:117) at org.openide.windows.TopComponent.close(TopComponent.java:280) at org.openide.windows.TopComponent.close(TopComponent.java:257) at org.netbeans.core.windows.frames.CloseButtonTabbedPane$CloseButtonListener.eventDispatched(CloseButtonTabbedP ane.java:388) at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:1515) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1427) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:1385) at java.awt.Component.dispatchEventImpl(Component.java:2502) at java.awt.Container.dispatchEventImpl(Container.java:1208) at java.awt.Component.dispatchEvent(Component.java:2492) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125) at java.awt.Container.dispatchEventImpl(Container.java:1195) at java.awt.Window.dispatchEventImpl(Window.java:923) at java.awt.Component.dispatchEvent(Component.java:2492) at java.awt.EventQueue.dispatchEvent(EventQueue.java:334) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:126) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:93) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88) at java.awt.EventDispatchThread.run(EventDispatchThread.java:80) INFORMATIONAL *********** Exception occurred ************ at Thu Apr 10 10:22:40 EDT 2003 Annotation: Invalid lock [org.openide.filesystems.AbstractFileObject$AfLock@26b7a] for file com/rigidsoftware/JWorkBench /MainWindow.java in C:\JavaStuff\Workbox\JWorkBench\src with current lock [null]. org.openide.filesystems.FSException: Invalid lock [org.openide.filesystems.AbstractFileObject$AfLock@26b7a] for file com /rigidsoftware/JWorkBench/MainWindow.java in C:\JavaStuff\Workbox\JWorkBench\src with current lock [null]. at org.openide.filesystems.FSException.io(FSException.java:100) at org.openide.filesystems.AbstractFileObject.testLock(AbstractFileObject.java:232) at org.openide.filesystems.AbstractFileObject.getOutputStream(AbstractFileObject.java:190) at org.openide.filesystems.AbstractFileObject.getOutputStream(AbstractFileObject.java:176) at org.openide.text.DataEditorSupport$Env.outputStream(DataEditorSupport.java:341) at org.openide.text.CloneableEditorSupport.saveDocument(CloneableEditorSupport.java:458) at org.openide.text.DataEditorSupport.saveDocument(DataEditorSupport.java:231) at org.openide.text.EditorSupport$Del.superSaveDocument(EditorSupport.java:694) at org.openide.text.EditorSupport.saveDocument(EditorSupport.java:224) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:421) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:403) at org.openide.text.EditorSupport$EntryEnv.save(EditorSupport.java:816) [catch] at org.netbeans.core.NbTopManager.saveAll(NbTopManager.java:479) at org.netbeans.core.NbTopManager$NbLifecycleManager.saveAll(NbTopManager.java:587) at org.openide.actions.SaveAllAction.performAction(SaveAllAction.java:79) at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:69) at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:97) at org.openide.util.Task.run(Task.java:136) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:328) at org.openide.util.RequestProcessor$Processor.run(
Another similar exception, copied form Sun bugtraq 4845987 Apr 09 15:54:26 PDT 2003 Annotation: Invalid lock [org.openide.filesystems.AbstractFileObject$AfLock@2cbd3] for file Data/RestaurantBean.java in /home/arshia/examples-nevada/DiningGuide with current lock [null]. org.openide.filesystems.FSException: Invalid lock [org.openide.filesystems.AbstractFileObject$AfLock@2cbd3] for file Data/RestaurantBean.java in /home/arshia/examples-nevada/DiningGuide with current lock [null]. at org.openide.filesystems.FSException.io(FSException.java:100) at org.openide.filesystems.AbstractFileObject.testLock(AbstractFileObject.java:232) at org.openide.filesystems.AbstractFileObject.getOutputStream(AbstractFileObject.java:190) at org.openide.filesystems.AbstractFileObject.getOutputStream(AbstractFileObject.java:176) at org.openide.text.DataEditorSupport$Env.outputStream(DataEditorSupport.java:341) at org.openide.text.CloneableEditorSupport.saveDocument(CloneableEditorSupport.java:458) at org.openide.text.DataEditorSupport.saveDocument(DataEditorSupport.java:231) at org.openide.text.EditorSupport$Del.superSaveDocument(EditorSupport.java:694) at org.openide.text.EditorSupport.saveDocument(EditorSupport.java:224) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:421) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:403) at org.openide.text.EditorSupport$EntryEnv.save(EditorSupport.java:816) [catch] at org.netbeans.core.NbTopManager.saveAll(NbTopManager.java:479) at org.netbeans.core.NbTopManager$NbLifecycleManager.saveAll(NbTopManager.java:587) at org.openide.compiler.CompilerExecutor$CERunnable.run(CompilerExecutor.java:146) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:118) INFORMATIONAL *********** Exception occurred ************ at Wed Apr 09 15:54:26 PDT 2003 Annotation: Invalid lock [org.openide.filesystems.AbstractFileObject$AfLock@a7e343] for file Data/LocalCustomerreviewHome.java in /home/arshia/examples-nevada/DiningGuide with current lock [null]. org.openide.filesystems.FSException: Invalid lock [org.openide.filesystems.AbstractFileObject$AfLock@a7e343] for file Data/LocalCustomerreviewHome.java in /home/arshia/examples-nevada/DiningGuide with current lock [null]. at org.openide.filesystems.FSException.io(FSException.java:100) at org.openide.filesystems.AbstractFileObject.testLock(AbstractFileObject.java:232) at org.openide.filesystems.AbstractFileObject.getOutputStream(AbstractFileObject.java:190) at org.openide.filesystems.AbstractFileObject.getOutputStream(AbstractFileObject.java:176) at org.openide.text.DataEditorSupport$Env.outputStream(DataEditorSupport.java:341) at org.openide.text.CloneableEditorSupport.saveDocument(CloneableEditorSupport.java:458) at org.openide.text.DataEditorSupport.saveDocument(DataEditorSupport.java:231) at org.openide.text.EditorSupport$Del.superSaveDocument(EditorSupport.java:694) at org.openide.text.EditorSupport.saveDocument(EditorSupport.java:224) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:421) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:403) at org.openide.text.EditorSupport$EntryEnv.save(EditorSupport.java:816) [catch] at org.netbeans.core.NbTopManager.saveAll(NbTopManager.java:479) at org.netbeans.core.NbTopManager$NbLifecycleManager.saveAll(NbTopManager.java:587) at org.openide.compiler.CompilerExecutor$CERunnable.run(CompilerExecutor.java:146) at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:118)
Changed Summary to be more general
I got same problem. I am using the latest 3.5 build 200304092350 on JDK1.3.1_07. Windows 2000. I unzipped it into a directory, then I started it with a fresh userdirectory. I then started a new project, added a folder to the filesystem (which took several clicks and such to get the menu to show). Then I added several folders using windows file manager, which are my packages. I did this through windows as opposed to adding the package through NB. I then added a JFrame, which appeared with the correct packaging. But when I tried to save the simple almost empty JFrame I got an error, invalid lock. Note, the file was added to the HD, but appeared unsaved in the IDE. I am not sure if it was saved when I made it, or when I tried to save it. *********** Exception occurred ************ at Thu Apr 10 10:22:30 EDT 2003 Annotation: Invalid lock [org.openide.filesystems.AbstractFileObject$AfLock@26b7a] for file com/rigidsoftware/JWorkBench /MainWindow.java in C:\JavaStuff\Workbox\JWorkBench\src with current lock [null]. org.openide.filesystems.FSException: Invalid lock [org.openide.filesystems.AbstractFileObject$AfLock@26b7a] for file com /rigidsoftware/JWorkBench/MainWindow.java in C:\JavaStuff\Workbox\JWorkBench\src with current lock [null]. at org.openide.filesystems.FSException.io(FSException.java:100) at org.openide.filesystems.AbstractFileObject.testLock(AbstractFileObject.java:232) at org.openide.filesystems.AbstractFileObject.getOutputStream(AbstractFileObject.java:190) at org.openide.filesystems.AbstractFileObject.getOutputStream(AbstractFileObject.java:176) at org.openide.text.DataEditorSupport$Env.outputStream(DataEditorSupport.java:341) at org.openide.text.CloneableEditorSupport.saveDocument(CloneableEditorSupport.java:458) at org.openide.text.DataEditorSupport.saveDocument(DataEditorSupport.java:231) at org.openide.text.EditorSupport$Del.superSaveDocument(EditorSupport.java:694) at org.openide.text.EditorSupport.saveDocument(EditorSupport.java:224) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:421) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:403) at org.openide.text.EditorSupport$Del.saveDocument(EditorSupport.java:690) [catch] at org.openide.text.CloneableEditorSupport.canClose(CloneableEditorSupport.java:654) at org.openide.text.DataEditorSupport.canClose(DataEditorSupport.java:215) at org.openide.text.EditorSupport$Del.superCanClose(EditorSupport.java:723) at org.openide.text.EditorSupport.canClose(EditorSupport.java:386) at org.openide.text.EditorSupport$Del.canClose(EditorSupport.java:726) at org.openide.text.CloneableEditor.closeLast(CloneableEditor.java:284) at org.openide.windows.CloneableTopComponent$Ref.unregister(CloneableTopComponent.java:293) at org.openide.windows.CloneableTopComponent$Ref.access$300(CloneableTopComponent.java:200) at org.openide.windows.CloneableTopComponent.canClose(CloneableTopComponent.java:142) at org.openide.text.CloneableEditor.canClose(CloneableEditor.java:117) at org.openide.windows.TopComponent.close(TopComponent.java:280) at org.openide.windows.TopComponent.close(TopComponent.java:257) at org.netbeans.core.windows.frames.CloseButtonTabbedPane$CloseButtonListener.eventDispatched(CloseButtonTabbedP ane.java:388) at java.awt.Toolkit$SelectiveAWTEventListener.eventDispatched(Toolkit.java:1515) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1427) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit$ToolkitEventMulticaster.eventDispatched(Toolkit.java:1426) at java.awt.Toolkit.notifyAWTEventListeners(Toolkit.java:1385) at java.awt.Component.dispatchEventImpl(Component.java:2502) at java.awt.Container.dispatchEventImpl(Container.java:1208) at java.awt.Component.dispatchEvent(Component.java:2492) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125) at java.awt.Container.dispatchEventImpl(Container.java:1195) at java.awt.Window.dispatchEventImpl(Window.java:923) at java.awt.Component.dispatchEvent(Component.java:2492) at java.awt.EventQueue.dispatchEvent(EventQueue.java:334) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:126) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:93) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88) at java.awt.EventDispatchThread.run(EventDispatchThread.java:80) INFORMATIONAL *********** Exception occurred ************ at Thu Apr 10 10:22:40 EDT 2003 Annotation: Invalid lock [org.openide.filesystems.AbstractFileObject$AfLock@26b7a] for file com/rigidsoftware/JWorkBench /MainWindow.java in C:\JavaStuff\Workbox\JWorkBench\src with current lock [null]. org.openide.filesystems.FSException: Invalid lock [org.openide.filesystems.AbstractFileObject$AfLock@26b7a] for file com /rigidsoftware/JWorkBench/MainWindow.java in C:\JavaStuff\Workbox\JWorkBench\src with current lock [null]. at org.openide.filesystems.FSException.io(FSException.java:100) at org.openide.filesystems.AbstractFileObject.testLock(AbstractFileObject.java:232) at org.openide.filesystems.AbstractFileObject.getOutputStream(AbstractFileObject.java:190) at org.openide.filesystems.AbstractFileObject.getOutputStream(AbstractFileObject.java:176) at org.openide.text.DataEditorSupport$Env.outputStream(DataEditorSupport.java:341) at org.openide.text.CloneableEditorSupport.saveDocument(CloneableEditorSupport.java:458) at org.openide.text.DataEditorSupport.saveDocument(DataEditorSupport.java:231) at org.openide.text.EditorSupport$Del.superSaveDocument(EditorSupport.java:694) at org.openide.text.EditorSupport.saveDocument(EditorSupport.java:224) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:421) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:403) at org.openide.text.EditorSupport$EntryEnv.save(EditorSupport.java:816) [catch] at org.netbeans.core.NbTopManager.saveAll(NbTopManager.java:479) at org.netbeans.core.NbTopManager$NbLifecycleManager.saveAll(NbTopManager.java:587) at org.openide.actions.SaveAllAction.performAction(SaveAllAction.java:79) at org.openide.util.actions.CallableSystemAction.actionPerformed(CallableSystemAction.java:69) at org.netbeans.core.ModuleActions$1.run(ModuleActions.java:97) at org.openide.util.Task.run(Task.java:136) at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:328) at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:670)
Raising prio to P1. There have been already two reports of the problem against the recent builds. It needs to be investigated.
I would look at it, but I'm just working on another P1 today. Me or Radek will evaluate it and report more on Monday.
dnoyeB, are you able to reproduce this? I was trying your testcase because it is easier for me to reproduce but I was not successful. The cause might be that it was not clear to me what exactly you were doing. I tried following: - create empty directory d:\temp\test - mount this directory in NB - create subfolders org/nb/test in OS file manager - switch to NB; refresh FS to get packages - create in the package new JFrame Form - modify some property in the GUI editor and save the form Everything was OK, no exception. Is it how you are reproducing this problem? What is different? Just from the exception it is not clear what the problem might be. Thanx for your help in advance.
Few things. - switch to NB; refresh FS to get packages I didnt do any refresh to get packages. I typed name manually when I added the JFrame based class. - create in the package new JFrame Form I dont know about *form*, I just created a class, and typed in that it was based on JFrame. didnt use any form editor or anything. - modify some property in the GUI editor and save the form Didn't modify anything. Just tried to push save. Dont know why the save button was enabled since I didnt make any changes...
"I didnt do any refresh to get packages. I typed name manually when I added the JFrame based class." - this is not clear to me. You are saying that you have created packages in OS explorer. That means that they are *not* visible in NB, because automatic folder refresh is disabled. So how you create your JFrame in package which you created externally? I had to refresh FS to see them in NB. Also could I ask you please to try to reproduce it and confirm whether it is reproducible or not. That would help us a lot, because this is P1.
Their is a Dialog window when you add classes. Their is a JTextBox that allows you to type in the package name. I typed it in that box. (This is what I think I did) I will test later today hopefully.
Andrew, Alexander, are you able to reproduce this issue? Alexander, how is that possible that after committing EJB back into CVS and exiting IDE there are some modified files which need to be saved? Is not this a problem? Should not be all modifications saved before the commit?
Konecznyj, I too thought that was the main issue. When the JFrame file was created by the IDE it was created on the harddrive. Their was no need to save it because it had not been modified since it was created. But the file save button was enabled. It shouldnt have been. pushing it then caused the problem for me. I still have to test again though...
dnoyeB, it depends on what you customize in New Java Class wizard. If you for example add some fields in the wizard then following happens: #1 java file from the template is created on harddisk; #2 customizations (ie. fields added in wizard) are added to the java file what causes that file is modified in editor and need to be saved.
> Andrew, Alexander, are you able to reproduce this issue? I have never seen it, I am just the messenger :-). We are still seeing reports of variants of this bug but none have any more substantive information. Next time I see one I will ask if the user has a reproducible case. My instinct is that this is a timing related issue.
Created attachment 9932 [details] hot fix for release35/Nevada
I agree with Andree that this is timing issue. Definitely the problem is in text package and not in filesystems. If I look at CloneableEditorSupport.saveDocument there is no sign of synchronization at all. There is test env.isModified, that is almost useless is multithreaded environment. I'm not expert for text package, but I suggest easy and I think harmless HOT FIX for NB3.5/Nevada (please se attached diff). But I expect (according all reported stacktraces), that all here reported exceptions are only informational and that changes in files were really saved. Please could you confirm ?
Created attachment 9933 [details] Sorry, please consider this diff.
Again, for me their were no changes. The save button should not have even been enabled because I didn't change anything. Also, It took quite a bit of pushing to get the popup menu to show so their was something strange going on when I tried what I did.
Yes, this is most probably timing issue - adding RANDOM keyword. In the light of comments in this issue I propose following: - do not fix this issue for 3.5: it is too late; there is too less data about this problem and about its frequency; editor package is too fragile; the fix is harmless but we are not absolutely sure it fixes the problem - change target milestone to 4.0 - change priority to P2 - apply Radek's patch to trunk and we will see what happens QA, what is your opinion? Radek, I would add there some logging so that we learn how often this is happening.
Ok, I agree, we will not fix this issue for 3.5 : because we are not able to reproduce it and of course verify the fix. It will be very helpful to have some logging mechanism for testing it (in trunk). I agree with decreasing priority to P2 and TM=4.0.
I think this bug should be fixed for release35. This bug has happened on several different occasions now and it gives the IDE a poor image. I certainly agree that if the problem is not well understood then it may not be wise to fix it. However I would urge that more time should be spent on this so that the problem is understood.
Ok, I agree that this exception confuses user, but I have a few questions: 1. Is file (which has been modified) saved to disk? 2. Is here somebody who can reproduce it? 3. Is it reproducible, how often you see exception? I propose solution: Radek will prepare the patch, person who is able to reproduce it try works with the patched IDE. This is the only one way to investigate this type of defects. I don't approve the fix about that we don't know that fix the problem. Andrew, Alexander, are you agree?
I have no problem reproducing this issue. The procedure I gave before is the exact one I am using now to reproduce. Their is one difference though and that is that I *do* have to refresh the filesystem to get the packages to show. Note: it was a JFrame based *class* not *form*. I did not add the JFrame as a form. and my package was 'com.rigidsoftware'. And their were currently no projects. anyway, if you follow my procedure you should have no problem reproducing this issue. Once again, right clicking the filesystem icon would NOT bring up the mount menu no matter what I did. I had to go to the menu bar and I think select 'filesystem' then go back to filesystem and right click it before I could get the popup menu to show.
using jdk1.3.1_07 and IDE 200304092350, Windows 2000 with WindowsLookAndFeel. Also note, the save buttons are enabled when I made no changes to the created JFrame. pushing save causes error dialog to show. This happened when I tried to close the IDE. Annotation: An exception occurred while saving Annotation: Invalid lock [org.openide.filesystems.AbstractFileObject$AfLock@63956f] for file com/rigidsoftware/MainFrame.java in C:\xyz with current lock [null]. org.openide.filesystems.FSException: Invalid lock [org.openide.filesystems.AbstractFileObject$AfLock@63956f] for file com/rigidsoftware/MainFrame.java in C:\xyz with current lock [null]. at org.openide.filesystems.FSException.io(FSException.java:100) at org.openide.filesystems.AbstractFileObject.testLock(AbstractFileObject.java:232) at org.openide.filesystems.AbstractFileObject.getOutputStream(AbstractFileObject.java:190) at org.openide.filesystems.AbstractFileObject.getOutputStream(AbstractFileObject.java:176) at org.openide.text.DataEditorSupport$Env.outputStream(DataEditorSupport.java:341) at org.openide.text.CloneableEditorSupport.saveDocument(CloneableEditorSupport.java:458) at org.openide.text.DataEditorSupport.saveDocument(DataEditorSupport.java:231) at org.openide.text.EditorSupport$Del.superSaveDocument(EditorSupport.java:694) at org.openide.text.EditorSupport.saveDocument(EditorSupport.java:224) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:421) at org.netbeans.modules.java.JavaEditor.saveDocument(JavaEditor.java:403) at org.openide.text.EditorSupport$EntryEnv.save(EditorSupport.java:816) at org.netbeans.core.ExitDialog.save(ExitDialog.java:166) at org.netbeans.core.ExitDialog.save(ExitDialog.java:144) at org.netbeans.core.ExitDialog.actionPerformed(ExitDialog.java:125) at org.netbeans.core.NbPresenter$ButtonListener.actionPerformed(NbPresenter.java:938) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1445) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1499) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:373) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:245) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:211) at java.awt.Component.processMouseEvent(Component.java:3710) at java.awt.Component.processEvent(Component.java:3539) at java.awt.Container.processEvent(Container.java:1159) at java.awt.Component.dispatchEventImpl(Component.java:2588) at java.awt.Container.dispatchEventImpl(Container.java:1208) at java.awt.Component.dispatchEvent(Component.java:2492) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2451) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2216) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2125) at java.awt.Container.dispatchEventImpl(Container.java:1195) at java.awt.Window.dispatchEventImpl(Window.java:923) at java.awt.Component.dispatchEvent(Component.java:2492) [catch] at java.awt.EventQueue.dispatchEvent(EventQueue.java:334) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:126) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:93) at java.awt.Dialog.show(Dialog.java:375) at org.netbeans.core.NbPresenter.superShow(NbPresenter.java:690) at org.netbeans.core.NbPresenter.doShow(NbPresenter.java:733) at org.netbeans.core.NbPresenter.run(NbPresenter.java:721) at org.openide.util.Mutex$1.run(Mutex.java:952) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:142) at java.awt.EventQueue.dispatchEvent(EventQueue.java:332) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:126) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:93) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88) at java.awt.EventDispatchThread.run(EventDispatchThread.java:80)
I think that the way to reproduce the problem which I reported is the following: -Create an EJB such as SessionEJB1; -Create an EJB Module such as EJBModule1; -Add a session EJB into EJBModule1; -Add this EJBModule1 into source control; -Check In this EJBModule1; -Create another EJB SessionEJB2; -Check Out EJBModule1; -Select EJBModule1 > popup menu > Add EJB to EJB Module. From the dialog select SessionEJB2 and click OK. SessionEJB2 will be added to an EJBModule1; -Select EJBModule1 popup menu > CVS > Commit; -Exit an IDE via 'X' button. -Check if the exception is thrown in IDE console. Alex
I think mine is a much simpler way to reproduce. You can get the error when you push save, but you get the Full dialog and everything if you hit the 'x' then say 'save all.'
This is a respond to mmirilovic'd e-mail. All my tests related to EE modules only: 1. Is file (which has been modified) saved to disk? Yes it was. 2-3.Is here somebody who can reproduce it? Is it reproducible, how often you see exception? I was able to reproduce it couple times before the Nevada build 030413. I agree with your decision to try the fix in a patched IDE. Thanks, Alex
Created attachment 9975 [details] Binary patch for testing purposes. Please place in lib/patches.
I've used the attached patch and re-test with the same scenario when the original issue was submitted. This time I didn't see an 'Invalid Lock'. It looks like 'Commit' is doing the save. After 'Commit' was finished I've exited an IDE via 'X' button and I wasn't prompted to the 'Save' dialog at all. Alex
It seems like we are able to rproduce it on Nevada builds, by running our (junit) qa-functional tests. We've tried it with attached patch and it still happens, so it seems like patch doesn't work. :(
java qa-functional tests has the same problem. CC'ing myself
I see it listed as target fix for 4.0 -can it be for 3.5/nevada ? both myself and people at l10n center saw it today and yesterday- we were testing junit but don't think its related to that - thats just when the same messages and exceptions seen in descriptions below were seen by us ken.frank@sun.com
Ken, this is on the radar and needs to be fixed for 3.5. A desired fix needs to be put into the 4.0 codeline first and then, after it's tested and verified, it will be merged into release35. Target Milestone will be changed accordingly then.
Ken: Yes it is listed for 4.0, becasue we still haven't a fix, this is the only one reason for that. We must fix this issue for 3.5/Nevada, because number of reports rises, and warning message during save doesn't increase "creadit of IDE" ! junit - qa-functional tests are the only onew (or one of two) way to reproduce issue "regurarly". We will use these tests for investigating, reproducing and verifying this bug.
Investigated and here is result: Problem is suprisingly in filesystems package. Implementation of FileLock contains finalize code, which causes this issue. How ? AbstractFileObject (AFO) keeps FileLock in WeakReference. WeakRefernce is cleared before finalize is invoked. If WeakReference.get returns null in AFO, then AFO is considered as unlocked and can be locked again. Now we can have two FileLocks ("old" and "new") and both keeps reference to the same AFO. On the other hand AFO keeps only one WeakReference to the "new" FileLock. If there is invoked on "old" FileLock method finalize and its method isValid == true, then exception with message "Invalid lock ..[null]" is fired. See next attached diff for more info.
Created attachment 10120 [details] Suggested patch.
Fixed in trunk. /cvs/openide/src/org/openide/filesystems/AbstractFileObject.java,v <-- AbstractFileObject.java new revision: 1.88; previous revision: 1.87
Eventually I was able to reproduce this issue very often by running our (junit) qa-functional tests. I'm not able to reproduce this issue any more with this patch. This issue is part of release35 and is marked as P1, then target milestone changed to 3.5.
Ok.
I agree, patch verified by junit tests, thanks Radek :)
TM -> 3.5. Please keep TM = 4.0 until the fix is actually integrated into the release35 branch. Change to 3.5 after that.
Thanks Radek for finding this
approved for 3.5
Fixed in relase35. /cvs/openide/src/org/openide/filesystems/AbstractFileObject.java,v <-- AbstractFileObject.java new revision: 1.83.2.3; previous revision: 1.83.2.2
verified, tests pass, thanks to everybody