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.
Reported by Erik Huddleston <ehuddleston@ecustomers.com>: I was setting up my project under build 1067. When I was getting close to finished, I realized that I had forgotten to create a new project and was making all my customizations to Default. I chose new project and told it to keep the old configuration. It blew up with the exception below. The only changes I had made was the addition of a few CVS filesystems, mounted a few jars, and changed the toolbars around (made a Toolbar configuration called GUI and removed all the gui stuff from standard). The new project gets created, but attempting to open it also gives the error below. Sun Aug 06 15:04:39 CDT 2000java.lang.reflect.UndeclaredThrowableException: null java.lang.reflect.UndeclaredThrowableException: java.lang.reflect.InvocationTargetException: java.lang.NullPointerException at org.netbeans.core.RootFolderNode.initDisplayName (RootFolderNode.java:91) at org.netbeans.core.RootFolderNode.init(RootFolderNode.java:79) at org.netbeans.core.RootFolderNode.<init>(RootFolderNode.java:56) at org.netbeans.core.DataSystem$DSMap.createNodes(DataSystem.java:217) at org.openide.nodes.Children$Keys$KE.nodes(Children.java:1663) at org.openide.nodes.ChildrenArray.nodesFor(ChildrenArray.java:125) at org.openide.nodes.Children$Info.nodes(Children.java:865) at org.openide.nodes.Children.updateAdd(Children.java:673) at org.openide.nodes.Children.setEntries(Children.java:465) at org.openide.nodes.Children$19.run(Children.java:1563) at org.openide.util.Mutex.postRequest(Mutex.java:787) at org.openide.util.Mutex.postWriteRequest(Mutex.java:330) at org.openide.nodes.Children$Keys.setKeys(Children.java:1560) at org.netbeans.core.DataSystem$DSMap.refresh(DataSystem.java:233) at org.netbeans.core.DataSystem.refresh(DataSystem.java:174) at org.netbeans.core.DataSystem.refresh(DataSystem.java:167) at org.netbeans.core.DataSystem.fileSystemAdded(DataSystem.java:150) at java.lang.reflect.Method.invoke(Native Method) at org.openide.util.WeakListener13$ProxyListener.invoke (WeakListener13.java:121) at $Proxy1.fileSystemAdded(Unknown Source) at org.openide.filesystems.Repository.fireFileSystem (Repository.java:428) at org.openide.filesystems.Repository.addFileSystem (Repository.java:162) at org.openidex.projects.ProjectSupport.updateRepository (ProjectSupport.java:388) at org.openidex.projects.ProjectSupport.projectOpen (ProjectSupport.java:224) at org.netbeans.modules.projects.PSupport.projectOpen (PSupport.java:133) at org.netbeans.core.NbProjectOperation.setProject (NbProjectOperation.java:146) at org.netbeans.core.NbTopManager.openProject(NbTopManager.java:302) at org.netbeans.modules.projects.PSupport$1.run(PSupport.java:384) at org.openide.util.Task.run(Task.java:124) at org.openide.util.RequestProcessor$ProcessorThread.run (RequestProcessor.java:562) org.openide.util.RequestProcessor$Holder(task org.netbeans.modules.projects.PSupport$1@6c6243 [-25217, 1]) at org.openide.util.RequestProcessor$Task.createHolder (RequestProcessor.java:275) at org.openide.util.RequestProcessor.post(RequestProcessor.java:99) at org.openide.util.RequestProcessor.post(RequestProcessor.java:72) at org.openide.util.RequestProcessor.postRequest (RequestProcessor.java:158) at org.netbeans.modules.projects.PSupport.openNew(PSupport.java:347) at org.netbeans.modules.projects.NewProjectAction.performAction (NewProjectAction.java:88) at org.openide.util.actions.CallableSystemAction.actionPerformed (CallableSystemAction.java:66) at javax.swing.AbstractButton.fireActionPerformed (AbstractButton.java:1450) at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed (AbstractButton.java:1504) at javax.swing.DefaultButtonModel.fireActionPerformed (DefaultButtonModel.java:378) at javax.swing.DefaultButtonModel.setPressed (DefaultButtonModel.java:250) at javax.swing.AbstractButton.doClick(AbstractButton.java:279) at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseReleased (BasicMenuItemUI.java:886) at java.awt.Component.processMouseEvent(Component.java:3717) at java.awt.Component.processEvent(Component.java:3546) at java.awt.Container.processEvent(Container.java:1164) at java.awt.Component.dispatchEventImpl(Component.java:2595) at java.awt.Container.dispatchEventImpl(Container.java:1213) at java.awt.Component.dispatchEvent(Component.java:2499) 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:1200) at java.awt.Window.dispatchEventImpl(Window.java:912) at java.awt.Component.dispatchEvent(Component.java:2499) at java.awt.EventQueue.dispatchEvent(EventQueue.java:319) at java.awt.EventDispatchThread.pumpOneEvent (EventDispatchThread.java:103) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) at java.awt.EventDispatchThread.run(EventDispatchThread.java:84)
Project module only reads serialized filesystem and calls Repository.addFileSystem, so the bug is cause either by a filesystem or core. It may be reproduced by the following: 1) mount a jar file system 2) save the project 3) delete the jar 4) reopen the project
Fixed RootFolderNode in the trunk to at least not throw this NPE. (The code involved was only setting a tool tip, so it is now more careful.) Looks like the project is adding a JarFileSystem to the repository, whether .getJarFile is null. Acc. to Martin's steps to reproduce, probably nothing else was broken; if the physical .jar file was deleted, then presumably it was correct that jarFile was returning null. So the core simply should not have been assuming otherwise. If anyone wants to try to reproduce with this fix in place (RootFolderNode.java 1.25) this could be verified fixed and possibly applied in boston branch.
Well, there seems to be rather a different bug, probably more relevant: using a development build, I made a JAR file, mounted it (default project), then select Project | Open, selected Default, accepted to save current project, and after it had (re-)loaded Default, the JAR file was marked Invalid JAR. (But it had the correct contents.) I think there is something wrong with JarFileSystem's add/remove logic. Restarting the IDE and reloading the project had various effects, sometimes the JAR was valid and sometimes not. Needs further investigation.
I saw that you have fixed the problem. Thanx. Please apply the fix to boston branch too.
OK, I have fixed the NPE itself in both trunk and boston branches. However I still believe there is a JarFileSystem bug; I know there has been some changes in this class relating to removeNotify and the handling of unmounting and invalid JARs, and my guess is that when the project switches, the JAR is closed and reopened and sometimes this causes it to become invalid when it should not.
If jesse claims it is fixed, then why not mark it fixed.
See previous comments: the actual NPE is fixed, but I think I found a problem with having JARs in the project when the project is switched, which has probably not been fixed. Someone should try to reproduce the things I listed. See last comment for 8/7.
[Main Trunk - 19] This bug exists again. It is possible to reproduce for two jar filesystems: 1. Mount jar1. 2. Mount jar2. 3. Save project and close project. 4. Rename jar1. 5. Open saved project. Both jar filesystem have invalid name and it is possible exprlore theirs nodes. If is renamed jar2, project is opened succefully without problem. Jar1 is mounted and it is showed warning message that jar1 is invalid. Jar1 is not mounted in repository.
Lowering the priority because the original bug was fixed and when Petr Zajac added new problem, he forgot the change the priority.
#7854 is probably related?
*** Bug 7234 has been marked as a duplicate of this bug. ***
Is not this related to the JarFS.removeNotify?
Fixed in main trunk and release31.
verified in [orion](rc5)
Resolved for 3.4.x or earlier, no new info since then -> closing.