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 149306 - [67cat] AssertionError: File: C:\projects\hits-frontend-4.0\GUI\source Path Type: classpath/boot Owner: ClassPathProviders: org.netbeans.modules.java.project.ProjectClassPathProvider@2d6dd0 org.netbeans
Summary: [67cat] AssertionError: File: C:\projects\hits-frontend-4.0\GUI\source Path T...
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P1 blocker (vote)
Assignee: Tomas Zezula
URL: http://statistics.netbeans.org/except...
Keywords:
: 151883 153084 176380 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-10-07 02:39 UTC by wobster
Modified: 2010-02-08 21:40 UTC (History)
22 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 105870


Attachments
stacktrace (3.50 KB, text/plain)
2008-10-07 02:39 UTC, wobster
Details
stacktrace (3.53 KB, text/plain)
2009-04-20 07:02 UTC, saeed_z_f
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wobster 2008-10-07 02:39:34 UTC
Build: NetBeans IDE Dev (Build 200810040600)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-rc2-b31
OS: Windows XP, 5.1, x86

User Comments:
wobster: just tried to run a configuration for a recently compiled project.

sid21177: 1.created project with includes filter on source
2.could not select a main class in run menu (shows no classes found)
3.put in the name of the main class manually
4. tried to run the project, it compiles fine

GUEST: Try to run a project. Note that if i dont use the default platform i dont have the dialog displayed and nothing at all happen.

wobster: just tried to run a configuration for a recently compiled project.



Stacktrace: 
java.lang.AssertionError: File: C:\projects\hits-frontend-4.0\GUI\source
Path Type: classpath/boot
Owner: 
ClassPathProviders: 
  org.netbeans.modules.java.project.ProjectClassPathProvider@2d6dd0
  org.netbeans.modules.java.platform.classpath.PlatformClassPathProvider@849ddc
  org.netbeans.modules.java.j2seplatform.libraries.J2SELibraryClassPathProvider@981140
  org.netbeans.modules.java.j2seplatform.platformdefinition.DefaultClassPathProvider@194b24b
        at org.netbeans.modules.java.j2seproject.J2SEActionProvider.isSetMainClass(J2SEActionProvider.java:1236)
        at org.netbeans.modules.java.j2seproject.J2SEActionProvider.getTargetNames(J2SEActionProvider.java:583)
        at org.netbeans.modules.java.j2seproject.J2SEActionProvider$4.run(J2SEActionProvider.java:379)
        at org.netbeans.api.java.source.ui.ScanDialog.runWhenScanFinished(ScanDialog.java:150)
        at org.netbeans.modules.java.j2seproject.J2SEActionProvider.invokeAction(J2SEActionProvider.java:489)
        at org.netbeans.modules.groovy.support.LookupMergerSupport$MergedActionProvider.invokeAction(LookupMergerSupport.java:110)
Comment 1 wobster 2008-10-07 02:39:39 UTC
Created attachment 71244 [details]
stacktrace
Comment 2 Tomas Zezula 2008-10-07 09:27:27 UTC
The C:\projects\hits-frontend-4.0\GUI\source is a project source root, right?
Is the C:\projects\hits-frontend-4.0\GUI a project folder or is it an project with external source root?
Can you reproduce this problem?
The thing is that no SPI is able to find out the boot classpath for the given source root. It can be either
caused by wrong project setup or a problem in the FileOwnerQuery.
Thanks

Comment 3 wobster 2008-10-08 16:28:54 UTC
FYI: I haven't seen the problem in recent versions of NetBeans so far.
Comment 4 Jan Becicka 2008-11-13 15:52:46 UTC
OK. Feel free to reopen if you are able to reproduce it. Thanks.
Comment 5 Exceptions Reporter 2009-01-23 15:09:20 UTC
Reopening - reproduced in NetBeans IDE Dev (Build 200812180001)
http://statistics.netbeans.org/exceptions/detail.do?id=105870
Comment 6 Exceptions Reporter 2009-04-18 02:06:11 UTC
This issue already has 10 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=105870
Comment 7 saeed_z_f 2009-04-20 07:02:47 UTC
Build: NetBeans IDE Dev (Build 200904011705)
VM: Java HotSpot(TM) Client VM, 11.0-b16, Java(TM) SE Runtime Environment, 1.6.0_11-b03
OS: Windows XP, 5.1, x86

User Comments: 
This error occure when i want to run a java application project

Stacktrace: 
java.lang.AssertionError: File: C:\Documents and Settings\a\workspaceEclipseDouran\sa_studentInfo\src
Path Type: classpath/boot
Owner: 
ClassPathProviders: 
  org.netbeans.modules.java.project.ProjectClassPathProvider@d7430b
  org.netbeans.modules.csl.core.ProjectClassPathProvider@72c006
  org.netbeans.modules.java.platform.classpath.PlatformClassPathProvider@19d06aa
  org.netbeans.modules.java.j2seplatform.libraries.J2SELibraryClassPathProvider@20b80a
  org.netbeans.modules.java.j2seplatform.platformdefinition.DefaultClassPathProvider@12d51c
  org.netbeans.modules.javascript.editing.JsClassPathProvider@655184
        at org.netbeans.modules.java.j2seproject.J2SEActionProvider.isSetMainClass(J2SEActionProvider.java:1224)
        at org.netbeans.modules.java.j2seproject.J2SEActionProvider.getTargetNames(J2SEActionProvider.java:576)
        at org.netbeans.modules.java.j2seproject.J2SEActionProvider$4.run(J2SEActionProvider.java:378)
        at org.netbeans.api.java.source.ui.ScanDialog.runWhenScanFinished(ScanDialog.java:150)
        at org.netbeans.modules.java.j2seproject.J2SEActionProvider.invokeAction(J2SEActionProvider.java:482)
        at org.netbeans.modules.project.ui.actions.MainProjectAction.actionPerformed(MainProjectAction.java:150)
