Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » JavaFX in PlugIn project.(Problems with Eclipse IDE.)
icon5.gif  JavaFX in PlugIn project. [message #1608580] Mon, 09 February 2015 16:13 Go to next message
Piotr Iksowski is currently offline Piotr IksowskiFriend
Messages: 27
Registered: October 2014
Junior Member
Hello All,

Last time, I've been strugling with running any plug-in project which is using JavaFX and I stucked... I'm getting below exceptions:

!ENTRY org.eclipse.fx.ide.java6 4 0 2015-02-09 16:41:14.001
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.fx.ide.java6 [219]
  Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version>=1.3)(!(version>=1.8)))"

	at org.eclipse.osgi.container.Module.start(Module.java:434)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)


 
org.eclipse.core.runtime.CoreException: Plug-in "MyPlug" was unable to instantiate class "myplug.views.SampleView".
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:188)
	at org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
	at org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
	at org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
	at org.eclipse.ui.internal.registry.ViewDescriptor.createView(ViewDescriptor.java:63)
	at org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:108)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPart(CompatibilityPart.java:264)
	at org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:302)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

Caused by: java.lang.NoClassDefFoundError: javafx/scene/Parent
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2658)
	at java.lang.Class.getConstructor0(Class.java:2964)
	at java.lang.Class.newInstance(Class.java:403)
	at org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:184)
	... 122 more
Caused by: java.lang.ClassNotFoundException: javafx.scene.Parent cannot be found by MyPlug_1.0.0.qualifier
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:423)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:336)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:328)

.....................
.....................
.....................


I've tried Eclipse, Eclipse EE, Eclipse RCP (all Luna version) and behaviour was exactly the same.

Simple applications with JavaFX are working without any problem, plugin projects are also working well, but mixing this two things is causing above exception .

Any idea why it is happening ? I will be really grateful for any help.

