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 20050330] How to reproduce: 1) create new EJB project with existing ant build script 2) close project 4) delete the project directory from disk 5) use same sources and build script to creation new project 6) in panel Java Sources Classpath click Add JAR and select libraries 7) click OK ERROR: java.lang.IllegalArgumentException: Already a project in MasterFileObject@10cc4c1[file:/home.local/blaha/testing/cmp2/]
Created attachment 21281 [details] stack trace
Very likely caused by issue #57270.
There are two cases: 1) project folder != project location (i.e., the directory containing "nbproject" is different that the directory containing the sources). This case has been fixed by the fix of issue #57270. 2) project folder == project location. In this case the user only deletes the "nbproject" directory, but not the project directory. ProjectManager isn't notified about the deletion of nbproject (of course, as it only listens on the project directory). This causes ProjectManager.findProject() to return a non-null value and a "Project folder is another owner by NetBeans Project <project>" to be displayed in the wizard. Reassigning to ant/freeform for evaluation.
No support yet for project deletion - real support will require a new API and is not trivial. Current workaround is to close the project, delete it on disk, then - make sure no one else is referring to the project (no open files, etc.) - wait 15 seconds - garbage collect then continue. *** This issue has been marked as a duplicate of 42422 ***