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 160262 - Opening of projects that cannot be opened is not handled correctly
Summary: Opening of projects that cannot be opened is not handled correctly
Alias: None
Product: ide
Classification: Unclassified
Component: Features On Demand (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Jaroslav Tulach
Depends on: 160265
  Show dependency tree
Reported: 2009-03-13 15:20 UTC by Vladimir Voskresensky
Modified: 2009-06-21 13:43 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 147433

stacktrace (1.85 KB, text/plain)
2009-03-13 15:20 UTC, Vladimir Voskresensky
stacktrace (4.09 KB, text/plain)
2009-03-31 15:15 UTC, Petr Dvorak

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2009-03-13 15:20:33 UTC
Build: NetBeans IDE Dev (Build 090313)
VM: Java HotSpot(TM) Server VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: SunOS, 5.10, x86

User Comments:
GUEST: Closing projects.

vv159170: hovered mouse over some folders in Favorites window

        at org.netbeans.modules.project.ant.AntBasedGenericType.createProject(
        at org.netbeans.modules.project.ant.AntBasedProjectFactorySingleton.loadProject(
        at org.netbeans.api.project.ProjectManager.createProject(
        at org.netbeans.api.project.ProjectManager.access$300(
        at org.netbeans.api.project.ProjectManager$
        at org.netbeans.api.project.ProjectManager$
Comment 1 Vladimir Voskresensky 2009-03-13 15:20:45 UTC
Created attachment 78147 [details]
Comment 2 Jesse Glick 2009-03-13 15:53:18 UTC
As the message says - you cannot check out just the cnd module, you need to have the build infrastructure and
required modules in the same tree. Probably INVALID. See however
Comment 3 Jesse Glick 2009-03-13 15:56:45 UTC
...though the IOException should very likely link to that wiki page using Exceptions.attachLocalizedMessage.
Comment 4 Vladimir Voskresensky 2009-03-13 15:59:20 UTC
In my development IDE I opened Favorites window and just browsed my home folder, I didn't try to do anything VCS
related. I think it is bad to have such noise message with popup dialog when user browsing folders
Comment 5 Jesse Glick 2009-03-13 16:18:33 UTC
Nothing to do with VCS. You apparently have the cnd module project in a tree structure without the rest of the main
repo. Selecting a node from a project tries to load the project. In this case the project was unloadable because an
orphaned module cannot be loaded (without special steps as given in the wiki).

Regarding the dialog popping up unprompted, there is also apparently a real bug which I have filed as issue #160265.
Comment 6 Petr Dvorak 2009-03-31 15:15:12 UTC
Build: NetBeans IDE Dev (Build 200903291205)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Linux, 2.6.27-14-generic, i386

User Comments: 
I opened a "csl.api" module in M3 build.

Stacktrace: module requires at least nbbuild: /home/tester/nbsrc/main/dlight
        at org.netbeans.modules.apisupport.project.NbModuleProject.<init>(
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
        at java.lang.reflect.Constructor.newInstance(
        at org.netbeans.modules.project.ant.AntBasedGenericType.createProject(
Comment 7 Petr Dvorak 2009-03-31 15:15:23 UTC
Created attachment 79147 [details]
Comment 8 Petr Dvorak 2009-03-31 15:30:49 UTC
This is likely an ergonomics issue, to reproduce:

1. Have a clone of the "main" netbeans repository
2. Delete the nbbuild folder (or just move it elsewhere)
3. Start ergonomic IDE with a fresh userdir
4. Invoke the "Open Project" dialog and navigate to the "main" folder
-> you can see the netbeans module projects (feature is not yet active)

5. Select some project and open it
-> IOE + Projects view contains the nodes you would see in the Files view (not the node you see for the project, just
the file structure)
Comment 9 Jaroslav Tulach 2009-03-31 16:14:27 UTC
First of all: If you delete nbbuild, then it is first and foremost your bug. You created an error condition, the 
system does report an error, so what? Making P5.

Second: 2/3 of the submitted problems are not related to ergonomics. Should you pay more attention to the actual 
failures and not your silly reproducible cases, you would not even try to reassign to ergonomics. Passing back to 
apisupport. Let it be fixed or won'tfixed there.
Comment 10 Petr Dvorak 2009-03-31 17:27:34 UTC

- I didn't consciously delete nbbuild folder -> this is not a silly test case I just invented and I am happy of. I did
it after I normally worked with the IDE. I was developing unit tests for modules with no problem and then I was unable
to open one module due to this error.

- Yes, it is indeed an issue of ergonomics, please spend 2 minutes reproducing the issue on build with/without ergonomic
cluster. IDE without ergonomic cluster does not even allow you to open the module (it shows a message in the dialog). On
the other hand, IDE with ergonomic shows there is a Netbeans project. Than you can try to open it and then you have got
the exception (the second one of those 2 exceptions that are reported on this page = 1/2 of the problems reported here).

- System does not "report error", it produces an uncaught exception. If I deleted some files related to Netbeans IDE
itself (config, clusters, ...), I would understand your opinion about this not being a bug but I deleted files related
to a Netbeans project.

- Priority is indeed up to you - as no-one except NB developers and someone who want to build on NB Platform needs to
care about sources, this issue can remain P5...
Comment 11 Jesse Glick 2009-03-31 17:54:54 UTC
Not an apisupport issue. The project is corrupt (cannot realistically load anything without nbbuild) and
apisupport.project throws IOException as it is permitted to do. Issue #160265 requested that this be rethrown as an IOE,
not an IAE, which was fixed a couple weeks ago. If an exception dialog is still being shown, that would be an ergonomics

                try {
                    ... ProjectManager.getDefault().findProject(getProjectDirectory());
                } catch (Exception ex) {

This should be catching IOException and either ignoring it (logging at low level), or displaying a polite error dialog
explaining that the project turned out to be unloadable.
Comment 12 Jaroslav Tulach 2009-04-01 11:31:22 UTC
OK. I'll present the problem as polite error report.
Comment 13 Jaroslav Tulach 2009-04-07 08:21:25 UTC
Simply showing a dialog instead of Exceptions.pst is not a solution. I got fourteen of such dialogs at once when I 
tried it yesterday with removed nbbuild. I guess I will let the project open somehow mark it as broken in the projects 
Comment 14 Jaroslav Tulach 2009-04-10 14:13:48 UTC
The behaviour is even "better" if you try to run on --jdkhome jre and open a Java project. This needs to be fixed.
Comment 15 Jaroslav Tulach 2009-04-14 12:25:15 UTC
Comment 16 Quality Engineering 2009-04-15 07:48:00 UTC
Integrated into 'main-golden', will be available in build *200904150201* on (upload may still be in progress)
User: Jaroslav Tulach <>
Log: #160262: Last part of the fix. Making sure the IOException from ProjectFactory produces broken project as well