Thank You.
Re: JavaFX in PlugIn project. [message #1608707 is a reply to message #1608580] Mon, 09 February 2015 18:02 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Do you have the necessary Import-Package directives in your MANIFEST.MF?
It should hold something like

> Import-Package: javafx.animation;version="2.2.0",
> javafx.application;version="2.2.0",
> javafx.beans;version="2.2.0",
> javafx.beans.binding;version="2.2.0",
> javafx.beans.property;version="2.2.0",
> javafx.beans.property.adapter;version="2.2.0",
> javafx.beans.value;version="2.2.0",
> javafx.collections;version="2.2.0",
> javafx.collections.transformation;version="8.0.0",
> javafx.concurrent;version="2.2.0",
> javafx.css;version="8.0.0",
> javafx.embed.swing;version="2.2.0",
> javafx.embed.swt;version="2.2.0",
> javafx.event;version="2.2.0",
> javafx.fxml;version="2.2.0",
> javafx.geometry;version="2.2.0",
> javafx.print;version="8.0.0",
> javafx.scene;version="2.2.0",
> javafx.scene.canvas;version="2.2.0",
> javafx.scene.chart;version="2.2.0",
> javafx.scene.control;version="2.2.0",
> javafx.scene.control.cell;version="2.2.0",
> javafx.scene.effect;version="2.2.0",
> javafx.scene.image;version="2.2.0",
> javafx.scene.input;version="2.2.0",
> javafx.scene.layout;version="2.2.0",
> javafx.scene.media;version="2.2.0",
> javafx.scene.paint;version="2.2.0",
> javafx.scene.shape;version="2.2.0",
> javafx.scene.text;version="2.2.0",
> javafx.scene.transform;version="2.2.0",
> javafx.scene.web;version="2.2.0",
> javafx.stage;version="2.2.0",
> javafx.util;version="2.2.0",
> javafx.util.converter;version="2.2.0",


Tom

On 09.02.15 18:07, Piotr Iksowski wrote:
> Hello All,
>
> Last time, I've been strugling with running any plug-in project which is
> using JavaFX and I stucked... I'm getting below exceptions:
>
>
> !ENTRY org.eclipse.fx.ide.java6 4 0 2015-02-09 16:41:14.001
> !MESSAGE FrameworkEvent ERROR
> !STACK 0
> org.osgi.framework.BundleException: Could not resolve module:
> org.eclipse.fx.ide.java6 [219]
> Unresolved requirement: Require-Capability: osgi.ee;
> filter:="(&(osgi.ee=JavaSE)(version>=1.3)(!(version>=1.8)))"
>
> at org.eclipse.osgi.container.Module.start(Module.java:434)
> at
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
>
> at
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
>
> at
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
>
> at
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
>
> at
> org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
>
> at
> org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
>
> at
> org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)
>
>
>
>
> org.eclipse.core.runtime.CoreException: Plug-in "MyPlug" was unable to
> instantiate class "myplug.views.SampleView".
> at
> org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.throwException(RegistryStrategyOSGI.java:194)
>
> at
> org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:188)
>
> at
> org.eclipse.core.internal.registry.ExtensionRegistry.createExecutableExtension(ExtensionRegistry.java:905)
>
> at
> org.eclipse.core.internal.registry.ConfigurationElement.createExecutableExtension(ConfigurationElement.java:243)
>
> at
> org.eclipse.core.internal.registry.ConfigurationElementHandle.createExecutableExtension(ConfigurationElementHandle.java:55)
>
> at
> org.eclipse.ui.internal.registry.ViewDescriptor.createView(ViewDescriptor.java:63)
>
> at
> org.eclipse.ui.internal.ViewReference.createPart(ViewReference.java:108)
> at
> org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.createPart(CompatibilityPart.java:264)
>
> at
> org.eclipse.ui.internal.e4.compatibility.CompatibilityPart.create(CompatibilityPart.java:302)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>
>
> Caused by: java.lang.NoClassDefFoundError: javafx/scene/Parent
> at java.lang.Class.getDeclaredConstructors0(Native Method)
> at java.lang.Class.privateGetDeclaredConstructors(Class.java:2658)
> at java.lang.Class.getConstructor0(Class.java:2964)
> at java.lang.Class.newInstance(Class.java:403)
> at
> org.eclipse.core.internal.registry.osgi.RegistryStrategyOSGI.createExecutableExtension(RegistryStrategyOSGI.java:184)
>
> ... 122 more
> Caused by: java.lang.ClassNotFoundException: javafx.scene.Parent cannot
> be found by MyPlug_1.0.0.qualifier
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:423)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:336)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:328)
>
>
> ....................
> ....................
> ....................
>
>
> I've tried Eclipse, Eclipse EE, Eclipse RCP (all Luna version) and
> behaviour was exactly the same.
> Simple applications with JavaFX are working without any problem, plugin
> projects are also working well, but mixing this two things is causing
> above exception .
> Any idea why it is happening ? I will be really grateful for any help.
>
> Thank You.
Re: JavaFX in PlugIn project. [message #1609409 is a reply to message #1608707] Tue, 10 February 2015 05:11 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
Not sure, but doesn't the error message report an issue regarding the Java version? Do you run your application using Java 8?
Re: JavaFX in PlugIn project. [message #1609426 is a reply to message #1609409] Tue, 10 February 2015 05:27 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
No this resolve does tell exactly the opposite - he runs java8! This bundle activates if your version is lower than java8 showing a warning that efxclipse is disabled because it requires java8. I know this is strange nur in the early days of java8 we had many people wondering why efxclipse did not work in their env. I think we should remove this bundle in 2.0.
Re: JavaFX in PlugIn project. [message #1609780 is a reply to message #1609426] Tue, 10 February 2015 10:33 Go to previous messageGo to next message
Piotr Iksowski is currently offline Piotr IksowskiFriend
Messages: 27
Registered: October 2014
Junior Member
Solved ! (almost Smile)
Yes, I'm using Java 8. As Thomas wrote, problem was in Manifest.mf (lacking dependencies for JavaFX).

After changes in Manifest.mf all exceptions disapeared apart from the first one about Java version ("org.osgi.framework.BundleException: Could not resolve module: org.eclipse.fx.ide.java6 [219]"). I've made few tests and it turned out that this exception appeares after installing JavaFX plugin in Eclipse and it is thrown every time when I'm running Eclipse Plugin project (even if the project does NOT use JavaFX. So it seems that there are some problems with compability between JavaFX plugin and Eclipse).

Thanks for help !

[Updated on: Tue, 10 February 2015 10:34]

Report message to a moderator

Re: JavaFX in PlugIn project. [message #1609848 is a reply to message #1609780] Tue, 10 February 2015 11:28 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

No this plugin is NOT wrong nor BUGGY but works as designed! It is there
when you installed e(fx)clipse because all TOOLING bundles require Java8.

So when Java8 was not default for most people to run their IDE people
have been wondering why they did not see all the e(fx)clipse tooling
stuff (including very seasoned devs at EclipseCon Tutorials) although
the bundles where installed appropriately through p2.

The bundle refusing the start under Java8 is a bundle who would bring up
a dialog telling you that you are running e.g. on Java 5 / 6 / 7 and the
tooling will not be functional (including to disable the warning for the
future!).

It's unfortunate that Equinox croaks with such a big error message since
Luna and as I already replied to Dirk we might now safely remove this
helper bundle and assume that people are smart enough to run their IDE
with Java8 if they are doing JavaFX dev.

Tom


On 10.02.15 11:33, Piotr Iksowski wrote:
> Solved ! (almost :))
> Yes, I'm using Java 8. As Thomas wrote, problem was in Mainmfest.mf
> (lacking dependencies for JavaFX).
> After changes in Manifest.mf all exceptions disapared apart from the
> first one about Java version ("org.osgi.framework.BundleException: Could
> not resolve module: org.eclipse.fx.ide.java6 [219]"). I've made few
> tests and it turned out that this exception appeares after installing
> JavaFX plugin in Eclipse and it is thrown every time when I'm running
> Eclipse Plugin project (even if the project does NOT use JavaFX. So it
> seems that there are some problems with compability between JavaFX
> plugin and Eclipse).
>
> Thanks for help !
Re: JavaFX in PlugIn project. [message #1784967 is a reply to message #1609780] Fri, 06 April 2018 11:15 Go to previous message
Ahmed Gharssellaoui is currently offline Ahmed GharssellaouiFriend
Messages: 31
Registered: February 2018
Member
Dear,
it seems I am having the same issue,
how can I add the JavaFX to Manifest, please ???
Previous Topic:Maven cannot compile application
Next Topic:Can we use JUnit 5 with e(fx)clipse?
Goto Forum:
  


Current Time: Thu Apr 25 08:04:08 GMT 2024

Powered by FUDForum. Page generated in 0.04382 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top