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 214000 - IllegalStateException: Property 'src.dir' was not found in 'nbproject/project.properties' (NB metadata corrupted?) diagnostics: project.properties exists: false project directory: G:\xampp\htdocs\Bug2
Summary: IllegalStateException: Property 'src.dir' was not found in 'nbproject/project...
Status: VERIFIED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.2
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Mysik
URL:
Keywords:
: 217017 217436 217654 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-06-11 16:55 UTC by Jeffrey Rubinoff
Modified: 2012-09-10 08:28 UTC (History)
11 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 188317


Attachments
stacktrace (4.56 KB, text/plain)
2012-06-11 16:55 UTC, Jeffrey Rubinoff
Details
stacktrace (4.56 KB, text/plain)
2012-06-12 11:10 UTC, Vladimir Riha
Details
screenshot (46.54 KB, image/png)
2012-06-19 10:24 UTC, Vladimir Riha
Details
stacktrace (4.48 KB, text/plain)
2012-06-21 22:08 UTC, Martin Fousek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Rubinoff 2012-06-11 16:55:10 UTC
Build: NetBeans IDE Dev (Build 201206110001)
VM: Java HotSpot(TM) Client VM, 23.0-b21, Java(TM) SE Runtime Environment, 1.7.0_04-b20
OS: Windows Vista

User Comments:
GUEST: Open Project

jeff_rubinoff: Deleting an open project from the Projects window