Comment 8 saeed_z_f 2009-04-20 07:02:58 UTC
Created attachment 80476 [details]
stacktrace
Comment 9 Tomas Zezula 2009-09-04 08:42:56 UTC
From the attached debug messages it seems as a problem of project's FileOwnerQuery.

java.lang.AssertionError: File: C:\Documents and Settings\a\workspaceEclipseDouran\sa_studentInfo\src
Path Type: classpath/boot
Owner: 
ClassPathProviders: 
  org.netbeans.modules.java.project.ProjectClassPathProvider@d7430b
  ....

The FileOwnerQuery returned null for source root C:\Documents and Settings\a\workspaceEclipseDouran\sa_studentInfo\src => ProjectClassProvider was 
not used.
Comment 10 Tomas Zezula 2009-09-07 15:13:39 UTC
*** Issue 151883 has been marked as a duplicate of this issue. ***
Comment 11 Tomas Zezula 2009-09-30 12:02:46 UTC
*** Issue 153084 has been marked as a duplicate of this issue. ***
Comment 12 Milos Kleint 2009-10-30 10:29:48 UTC
tzezula: can you elabore more on what the problem is? I didn't understand your last comment. All the reports seem to
come from j2se projects (no exception found). Thanks. 
Comment 13 Milos Kleint 2009-10-30 10:35:16 UTC
most exception logs I've found contain similar entries before the exception occurs: what do they mean?


ADVERTENCIA [org.netbeans.modules.java.source.indexing.JavaIndex]: Ignoring root with no ClassPath: C:\Users\Natalia E.
Blanco\Desktop\n9_agenda\source
ADVERTENCIA [org.netbeans.modules.java.source.parsing.JavacParser]: ClassPath identity changed for C:\Users\Natalia E.
Blanco\Desktop\n9_agenda\source\uniandes\cupi2\agenda\interfaz\InterfazAgenda.java, class path owner: null
Comment 14 Tomas Zezula 2009-10-30 10:40:14 UTC
>The FileOwnerQuery returned null for source root C:\Documents and Settings\a\workspaceEclipseDouran\sa_studentInfo\src => ProjectClassProvider was 
not used.
I've tried to explain that the source roots registered to the FOQ do not work in some cases. Which causes that ProjectClassPathProvider returns no CP for 
external source root.
>most exception logs I've found contain similar entries before the exception occurs: what do they mean?
The same, the FOQ do not work.
Comment 15 Tomas Zezula 2009-11-10 05:28:33 UTC
*** Bug 176380 has been marked as a duplicate of this bug. ***
Comment 16 Exceptions Reporter 2009-11-13 00:23:35 UTC
This issue already has 204 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=105870
Comment 17 Tomas Zezula 2009-11-13 02:00:58 UTC
Definitely not P1 (no data lost, crash of the IDE).
I will add more logging to find out why the FileOwnerQuery does not find the external root in some cases.
Unfortunately there is no reproducable test case.
Comment 18 Antonin Nebuzelsky 2009-11-20 03:13:03 UTC
Tomasi, I guess any logging you have introduced recently does not help us yet because there are no reports from recent builds, right?

Any clue what could be the cause? Or a potential fix?

If not, we need to waive it for 6.8 and work on investigation more deeply after 6.8.
Comment 19 Marian Mirilovic 2010-01-26 09:18:48 UTC
244 dups so far ... there are also reports from 6.8 so expect with additional logging. Could you guys look at it once more and re-evaluate ? Thanks a lot.
Comment 20 Exceptions Reporter 2010-01-31 21:17:05 UTC
This bug already has 250 duplicates 
see http://statistics.netbeans.org/exceptions/detail.do?id=105870
Comment 21 Milos Kleint 2010-02-04 01:32:08 UTC
reassigning to tzezula. I'm still not clear how this is a generic infra problem. All reports are still from j2se project only. Are there any related issues that have the same root cause with different threadstacks?
Comment 22 Tomas Zezula 2010-02-04 01:45:06 UTC
OK, I can reevaluate but the problem is in generic infrastructure as it was shown and explained several times in this issue and log. The problem is that FileOwnerQuery does not work in some cases for external source root. The stack trace is irrelevant as it was also explained above (the problem is that FOQ returns null for project source root).
Why J2SEProject? 
1) It's mostly configured with external source roots unlike others.
2) It has about 70% of NB project types.
Comment 23 Tomas Zezula 2010-02-08 08:31:00 UTC
fixed in jet-main 39b46be59ff5.
I've changed the J2SEActionProvider not to depend on SimpleFOQImpl. But missing CP for project root signals even bigger problem. So I kept there the assertion and added more logging. There will be the AssertionError (when assertions are enabled) but the run action will continue to work.
Comment 24 Quality Engineering 2010-02-08 21:40:44 UTC
Integrated into 'main-golden', will be available in build *201002090200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/39b46be59ff5
User: Tomas Zezula <tzezula@netbeans.org>
Log: #149306:AssertionError: File: C:\projects\hits-frontend-4.0\GUI\source Path Type