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.
Build: http://caps-dist/gfesb/nightly/20080921-1003 After a BPEL project that was deleted (with ‘Delete Source’ option) and recreated (creating a new project with the same name as the one that has been just deleted), user is unable to open project’s Properties (disabled). To recreate: 1)Create a new BPEL project (call it testBPEL1). 2)Once project is created, delete this project (with the ‘Also Delete Sources ..’ option). 3)Notice that the project is deleted and the physical folder of the project is also deleted. 4)Recreate a new BPEL project with the same name (testBPEL1). Notice that all options are disable except the ‘New’ and ‘Find’. User is unable to edit project’s Properties with this problem. (see attached file for details)
Created attachment 70522 [details] Problem description file
BTW, the work around is to shutdown netbeans IDE and restart it again.
Nikita, please look at this.
I made very deep investigation of the problem. There are a few reasons why it works wrong. I believe I found not all of them. And those I found almost all are located outside of code I can change now. So I suppose there is some possible fix which can be made in our code (BPEL, SOA, ...), bit unfortunately I haven't found it. 1. Comparison to NetBeans 6.5 At first it turned out that the problem doesn't appear in the NetBeans 6.5 But eventually I have decided that the NetBeans 6.5 also have the same problems. I didn't manage to understand what is the difference between 6.5 and 6.1 regarding this issue. It works some magic way. :-) 2. Changes to BpelDataObject I tried comparing some files between 6.5 and 6.1 branches and found that the method BpelDataObject.getLookup() has some simplifications in the 6.5 version. The method contain lookup initialization for BPEL editor. It seems in the old version it has some redundant items. But removing of them didn't resolve the problem. 3. Problems in the org.netbeans.modules.project.ui.actions.ActionsUtil It has the method getProjectsFromLookup(). Just this method is the first reason of the issue. I think it has a workaround. It tries looking up the Project classes in the lookup first. Then it tries looking up DataObject classes and extract the Project from them. Obviously some of these ways is redundant. It doesn't lead to any problem in most cases because the both methods return the same Project. But in our case the method return 2 projects. Actually it is the same project but 2 different Java objects. So the Projects' view pop-up menu looks like 2 projects are selected. Also it is easy to note because of the menu item "Close 2 Projects". 2 different projects are added to a HashSet. They are not recognized as the same because of the Project doesn't have the equals() and hashCode() methods. So they are considered as different Projects. I suppose adding these methods could help. As the smallest workaround such methods can be redefined in the BpelproProject class only. 4. ProjectManager - feature or bag? The ProjectManager is caching opened projects. Also it should prevent creating project duplicates. But actually it doesn't prevent. It holds the projects in the HashMap with FileObject as a key. The FileObject doesn't redefine the equals() and hashCode() functions. So two different instances of FileObject referencing to the same project folder, comes to creation of 2 different Project instances. It is the actual reason why the ActionsUtil get 2 Projects. Changes to FileObject and BaseFileObj can help resolve this problem.
I tried add equals() and hashCode() functions to BpelproProject but it didn't help. Another exception appears instead: org.netbeans.spi.project.support.ant.GeneratedFilesHelper.getBuildScriptState() : line 559. IllegalStateException("Cannot generate build script from a modified project"); It appears while creating a new project after deleting once with the same name. So the result is the issue depends on #150066
Candidate for RNs. Since it depends on NB core issue marked as WONTFIX. Nikita is there any workaround ?
the most likely cause of the issue in bpel project is similar to what was happening in swing app projhect template in issue http://www.netbeans.org/issues/show_bug.cgi?id=129405. http://hg.netbeans.org/main/rev/e150f0d43ac6 or your delete project implementation is not calling back to the ProjectManager via ProjectState..
I tried applying similar changes like in the recommended issue #129405, but it didn't help. Also I have found that there is absolutely same problem with XSLT project. No wonder because it was cloned from BPEL project. I tried another kinds of projects, but they work well. I think we need stop spending time on this issue for a while because of it very difficult to fix and the problem is not so painful. Anyway, user can restart NetBeans to recover. The issue is difficult because it require good understanding of different parts of source code. I spent about 3 days already and it can take 3 days more to find the real reason.
I'm wonder why this problem appears again. The similar issue was filled and fixed about year ago: http://www.netbeans.org/issues/show_bug.cgi?id=108531 Perhaps the ProjectManager had been change. I'll look at it. Early it was reproducable also with some other projects: sql, uml, compapp...
Decreasing priotrity to P3. Bug is not reproducible in NB 6.5. So most probably will not fix it.
*** Issue 150431 has been marked as a duplicate of this issue. ***
Is not reproducible in GF ESB v2.2