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 108531 - Cannot create XSLT Module that has the same name as previously deleted from outside the IDE
Summary: Cannot create XSLT Module that has the same name as previously deleted from o...
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: XSLT (show other bugs)
Version: 6.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Vitaly Bychkov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-29 16:09 UTC by Andrei Chistiakov
Modified: 2007-10-15 17:00 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (18.19 KB, application/octet-stream)
2007-06-29 16:10 UTC, Andrei Chistiakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Chistiakov 2007-06-29 16:09:47 UTC
Reproduced in build 200706281431.

To reproduce the bug:

- create an XSLT Module;
- close it in IDE;
- remove the root module's directory from outside the IDE (do not exit the IDE itself);
- try to create an XSLT Module with the same name.

The following error displays in New Project wizard: Already a project in MasterFileObject@....

See the attached screenshot.
Comment 1 Andrei Chistiakov 2007-06-29 16:10:07 UTC
Created attachment 44576 [details]
screenshot
Comment 2 Vitaly Bychkov 2007-07-10 17:01:03 UTC
Can't reproduce with build 070710.
Comment 3 Andrei Chistiakov 2007-07-24 10:12:11 UTC
Reproducible in build 200707231200.
Comment 4 Vitaly Bychkov 2007-07-24 15:51:30 UTC
Not reproducable with daily builds,
but reproduceable on installer's builds.
Comment 5 dlipin 2007-08-02 08:43:41 UTC
I could reproduce the issue with the netbeans extracted from a zip file.
http://bits.nbextras.org/download/6.0/nightly/200708011200/zip/moduleclusters/netbeans-trunk-nightly-200708011200-all-
in-one.zip

So the issue is not the installer`s one...
I`ve tried to disable all unnecessary clusters and left only the following:
platform7
nb6.0
ide8
java1
xml1
apisupport1
enterprise4
soa1
harness
extra


Unfortunately the issue reproduced in this set of clusters as well...

As Kirill suggested, to find out the reason of the issue you can, at first, make a diff of 'daily build' (whatever I 
mean by saying that) and all-in-one zip file.
Comment 6 Vitaly Bychkov 2007-08-17 10:09:42 UTC
Fixed in trunk:


/cvs/enterprise/xslt/project/src/org/netbeans/modules/xslt/project/XsltproProjectGenerator.java,v  <-- 
XsltproProjectGenerator.java
new revision: 1.12; previous revision: 1.11
/cvs/enterprise/xslt/project/src/org/netbeans/modules/xslt/project/XsltproProject.java,v  <--  XsltproProject.java
new revision: 1.14; previous revision: 1.13
Comment 7 Andrei Chistiakov 2007-08-21 14:17:58 UTC
Reproduced in build 200708200000.
Comment 8 Vitaly Bychkov 2007-09-02 12:54:12 UTC
Fixed in trunk:

/cvs/enterprise/xslt/project/src/org/netbeans/modules/xslt/project/XsltproProjectGenerator.java,v  <-- 
XsltproProjectGenerator.java
new revision: 1.14; previous revision: 1.13

But there is still another problem - close action activated on project directory presents "Close 2 projects", 
i.e. there is still problem with projects cache(may be not ProjectManager#dir2Proj).


Could reproduce for bpel, sql, , compapp, uml projects...
It looks like some times the cache ProjectManager#dir2Proj doesn't updated.

For more information see 81039, 57301, 57270, 42422.

jglick I saw that you had actively partcipated in discussion of these issues could you provide the final design(solution).
Now a lot of projects (except j2se, web, and some others) still have this problem. 
What is the best to keep ProjectManager#dir2Proj in actual stage ? (IMO  manual filesystem refresh isn't good solution
and doesn't work well :()



Comment 9 Jesse Glick 2007-09-02 17:56:01 UTC
If you see a general problem with project infrastructure please file a clean issue with steps to reproduce in the
projects component.
Comment 10 Milos Kleint 2007-09-02 18:12:28 UTC
possibly a duplicate of already filed issue. The project infrastructure weakly references the known projects. 
When you get back to the IDE from other applications, the IDE will try to refresh the status of all FileObjects it
knows. Any deleted folders/files  eventually fire deletion events, however that can be take more time in general than it
takes the user to try creating new project.

You are encouraged to do project delete within the IDE.

in general I'm somewhat skeptical toward this class of issues. How often does it happen in real-life user scenario that
a user decides to delete a project? And create a new one at the same place right away? It looks like a QA-only issue to me.
Comment 11 Vitaly Bychkov 2007-09-02 20:57:51 UTC
Fixed in trunk,
enterprise/xslt/project/src/org/netbeans/modules/xslt/project/XsltproProjectGenerator.java  1.14.

It looks like the problem is in ProjectManager#proj2dir cache update,
it's common problem and could be reproduced with number of other projects: (sql, compapp, bpel, uml ) and it's related
to the
issues (81039, 57301, 57270, 42422).

To reproduce the issue one should create new project(any of the mentioned types)
then close it and quickly (depends on system) delete this project from file system, and try to create new one with the
same name.

More over even after manual FS.refresh there is still problem with cache update:
create xslt project
close it
then "quickly" 
delete it from fs
create new xslt project with the same name
invoke popup menu on the project (there is "close 2 projects" point instead close project)







Comment 12 Vitaly Bychkov 2007-09-02 21:34:55 UTC
Sorry, the last comment - wrong , I didn't see  mkleint, jglick and my comments :(

jglick, mkleint - I'll look for duplicate issue (now I saw just one and it's marked as fixed - 42422)

mkleint - I'm agree this scenario doesn't looks like from real life but the problem with cache update appears in other
scenario (111892 - Renaming of a BPEL module works incorrectly). It's more real life scenario :)
So currently number of projects have several similar issues and all these issues are from one place (cache update).
Comment 13 Milos Kleint 2007-09-03 08:09:06 UTC
lativ: I don't think #111892 is related. the issue explicitly states that the reporter didn't rename the folder. So it's
hardly an projectManager cache issue as the project folder stays the same. AFAIK all that is to be done in such case is
to return a different value from ProjectInformation.getDisplayName() and somehow persist this change (eg. in project.xml
for ant projects)
Comment 14 Vitaly Bychkov 2007-09-07 21:57:18 UTC
Fixed in trunk for bpel module:

/cvs/enterprise/bpel/project/src/org/netbeans/modules/bpel/project/BpelproProjectGenerator.java,v  <--  
BpelproProjectGenerator.java
new revision: 1.15; previous revision: 1.14
Comment 15 Vitaly Bychkov 2007-10-11 11:25:31 UTC
the issue 111892 was fixed
The "close 2 projects" problem not reproduced on (Build 20071011035158).
Comment 16 Andrei Chistiakov 2007-10-15 17:00:49 UTC
Verified in build 200710150000.