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 242564 - Module JavaFX wrapper in platform requests the token org.openide.modules.jre.JavaFX but there are no known providers.
Summary: Module JavaFX wrapper in platform requests the token org.openide.modules.jre....
Status: NEW
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 8.0.2
Hardware: PC Windows 10
: P3 normal with 1 vote (vote)
Assignee: Martin Kozeny
URL:
Keywords:
Depends on: 237973
Blocks:
  Show dependency tree
 
Reported: 2014-03-05 03:26 UTC by pjdm
Modified: 2018-10-27 20:37 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description pjdm 2014-03-05 03:26:43 UTC
Using NetBeans build 201403040001 and Java 1.8.0-b128, create a new NetBeans Platform Application, and look at the properties of the new module suite. In the Libraries section is the warning "Module JavaFX wrapper in platform requests the token org.openide.modules.jre.JavaFX but there are no known providers." The label of the Resolve button is red, but the button is disabled.

Unselecting the platform -> JavaFX wrapper resolves the problem, but I have JavaFX code in my application.
Comment 1 Jaroslav Tulach 2014-03-06 09:42:41 UTC
This is result of
http://bits.netbeans.org/dev/javadoc/org-openide-modules/apichanges.html#javafx.lib
tracked as bug 237973 which already caused few issues in depending systems - see bug 238509 and bug 238939, plus problem in a maven https://jira.codehaus.org/browse/MNBMODULE-228

I guess the fix is the same. Just add this token, if the jfxrt.jar is present. Similar to http://hg.netbeans.org/core-main/rev/9b629986ec31
Comment 2 pjdm 2014-03-06 10:39:25 UTC
Sorry, I don't understand.

Since I'm using JDK8, I assume this applies:
"
If you want to depend on presence of JavaFX JAR inside of JDK installation structure, use:
OpenIDE-Module-Needs: org.openide.modules.jre.JavaFX
"

How do I use it? I added it to a module's manifest.mf, but that just passes the problem on to that module: "Module mymodule in myproject requests the token org.openide.modules.jre.JavaFX but there are no known providers."

After some random experimentation, adding "OpenIDE-Module-Provides: org.openide.modules.jre.JavaFX" to the module's manifest makes the warning go away, but it's not what the doc says, so I don't know if this has made the warning go away by accident, or if there are any unintended side-effects.

I can't find an explanation of tokens, so I don't know what this is supposed to do.
Comment 3 pjdm 2014-03-06 22:47:53 UTC
This is very confusing. If I add "JavaFX wrapper" as a dependency, my module doesn't build.
"
Distilling C:\tmp\nbplacement\build\public-package-jars\org-netbeans-libs-javafx.jar from [C:\opt\NetBeans 8.0 RC1\platform\modules\org-netbeans-libs-javafx.jar, C:\opt\NetBeans 8.0 RC1\platform\modules\${java.home}\lib\ext\jfxrt.jar]
Classpath entry C:\opt\NetBeans 8.0 RC1\platform\modules\${java.home}\lib\ext\jfxrt.jar does not exist; skipping
C:\opt\NetBeans 8.0 RC1\harness\build.xml:174: The JARs [C:\opt\NetBeans 8.0 RC1\platform\modules\org-netbeans-libs-javafx.jar, C:\opt\NetBeans 8.0 RC1\platform\modules\${java.home}\lib\ext\jfxrt.jar] contain no classes in the supposed public packages javafx.animation.*, javafx.application.*, javafx.beans.*, javafx.beans.binding.*, javafx.beans.property.*, javafx.beans.property.adapter.*, javafx.beans.value.*, javafx.collections.*, javafx.concurrent.*, javafx.embed.swing.*, javafx.event.*, javafx.fxml.*, javafx.geometry.*, javafx.scene.*, javafx.scene.canvas.*, javafx.scene.chart.*, javafx.scene.control.*, javafx.scene.control.cell.*, javafx.scene.effect.*, javafx.scene.image.*, javafx.scene.input.*, javafx.scene.layout.*, javafx.scene.media.*, javafx.scene.paint.*, javafx.scene.shape.*, javafx.scene.text.*, javafx.scene.transform.*, javafx.scene.web.*, javafx.stage.*, javafx.util.*, javafx.util.converter.*, netscape.javascript.*, com.sun.javafx.scene.web.* and so cannot be compiled against
BUILD FAILED (total time: 0 seconds)
"

However, if instead I deselect "JavaFX wrapper" from the project platform library, the warning goes away and everything seems to work.

The conclusion appears to be that NetBeans 8 is by default configured incorrectly for JDK8.
Comment 4 omarvg 2014-09-08 15:23:53 UTC
What worked for me is the following:

1. Uncheck the JavaFX Wrapper in the platform cluster node.

2. Check the JavaFX cluster node (selects all JavaFX subnodes).

3. Now you can press the Resolve button and all necessary files are referenced (quite a lot actually).

All the JavaFx samples that I tried worked fine after that.

Maybe the wrapper class is included for older NetBeans/JDK versions where JavaFx was not yet integrated in the JDK?
Comment 5 Jaroslav Tulach 2014-09-08 15:40:50 UTC
I've reported and fixed the compilation part of the issue as bug 246771. The UI issues (there are some, right?) are unaffected by my fix.