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 126524 - Classes from other modules can not be found from a newly created NB module
Summary: Classes from other modules can not be found from a newly created NB module
Status: VERIFIED FIXED
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: Macintosh Mac OS X
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-01 21:13 UTC by David Vancouvering
Modified: 2008-02-07 01:08 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The log file from my userdir (39.40 KB, text/plain)
2008-02-01 21:16 UTC, David Vancouvering
Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Vancouvering 2008-02-01 21:13:07 UTC
* Do a fresh pull from hg (mine is based on revision 97290a6d60aa)
* Build using 'ant -D"cluster.config=basic"
* Create a new module project within the NB code tree.  My module was named 'db.sample" and was placed under 'main' in
the directory 'db.sample', following the new convention
* File->New File->Module Development->Wizard
* Choose "New File" (Custom has the same behavior) and 1 panel
* Enter in any name for the class base, and generate

You get a bunch of errors in the console (see below), and then the generated files are tagged as not compilable, with
errors like 'package org.openide.util does not exist' and 'org.jdesktop.layout does not exist'.

I searched, and nbbuild/netbeans/platform8/modules/org-jdesktop-layout.jar org-openide-util.jar both exist.

I tried adding DB Explorer as a dependency, and got the same problem.

I am completely stuck because of this, and I have no workaround, so I am marking this a P1.
Comment 1 David Vancouvering 2008-02-01 21:15:41 UTC
Here is the relevant output from the console.  This was printed out when the wizard was being generated, and repeated
itself many times...

WARNING [org.netbeans.modules.apisupport.project]: Project in /Users/David/code/netbeans/clone/main/db.sample does not
appear to be listed in its own module list; some sort of misconfiguration (e.g. not listed in its own suite)
WARNING [org.netbeans.modules.apisupport.project]: Warning - could not find dependent module
org.netbeans.modules.db.sample for /Users/David/code/netbeans/clone/main/db.sample
INFO [org.netbeans.modules.mercurial.Mercurial]: Unable to get original file
/Users/David/code/netbeans/clone/main/db.sample/src/org/netbeans/modules/db/sample/CreateSampleDatabaseWizardPanel1.java
Comment 2 David Vancouvering 2008-02-01 21:16:59 UTC
Created attachment 55938 [details]
The log file from my userdir
Comment 3 David Vancouvering 2008-02-04 18:29:39 UTC
I had originally put this in 'ide' since I didn't know where this belongs, but since this had no response, I am
reassigning to projects.  Please re-categorize as necessary.  

Thanks.
Comment 4 David Vancouvering 2008-02-04 20:41:16 UTC
More information: Andrei tried this on his build and it worked fine.

I have tried: cleaning out my userdir, doing a completely clean build, to no effect.  Also note that I don't get this on
existing modules I am working with.

Also, I tried this with a new module that did not have a '.' in its name, and same problem.

Since it works for Andrei, I am going to try a completely new hg clone and see if that solves the problem.  This could
also be a Mac-specific issue...
Comment 5 David Vancouvering 2008-02-04 22:46:59 UTC
Tried it with a completely fresh hg clone, same problem.  I also tried a full build (I was building with
"cluster.config=basic".  Same problem.

I also tried just adding a library dependency to Database Explorer, and then added an import to
org.netbeans.api.db.explorer, and the module couldn't find it.

I am suspecting this is a Mac problem?
Comment 6 David Vancouvering 2008-02-04 22:48:22 UTC
Tried it with a completely fresh hg clone, same problem.  I also tried a full build (I was building with
"cluster.config=basic".  Same problem.

I also tried just adding a library dependency to Database Explorer, and then added an import to
org.netbeans.api.db.explorer, and the module couldn't find it.

I am suspecting this is a Mac problem?
Comment 7 David Vancouvering 2008-02-05 01:17:00 UTC
I recategorized this bug after looking at the source a bit.  The message "Project in
/Users/David/code/netbeans/clone/main/db.sample does not
appear to be listed in its own module list; some sort of misconfiguration (e.g. not listed in its own suite)"  is at
line 522 of NbModuleProject.java.

Walking through this code, what *appears* to be happening to cause this error is that because this is a new nb.org
module, it is not showing up in the "official" nb.org module list.  I looked at the code, and it appears to be getting
this list from cluster.properties.

I think the issue is that with the old dir structure, the sub-modules like db/core didn't need to be registered in
cluster.properties.  But now everything is top-level, and if you don't specifically add it to cluster.properties, it is
not recognized as an "official" nb.org module.

When I added my new module explicitly to cluster.properties, the error went away, and the issues with not being able to
add dependencies also went away (yay!). 

Downgrading to a P2 since there is a workaround.  I don't know why this is working for Andrei...
Comment 8 Jesse Glick 2008-02-06 23:20:28 UTC
Working for me (080205, current sources, Ubuntu) without adding the new module 'foo.bar' to any cluster config.
Comment 9 Jesse Glick 2008-02-07 00:35:11 UTC
...and worked for me again, but the third time did not work for me.
Comment 10 Jesse Glick 2008-02-07 00:44:37 UTC
Not sure how to reproduce, but maybe this will do the trick: 3944bd0f0995
Comment 11 David Vancouvering 2008-02-07 01:08:19 UTC
Works for me now, thanks.