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 59054 - NPE thrown when runnig project opened during class path scan
Summary: NPE thrown when runnig project opened during class path scan
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
: 59201 59367 60015 60439 (view as bug list)
Depends on:
Blocks: 59972
  Show dependency tree
 
Reported: 2005-05-19 10:54 UTC by Jiri Prox
Modified: 2005-09-15 21:14 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NPE (599 bytes, text/plain)
2005-05-19 10:55 UTC, Jiri Prox
Details
Exception_II (2.42 KB, text/plain)
2005-06-20 16:28 UTC, Marek Grummich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Prox 2005-05-19 10:54:57 UTC
NB 4.2 (2005051800)
JDK 1.5.0_03

NPE is thrown when runnig project while class path scanning

steps to reproduce:
1) start ide with new used dir
2) open/create project
=> the scan is started
3) before it finish open/create new project
4) run this project (the scann must still run)

=> NPE is thrown
Running it after scan ends works.

Somehow I managed to make it throws exception after scan's end but i can't
reproduce it now.
Comment 1 Jiri Prox 2005-05-19 10:55:24 UTC
Created attachment 22193 [details]
NPE
Comment 2 Tomas Zezula 2005-05-19 11:12:58 UTC
ClassIndex.getIndex (mofPackage) returns null.
What should I do when this happen?
Comment 3 Tomas Zezula 2005-05-25 08:01:22 UTC
*** Issue 59201 has been marked as a duplicate of this issue. ***
Comment 4 Tomas Zezula 2005-05-25 08:08:18 UTC
Increasing priority since the duplicate is a P2.
Comment 5 Tomas Zezula 2005-05-30 09:45:57 UTC
*** Issue 59367 has been marked as a duplicate of this issue. ***
Comment 6 Jan Becicka 2005-06-03 17:20:09 UTC
I don't understand why this issue is P2. Anyway, Tomasi, please add
JMManager.waitScanFinished() before starting your transaction. It should help.
Comment 7 Jesse Glick 2005-06-15 15:35:35 UTC
I have this bug happen repeatedly. It is quite common now that background
scanning is on. I agree with a P2 designation. BTW aren't there duplicates of
this floating around IZ?
Comment 8 Lukas Hasik 2005-06-17 09:29:20 UTC
Guys, please note that this issue is <a
href="http://qa.netbeans.org/q-builds/Q-build-report-200506142000.html">Q-build</a>
stopper. Please fix ASAP and commit also to QBE200506142000 branch, don't forget
that it's your responsibility to check if the fix is good enought and safe. 
Comment 9 Tomas Zezula 2005-06-17 13:35:26 UTC
OK, I will try to use the JMManager.waitScanFinished(). It is strange that the
user cannot run project before the scanning finished but there is probably no
nicer solution and nearly nothing works in this state.
Comment 10 Tomas Zezula 2005-06-20 15:29:23 UTC
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectUtil.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectUtil.java,v
 <--  J2SEProjectUtil.java
new revision: 1.15; previous revision: 1.14
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.77; previous revision: 1.76
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/MainClassChooser.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/MainClassChooser.java,v
 <--  MainClassChooser.java
new revision: 1.28; previous revision: 1.27
done
Comment 11 Marek Grummich 2005-06-20 16:28:24 UTC
Tomasi, I have to reopen this bug. I applied your patch to build from qbuild
branch and .. an attached exception is thrown for same test case
Comment 12 Marek Grummich 2005-06-20 16:28:55 UTC
Created attachment 22806 [details]
Exception_II
Comment 13 Tomas Zezula 2005-06-20 19:13:34 UTC
Checking in j2seproject/src/org/netbeans/modules/java/j2seproject/Bundle.properties;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.21; previous revision: 1.20
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEActionProvider.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEActionProvider.java,v
 <--  J2SEActionProvider.java
new revision: 1.43; previous revision: 1.42
done
Comment 14 Marek Grummich 2005-06-21 09:19:26 UTC
I verified this issue in the continuous build 20050621-0235. The new "Run
project" informational dialog (Please wait, classpath scaning still in progress
- Cancel Run Project) is displayed. The dialog is automatically closed when
classpath scaning is finished. 
Comment 15 Tomas Zezula 2005-06-21 10:00:37 UTC
Integrated into QBE200506142000 branch

Checking in j2seproject/src/org/netbeans/modules/java/j2seproject/Bundle.properties;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.20.20.1; previous revision: 1.20
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEActionProvider.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEActionProvider.java,v
 <--  J2SEActionProvider.java
new revision: 1.42.6.1; previous revision: 1.42
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectUtil.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/J2SEProjectUtil.java,v
 <--  J2SEProjectUtil.java
new revision: 1.14.2.1; previous revision: 1.14
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties,v
 <--  Bundle.properties
new revision: 1.76.6.1; previous revision: 1.76
done
Checking in
j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/MainClassChooser.java;
/cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/MainClassChooser.java,v
 <--  MainClassChooser.java
new revision: 1.27.20.1; previous revision: 1.27
done
Comment 16 Tomas Zezula 2005-06-24 07:43:34 UTC
*** Issue 60439 has been marked as a duplicate of this issue. ***
Comment 17 Tomas Zezula 2005-09-15 21:14:54 UTC
*** Issue 60015 has been marked as a duplicate of this issue. ***