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.
Several times I had problems with the reliability of the module dependencies. The last time was when I created a small module suite project to report bug 170527. I used the "Resolve" button in the "Project Properties" window to make sure that all dependencies were resolved. The module suite compiled without errors but when the application was started a dialog (see attachment) was shown that a module was missing. For larger projects getting the module dependencies right is a real pain if you can't trust the dependency resolution. If a program compiles without errors there should be no missing modules reported during runtime.
Created attachment 86381 [details] Missing module dialog
Reassigning to java for further evaluation.
Why Java?
Likely need steps to reproduce.
As I have learned from comments made by ovrabec in bug 170527 the problem is that some modules may have "hidden" dependencies (because of using lookup). That means a project will compile without errors but will fail during runtime because of those invisible dependencies. If this is intended it makes the module system useless because you never can be sure that a program (that compiles without errors) will not fail (because of missing modules) when it is used by a customer.
There is no deficiency in the module system. I think you are misinterpreting ovrabec's comments. He admitted that diff needs to either work well without editor, or add an explicit dependency on it. That is a bug in the diff module. The problem shown in your screenshot appears unrelated. diff has a dependency on the settings module and so any suite which includes diff must also include settings. To omit settings would not be a compile error (your code can still compile if it makes no explicit reference to classes from the settings module) but would be a configuration error in your suite (the set of modules will be rejected by the module system). The suite customizer's "resolve" functionality is supposed to take care of this situation by including the settings module, and should show a warning in red if you are missing it. If that is not working correctly, that is a bug in the suite customizer - which is why I requested steps to reproduce from scratch.
OK I see, you can use the application from bug 170527. 1) Open the Project Properties Dialog of the DiffNPE module 2) Deselect ide11 and platform10 clusters -> A red error message about missing modules will appear 3) Press the Resolve button -> the red error message disappears and some modules become selected (In my eyes the minimum set of modules needed to run the application should be selected now) 4) Use Run>Run Main Project to run the application On my system the application starts printing the usual logging information and the following info about loaded modules but fails to open the main window. In the last line there is a warning message that the module org.netbeans.core.windows is missing. INFO [org.netbeans.core.startup.NbEvents]: Turning on modules: org.openide.util [7.26.0.1 1 200908022240] org.openide.modules [7.11 200908022240] org.openide.awt [7.12.0.1 200908022240] org.netbeans.modules.editor.util/1 [1.30 200908022240] org.netbeans.modules.lexer/2 [1.31.0.1 1 200908022240] org.openide.filesystems [7.22.0.1.1 1 200908022240] org.netbeans.modules.editor.mimelookup/1 [1.12 200908022240] org.netbeans.modules.editor.settings/1 [1.25 200908022240] org.jdesktop.layout/1 [1.8.0.103 103 200908022240] org.netbeans.api.progress/1 [1.14.0.1 1 200908022240] org.openide.dialogs [7.11 200908022240] org.netbeans.modules.editor.lib2/1 [1.13.0.2 2 200908022240] org.netbeans.swing.outline [1.5 200908022240] org.openide.nodes [7.10.0.1 200908022240] org.openide.explorer [6.19.0.1 1 200908022240] org.openide.windows [6.28 200908022240] org.openide.text [6.23 200908022240] org.openide.actions [6.10.0.1 200908022240] org.netbeans.modules.queries/1 [1.15 200908022240] org.openide.loaders [7.6 200908022240] org.netbeans.modules.projectapi/1 [1.26 200908022240] org.openide.io [1.17 200908022240] org.openide.execution [1.14 200908022240] org.netbeans.modules.projectuiapi/1 [1.37.0.6 6 200908022240] org.netbeans.bootstrap/1 [2.20 200908022240] org.netbeans.core.startup/1 [1.16.0.1 200908022240] org.netbeans.spi.quicksearch [1.2 200908022240] org.netbeans.swing.plaf [1.10 200908022240] org.netbeans.core/2 [3.12.0.1 200908022240] org.netbeans.modules.options.api/1 [1.13 200908022240] org.openidex.util/3 [3.21 200908022240] org.netbeans.swing.tabcontrol [1.16 200908022240] org.netbeans.modules.editor.fold/1 [1.11 200908022240] org.netbeans.modules.editor.lib/1 [1.40.0.9.2 9 200908022240] org.netbeans.modules.editor.indent/2 [1.13.0.9 200908022240] org.netbeans.modules.editor/3 [1.43.0.3.9.2 3 200908022240] org.netbeans.modules.options.keymap [1.6 200908022240] org.netbeans.modules.editor.settings.storage/1 [1.21 200908022240] org.netbeans.modules.options.editor/1 [1.13 200908022240] org.netbeans.core.execution/1 [1.14.0.1 200908022240] org.netbeans.core.ui/1 [1.15.0.1 200908022240] org.netbeans.modules.editor.errorstripe.api/1 [2.7.0.1 1 200908022240] org.netbeans.modules.editor.errorstripe/2 [2.7.0.1.1 1 200908022240] org.netbeans.modules.javahelp/1 [2.13 200908022240] org.netbeans.modules.diff/1 [1.22.0.42.1 42 200908022240] org.netbeans.modules.settings/1 [1.19.0.1 200908022240] org.diff [1.0 090818] org.netbeans.modules.favorites/1 [1.16 200908022240] org.netbeans.modules.masterfs/2 [2.17 200908022240] org.netbeans.modules.projectui [1.17.0.1.6 1 200908022240] org.netbeans.modules.editor.mimelookup.impl/1 [1.5 200908022240] WARNING [org.netbeans.core.NonGui]: Module org.netbeans.core.windows missing, cannot start window system
(In reply to comment #7) > 2) Deselect ide11 and platform10 clusters So, removing everything. > 3) Press the Resolve button Adding back in only _static_ dependencies. > [...] In the last line there is a warning message > that the module > org.netbeans.core.windows is missing. You can't run a GUI application without core.windows. Resolve Dependencies cannot help you here because no particular module has a direct dependency on core.windows; it just needs to be included in the app.
(In reply to comment #8) But how should a non netbeans developer know which is the minimum subset of netbeans modules to run an application based on the netbeans platform? Best regards, Martin PS: I hope that the module system currently developed for Java7 will allow us to find out during compile time that all dependencies are fulfilled. Otherwise it will be a nightmare for users confronted with applications failling at runtime because of missing dependencies.
(In reply to comment #9) > how should a non netbeans developer know which is the minimum subset of > netbeans modules to run an application based on the netbeans platform? For now, trial and error, and experience/FAQs. You need Startup for any app using the module system, and Core - Windows if using the window system. It is tricky to determine mechanically what modules are "required" because some applications intentionally omit large blocks of functionality that would be considered essential for other applications. The Resolve button only checks that explicitly declared module-to-module dependencies are satisfied. If in doubt it is best to start with the module set chosen for you when you click "Standalone Application" in the suite customizer, then add or remove modules as desired. > I hope that the module system currently developed for Java7 will allow us to > find out during compile time that all dependencies are fulfilled. If anything, the 294-specified module system is likely to be much weaker than that used by NetBeans (or OSGi for that matter). It only addresses simple language-level dependencies: if your code compiles it should not generate a LinkageError at runtime.