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 49503 - After checking out a project from CVS, not recognized as a project folder until restart
Summary: After checking out a project from CVS, not recognized as a project folder unt...
Alias: None
Product: projects
Classification: Unclassified
Component: Generic Infrastructure (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: David Konecny
: 46099 (view as bug list)
Depends on:
Blocks: 41535
  Show dependency tree
Reported: 2004-09-23 23:30 UTC by dmartin01
Modified: 2006-03-24 10:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:

jar binary patch (29.28 KB, application/octet-stream)
2004-09-27 13:32 UTC, David Konecny

Note You need to log in before you can comment on or make changes to this bug.
Description dmartin01 2004-09-23 23:30:59 UTC
If you have a project (build.xml and nbproject 
folder included) in a CVS repository and check 
this project out clean from the built-in 
Versioning Explorer, then attempt to "Open 
Project" Netbeans doesn't identify the folder as 
a project.  However, if you exit Netbeans, then 
start Netbeans, it is now recognized as a 
Comment 1 Jesse Glick 2004-09-24 18:07:48 UTC
Just tried in a dev build and it worked fine.

0. JDK 1.5, 040923 custom.

1. Using Vers Mgr, made new folder /tmp/bundlizer, and checked out
contrib/bundlizer from into it.

2. In Versioning tab, can browse to it, and when selecting the
contrib/bundlizer subdir, main window title changes to Bundlizer.

3. Open Project dialog lets me open it.

Reopen with precise steps to reproduce from scratch in a current dev
build if you have them.
Comment 2 dmartin01 2004-09-24 21:48:04 UTC
I just downloaded the latest daily.  Same problem.

Okay, here's how. 
0) Set up a project like this:

Where build.xml is in the MyProject\ folder, and nbproject was built 
by Netbeans.

2) Check this entire folder into CVS, including all Netbeans project 

3) Close the project from within Netbeans.

4) Close Netbeans.

5) Delete the MyProject folder

6) Open Netbeans.

7) Using the Netbeans Versioning Manager, check out the MyProject\ 
folder recursively.

8) Choose "Open Project" and find the My Project folder.

At this point, for me, "My Project" does not show the Project icon.  
Highlighting it and hitting the Open Project folder just navigates 
inside the folder.  If I exit Netbeans, then run Netbeans, then 
choose Open Project, the folder NOW shows the proper icon and can be 
mounted as expected.

Jesse, the only difference is that I'm on Windows XP and you are 
apparently on a *nix.  Like you appear to be, I'm using the Java 1.5 
release candidate.  I will try this at home on Linux if I can find 
the time this weekend.
Comment 3 Jesse Glick 2004-09-24 23:36:58 UTC
Your instructions don't really sound different from what I did, except
you shut down in the middle (at least I presume that's what
"Close/Open NB" means), which should not matter since the effect after
opening it is to make the dir from within the IDE and then try to open
a project from it.

Will see if Milan can reproduce it too, and if so, whether only on
Windows or on Linux as well. Probably need more explicit instructions;
there are too many details left unsaid in the current instructions,
which might matter, e.g. exactly how the checkout is done and so on;
specifically, whether the directories in question are browsed in any
way before the Open Project dialog appears.
Comment 4 dmartin01 2004-09-25 00:08:00 UTC
Yes, in my steps, Close Netbeans is the same as exiting Netbeans, 
and Open Netbeans is the same as running Netbeans.

Checkout is being done with the internal CVS client, not command 
line, through the pserver protocol.

I am not doing anything between steps 7 and 8, so I am not browsing 
the folders in any way.  I hope that's what you mean.

However, I beleive there is a big difference between what I did and 
what you did.  The whole point here is to replicate what happens 
when I call a team member on the phone and say "Check out this 
project from within Netbeans that you've never had on your hard 
drive before."  If you change the scenario as you did to not involve 
exiting Netbeans, there is a chance that Netbeans already knew there 
was a project folder at this location.  In my scenario, Netbeans 
doesn't.  And when it later becomes a project folder, Netbeans isn't 
recognizing the new folder as a Project after it "becomes" one via 
the CVS checkout.

Also, you might do me a favor and check if your Classpath settings 
in the project's "Properties" dialog are still there after the check 
out.  In my scenario, they aren't - all the classpath settings are 
empty (even though they are listed in build-impl.xml!!!).  If you 
can replicate, I'll open another bug for that.
Comment 5 Jesse Glick 2004-09-25 00:38:29 UTC
I did use external CVS checkout, not internal. Doubt it would matter

"If you change the scenario as you did to not involve exiting
Netbeans, there is a chance that Netbeans already knew there was a
project folder at this location." - not sure what you mean by that. In
my case I created a fresh directory on disk to hold the new checkout.

Re. classpath - sorry, don't know; the project I checked out has no CP
entries anyway. At any rate, not recognizing the project folder sounds
like a more fundamental problem that should be reproduced first.
Comment 6 Jesse Glick 2004-09-25 00:39:53 UTC
BTW setting up a CVS server and content is a pain for purposes of
creating a reproducible test case. Start simple and see if it happens
to you just from unzipping a ZIP file of project sources somewhere
onto disk and then using A-S-O.
Comment 7 Pavel Buzek 2004-09-25 01:06:21 UTC
I noticed this discussion just after I closed 46099 reporting the same
problem for an older build, VSS and web project. I could not reproduce
it either.
Comment 8 Pavel Buzek 2004-09-25 01:08:22 UTC
...oh, and the test with VSS included shut down of IDE too
Comment 9 David Konecny 2004-09-27 09:53:24 UTC
I think I'm able to reproduce it. 
Comment 10 David Konecny 2004-09-27 13:30:23 UTC
*** Issue 46099 has been marked as a duplicate of this issue. ***
Comment 11 David Konecny 2004-09-27 13:32:15 UTC
Created attachment 17884 [details]
jar binary patch
Comment 12 David Konecny 2004-09-27 13:37:30 UTC
I was able to reproduce it once or twice but now it always work. I
attached jar file which is binary patch and I would like to ask you to
try whether it fixed the problem or not. 

Download the patch as

Starting IDE with patch should dump in console something like 

Module patch or custom extension:

After that try to reproduce the problem. Thank you!
Comment 13 David Konecny 2004-09-27 13:40:47 UTC
Jesse, FYI, ProjectManager.getDefault().clearNonProjectCache() is not
called from OpenProject.actionPerformed. I fixed them by moving your
fix of issue 41882 from
ProjectChooserFactoryImpl.createProjectChooser() directly to
Comment 14 Jesse Glick 2004-09-27 16:40:57 UTC
Ah good, I forgot that calls within the projects/projectui module
might use a back door...

So this bug is probably reproducible only if you do not get a GC
between deleting the old project and calling File -> Open, or
something like that.
Comment 15 David Konecny 2004-09-28 16:35:35 UTC
Hopefully I fixed the cause.

Fixed in:
new revision: 1.25; previous revision: 1.24
new revision: 1.9; previous revision: 1.8
Comment 16 Marian Mirilovic 2005-12-20 15:49:42 UTC
This issue was solved long time ago. Because nobody has reopened it neither
added comments, we are verifying/closing it now. 
If you are still able to reproduce the problem, please reopen. Thanks in advance.