1

I got this message while trying to build a maven-based open-ide application:

Some tokens required by included modules are not provided by included modules. The application will fail starting up. The missing tokens are:
   org.netbeans.modules.java.source.queries.spi.QueriesController          ref: [org.netbeans.modules.java.source.queries]
   org.netbeans.api.editor.guards.Java          ref: [org.netbeans.modules.form]
   org.netbeans.modules.editor.actions          ref: [org.netbeans.modules.editor.lib2]

I tried Googling for the first line to see if I could find the answer there, but all I got was the source code where the error was being raised. Can any-one clearly interpret this error and/or tell me how to fix it?

Note: it does not specify which of my modules is causing it, but it is dying on the "app" project.

BrainStorm.exe
  • 1,565
  • 3
  • 23
  • 40

2 Answers2

3

tokens are a type of netbeans dependency that cannot be expressed by maven dependencies. Typically an API module requires an implementation that way while the implementation module has regular compilation dependency. For modules system defaults, see http://bits.netbeans.org/dev/javadoc/org-openide-modules/org/openide/modules/doc-files/api.html#how-vers

Typically you would have to look into the module jar's manifest to find which module provides which token.

The easiest way to setup a maven based application is to include enough cluster dependencies in your nbm-application packaging project. (org.netbeans.cluster groupId). Then if you don't need some features, slowly start excluding modules to see if it didn't break anything.

By default the nbm-application project depends on 'platform' cluster, you apparently need also 'ide' and 'java'

mkleint
  • 2,281
  • 1
  • 14
  • 17
  • Thank-you for interpreting that for me, that helped in solving the problem. But adding the other clusters in the project's `pom.xml` made it worse, just so you know. – BrainStorm.exe Dec 21 '13 at 00:47
  • java cluster likely needs some other clusters (extide? something with webservices?) to work. – mkleint Dec 22 '13 at 07:08
  • I'm stuck with the missing token org.netbeans.modules.editor.actions. Could you share which dependency has to be added fr that? – javydreamercsw May 25 '16 at 15:25
  • I had to add the following clusters: ide, java, extide, webcommon, websvccommon, org-netbeans-modules-jemmy, org-netbeans-modules-jellytools-platform, org-netbeans-libs-junit4 for just getting rid of org.netbeans.modules.editor.actions. Insane! – javydreamercsw May 25 '16 at 15:43
0

It appears that it means that certain tokens (on the left) are not provided to the, modules that need them (on the right). I found the needed modules by grep-ing the NetBeans source for the token and looked for a line that started with OpenIDE-Module-Provides: and then adding that module to the project that had issues.

I found the project that had issues by cleaning everything and then building the projects from the least dependent to the most until I got the error again.

BrainStorm.exe
  • 1,565
  • 3
  • 23
  • 40