Stacktrace: 
java.lang.IllegalStateException: Property 'src.dir' was not found in 'nbproject/project.properties' (NB metadata corrupted?)
diagnostics:
project.properties exists: false
project directory: G:\xampp\htdocs\Bug2@49a9e703:1489e70[invalid]
project directory children: []
nbproject exists: false
source roots: []
source roots - fired changes: 2
properties (helper): {}
properties (evaluator): {java.vm.version=23.0-b21, ant.core.lib=G:\NetBeans Dev 201206110001\java\ant\lib\ant.jar, libs.ejb3-persistence.maven-pom=, libs.jpa20-persistence.src=, nbplatform.default.harness.dir=G:\NetBeans Dev 201206110001/harness, libs.junit_4.javadoc=G:\NetBeans Dev 201206110001\java\docs\junit-4.10-javadoc.jar, libs.junit.classpath=G:\NetBeans Dev 201206110001\java\modules\ext\junit-3.8.2.jar, sun.java2d.noddraw=true, libs.primefaces.javadoc=, org.openide.version=deprecated, libs.struts.classpath=G:\NetBeans Dev 201206110001\enterprise\modules\ext\struts\antlr-2.7.2.jar;G:\NetBeans Dev 201206110001\enterprise\modules\ext\struts\bsf-2
   at org.netbeans.modules.php.project.PhpProject.resolveSourcesDirectory(PhpProject.java:376)
   at org.netbeans.modules.php.project.PhpProject.getSourcesDirectory(PhpProject.java:300)
   at org.netbeans.modules.php.project.ProjectPropertiesSupport.getSourcesDirectory(ProjectPropertiesSupport.java:120)
   at org.netbeans.modules.php.project.PhpModuleImpl.getSourceDirectory(PhpModuleImpl.java:88)
   at org.netbeans.modules.php.symfony2.commands.Symfony2Script.getPath(Symfony2Script.java:81)
   at org.netbeans.modules.php.symfony2.commands.Symfony2Script.getPath(Symfony2Script.java:74)
Comment 1 Jeffrey Rubinoff 2012-06-11 16:55:18 UTC
Created attachment 120683 [details]
stacktrace
Comment 2 Tomas Mysik 2012-06-12 07:37:02 UTC
Will change the log level to INFO.
Comment 3 Tomas Mysik 2012-06-12 07:40:49 UTC
But let's wait for the next NB version, just to be sure...
Comment 4 Vladimir Riha 2012-06-12 11:10:47 UTC
Created attachment 120723 [details]
stacktrace

- Selected multiple projects and press Delete to remove them
- several dialogs (as usual) were opened asking if I want to delete source files as well
- I probably confirmed some 
=> exception
Comment 5 Tomas Mysik 2012-06-12 12:12:40 UTC
Yes, this can happen for deleting projects; however, it is:
- reported as WARNING (so in NB 7.2 FCS it won't popup any dialog [1]),
- I would like to keep this diagnostics there since it seems - based on users feedback - that there are more scenarios how to simulate this issue (unfortunately I am not able to reproduce any).

I will change the log level once NB 7.2 is out.

Thanks.
[1] can be easily verified using "netbeans -J-da"
Comment 6 Vladimir Riha 2012-06-19 10:24:05 UTC
I tried the switch, it helps with the exception dialog.

But if you select project (or more) and delete them (check to delete source files as well), a dialog "Project [ProjectName] has corrupted metadata. Repair manually..." is opened. Most of the times it is visible only for a very short time so you don't even see what it contains, but sometimes it stays open. I even managed to have 2 these dialogs for the same project... (check the screenshot)

I know it is not critical, but is very annoying to see warning about project that at the time no longer exists.
Comment 7 Vladimir Riha 2012-06-19 10:24:24 UTC
Created attachment 121040 [details]
screenshot
Comment 8 Tomas Mysik 2012-06-19 12:10:00 UTC
Project deletion should be fixed now. Please verify, thanks.

BTW this fix could be a patch candidate.

http://hg.netbeans.org/web-main/rev/7fab1c748631
Comment 9 Vladimir Riha 2012-06-19 12:28:50 UTC
Thanks a lot, I'll do it. I agree with the patch, so for now I'm adding "unofficial" SW
Comment 10 Quality Engineering 2012-06-20 04:39:04 UTC
Integrated into 'main-golden', will be available in build *201206200001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/7fab1c748631
User: Tomas Mysik <tmysik@netbeans.org>
Log: #214000 cont'd - IllegalStateException: Property 'src.dir' was not found in 'nbproject/project.properties'

Handle project deletion.
Comment 11 Vladimir Riha 2012-06-20 10:42:09 UTC
verified, thanks


Product Version: NetBeans IDE Dev (Build 20120620-75f1fa394a84)
Java: 1.7.0_06-ea; Java HotSpot(TM) Client VM 23.2-b05
System: Linux version 3.0.0-21-generic-pae running on i386; UTF-8; en_US (nb)
Comment 12 Martin Fousek 2012-06-21 22:08:08 UTC
Created attachment 121191 [details]
stacktrace

1, craeted PHP application
2, closed the application (to choose better name for it)
3, renamed the project dir in the krusader
4, renamed the project in project.xml file
-> ISE

rest from the issue summary (it was pretty huge):
diagnostics: project.properties exists: false project directory: /home/marfous/Work/www/disk-usage@72dec96d:5803eab9[invalid] project directory children: [] nbproject exists: false source roots: [] source roots - fired changes: 2 properties (helper): {} properties (evaluator): {java.vm.version=20.1-b02, ant.core.lib=/space/repos/web-main/nbbuild/netbeans/java/ant/lib/ant.jar, libs.jpa20-persistence.src=, libs.ejb3-persistence.maven-pom=, nbplatform.default.harness.dir=/space/repos/web-main/nbbuild/netbeans/harness, libs.junit_4.javadoc=/space/repos/web-main/nbbuild/netbeans/java/docs/junit-4.10-javadoc.jar, libs.jakarta_slide_ant_webdav.javadoc=, libs.junit.classpath=/space/repos/web-main/nbbuild/netbeans/java/modules/ext/junit-3.8.2.jar, sun.java2d.noddraw=true
Comment 13 Vladimir Riha 2012-08-17 10:45:52 UTC
*** Bug 217017 has been marked as a duplicate of this bug. ***
Comment 14 Tomas Mysik 2012-08-22 12:50:17 UTC
Transplanted to releases repository. Spec version increased, long description updated.

http://hg.netbeans.org/releases/rev/d867d9078f0a
http://hg.netbeans.org/releases/rev/57b2deb30f35
Comment 15 Vladimir Riha 2012-08-27 06:15:30 UTC
*** Bug 217436 has been marked as a duplicate of this bug. ***
Comment 16 Tomas Mysik 2012-08-31 04:03:04 UTC
*** Bug 217654 has been marked as a duplicate of this bug. ***
Comment 17 Quality Engineering 2012-09-01 11:07:50 UTC
Integrated into 'releases', will be available in build *201209010822* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/d867d9078f0a
User: Tomas Mysik <tmysik@netbeans.org>
Log: #214000 cont'd - IllegalStateException: Property 'src.dir' was not found in 'nbproject/project.properties'

Handle project deletion.
(transplanted from 7fab1c748631010a2ec22c643b2f691c5a9bf706)
Comment 18 Vladimir Riha 2012-09-07 08:47:26 UTC
This is still reproducible in 7.2 with patch applied (not in 100% but often).

To reproduce:
- create multiple php projects
- select them in Projects Window
- press Delete to remove them and check to delete sources as well
=> exception.

It works in latest trunk build. The log from "7.2.1" was attached to issue 213468. IDE log shows this module:

   org.netbeans.modules.php.project [2.49.2 201209061210]

which should be correct according to the changeset


Product Version: NetBeans IDE 7.2 (Build 201207171143)
Java: 1.7.0_07; Java HotSpot(TM) Client VM 23.3-b01
System: Linux version 3.2.0-29-generic-pae running on i386; UTF-8; en_US (nb)
Comment 19 Tomas Mysik 2012-09-10 08:22:54 UTC
After the discussion with Láďa, closing back as FIXED. The situation with the patch is better than without it. The proper fix will come with NB 7.3.

Thanks.
Comment 20 Vladimir Riha 2012-09-10 08:28:14 UTC
Thanks Tomasi. I'm verifying since it helps at least sometimes