Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Cannot run Media Application sample under e(fx)clipse 2.0
Cannot run Media Application sample under e(fx)clipse 2.0 [message #1705079] Tue, 11 August 2015 22:08 Go to next message
Michael Marton is currently offline Michael MartonFriend
Messages: 7
Registered: August 2015
Junior Member
When trying to run the Media Application sample project under e(fx)clipse 2.0, I get the error(s) shown below
(I did not make any changes to the sample project).
The sample (as well as my own E4 application) runs fine under e(fx)clipse 1.2 but I cannot get anything to run on v2.0.

thanks!


!SESSION 2015-08-11 23:51:12.757 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_51
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=de_AT
Framework arguments: -product media.product
Command-line arguments: -product media.product -data J:\workspaces\java\TreskySuite/../runtime-media.product -dev file:J:/workspaces/java/TreskySuite/.metadata/.plugins/org.eclipse.pde.core/media.product.product/dev.properties -os win32 -ws win32 -arch x86_64 -consoleLog

!ENTRY org.eclipse.equinox.ds 1 0 2015-08-11 23:51:15.328
!MESSAGE Could not bind a reference of component org.eclipse.fx.core.internal.JUtilLoggerFactory. The reference is: Reference[name = registerHandler, interface = java.util.logging.Handler, policy = dynamic, policy-option = greedy, cardinality = 0..n, target = null, bind = registerHandler, unbind = unregisterHandler, updated = null]

!ENTRY org.eclipse.equinox.ds 1 0 2015-08-11 23:51:15.858
!MESSAGE Could not bind a reference of component media.themes.default. The reference is: Reference[name = Stylesheet, interface = org.eclipse.fx.ui.services.theme.Stylesheet, policy = dynamic, cardinality = 0..n, target = null, bind = registerStylesheet, unbind = unregisterStylesheet]
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Invalid type stored in transient data with the key binding
Aug 11, 2015 11:51:16 PM org.eclipse.fx.ui.workbench.renderers.fx.DefWindowRenderer$WWindowImpl <init>
WARNUNG: Useage of deprecated persisted state 'fx.stage.decoration' please use 'efx.window.decoration.fxml' instead.
Creating controller ....

!ENTRY org.eclipse.equinox.event 4 0 2015-08-11 23:51:17.062
!MESSAGE Exception while dispatching event org.osgi.service.event.Event [topic=org/eclipse/e4/ui/model/ui/UIElement/widget/SET] {ChangedElement=org.eclipse.e4.ui.model.application.ui.basic.impl.TrimmedWindowImpl@fab5409 (elementId: org.efxclipse.e4.mainWindow, tags: [], contributorURI: platform:/plugin/media) (widget: org.eclipse.fx.ui.workbench.renderers.fx.DefWindowRenderer$WWindowImpl@3a777b22, renderer: org.eclipse.fx.ui.workbench.renderers.fx.DefWindowRenderer@17b50892, toBeRendered: true, onTop: false, visible: true, containerData: null, accessibilityPhrase: null) (label: Media Application, iconURI: null, tooltip: null, context: TrimmedWindowImpl (org.efxclipse.e4.mainWindow) Context, variables: [], x: 30, y: 30, width: 1024, height: 768), Widget=org.eclipse.fx.ui.workbench.renderers.fx.DefWindowRenderer$WWindowImpl@3a777b22, AttName=widget, NewValue=org.eclipse.fx.ui.workbench.renderers.fx.DefWindowRenderer$WWindowImpl@3a777b22, EventType=SET} to handler org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler@ea36b25
!STACK 0
org.eclipse.e4.core.di.InjectionException: java.lang.ClassCastException: org.eclipse.fx.ui.workbench.renderers.fx.DefWindowRenderer$WWindowImpl cannot be cast to org.eclipse.swt.widgets.Widget
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:68)
at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler$1.run(UIEventObjectSupplier.java:56)
at org.eclipse.fx.ui.workbench.fx.internal.UISynchronizeImpl.syncExec(UISynchronizeImpl.java:88)
at org.eclipse.e4.ui.internal.di.UIEventObjectSupplier$UIEventHandler.handleEvent(UIEventObjectSupplier.java:53)
at org.eclipse.equinox.internal.event.EventHandlerWrapper.handleEvent(EventHandlerWrapper.java:197)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:197)
at org.eclipse.equinox.internal.event.EventHandlerTracker.dispatchEvent(EventHandlerTracker.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
at org.eclipse.equinox.internal.event.EventAdminImpl.dispatchEvent(EventAdminImpl.java:135)
at org.eclipse.equinox.internal.event.EventAdminImpl.sendEvent(EventAdminImpl.java:78)
at org.eclipse.equinox.internal.event.EventComponent.sendEvent(EventComponent.java:39)
at org.eclipse.e4.ui.services.internal.events.EventBroker.send(EventBroker.java:85)
at org.eclipse.e4.ui.internal.workbench.UIEventPublisher.notifyChanged(UIEventPublisher.java:59)
at org.eclipse.emf.common.notify.impl.BasicNotifierImpl.eNotify(BasicNotifierImpl.java:374)
at org.eclipse.e4.ui.model.application.ui.impl.UIElementImpl.setWidget(UIElementImpl.java:261)
at org.eclipse.fx.ui.workbench.renderers.base.BaseRenderer.bindWidget(BaseRenderer.java:547)
at org.eclipse.fx.ui.workbench.renderers.base.BaseRenderer.bindWidget(BaseRenderer.java:1)
at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.createWidget(PartRenderingEngine.java:247)
at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.createGui(PartRenderingEngine.java:211)
at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.createGui(PartRenderingEngine.java:311)
at org.eclipse.fx.ui.workbench.fx.PartRenderingEngine.run(PartRenderingEngine.java:439)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
at org.eclipse.fx.ui.workbench.fx.E4Application$1.lambda$0(E4Application.java:181)
at org.eclipse.fx.ui.workbench.fx.E4Application$1$$Lambda$63/966136923.run(Unknown Source)
at org.eclipse.fx.ui.workbench.fx.internal.UISynchronizeImpl.syncExec(UISynchronizeImpl.java:88)
at org.eclipse.fx.ui.workbench.fx.E4Application$1.run(E4Application.java:170)
at org.eclipse.fx.ui.workbench.fx.E4Application.jfxStart(E4Application.java:193)
at org.eclipse.fx.ui.workbench.fx.DefaultJFXApp.start(DefaultJFXApp.java:57)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$159(Unknown Source)
at com.sun.javafx.application.LauncherImpl$$Lambda$58/1857059779.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$172(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$54/788707394.run(Unknown Source)
at com.sun.javafx.application.PlatformImpl.lambda$null$170(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$56/1865261172.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$171(Unknown Source)
at com.sun.javafx.application.PlatformImpl$$Lambda$55/713845900.run(Unknown Source)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at com.sun.glass.ui.win.WinApplication.lambda$null$145(Unknown Source)
at com.sun.glass.ui.win.WinApplication$$Lambda$44/1741750503.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassCastException: org.eclipse.fx.ui.workbench.renderers.fx.DefWindowRenderer$WWindowImpl cannot be cast to org.eclipse.swt.widgets.Widget
at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDAddon.subscribeTopicWidget(DnDAddon.java:38)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:56)
... 42 more
Re: Cannot run Media Application sample under e(fx)clipse 2.0 [message #1705116 is a reply to message #1705079] Wed, 12 August 2015 08:41 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
It seems as if the sample you are using was meant to be used together with the SWT renderer.
There is a little bit of work to be done if you want to run it with JavaFX. See my article about Migrating E4 RCP from SWT to JavaFX.
Re: Cannot run Media Application sample under e(fx)clipse 2.0 [message #1705122 is a reply to message #1705116] Wed, 12 August 2015 09:28 Go to previous messageGo to next message
Michael Marton is currently offline Michael MartonFriend
Messages: 7
Registered: August 2015
Junior Member
Hi

Thanks for the quick reply.

I did not mean to port an SWT app to JavaFX.
I simply created a new "e4 Media Application" sample project
(New ->> JavaFX ->> Samples ->> e4 Media Application).

- the launch config contains the necessary "org.osgi.framework.bundle.parent=ext" definition (launchConfiguration.jpg)
- the target platform contains the necessary "Target Platform Feature" (targetPlatform.jpg)
- the product definition is set to "org.eclipse.fx.ui.workbench.fx.application" (productDefinition.jpg)
- there are apparently no "SWT"-dependencies (as far as I can see...)

Moreover, all settings described are unmodified (i.e. they are exactly as created initially by "New ->> e4 Media Application").

I do have an own e4 JavaFX project (no SWT), which also runs with e(fx)clipse 1.2 without problems but throws the same error
with 2.0 (thats why I initially wanted to see if the provided e4 Media Application sample project works under 2.0)

thanks

Re: Cannot run Media Application sample under e(fx)clipse 2.0 [message #1705133 is a reply to message #1705122] Wed, 12 August 2015 10:56 Go to previous messageGo to next message
Christoph Keimel is currently offline Christoph KeimelFriend
Messages: 482
Registered: December 2010
Location: Germany
Senior Member
Well, I can't say much about the samples, since I haven't tried that.

The stack trace you provide says:

Caused by: java.lang.ClassCastException: org.eclipse.fx.ui.workbench.renderers.fx.DefWindowRenderer$WWindowImpl cannot be cast to org.eclipse.swt.widgets.Widget
at org.eclipse.e4.ui.workbench.addons.dndaddon.DnDAddon.subscribeTopicWidget(DnDAddon.java:38)
...

So you are using org.eclipse.e4.ui.workbench.addons.dndaddon.DnDAddon which depends on SWT since it is trying to do a cast to org.eclipse.swt.widgets.Widget. Maybe this is the only SWT dependency, so try to remove that and see if the application starts up without DnD.

If that works you can add the DnD supoort from e(fx)clipse (attention to the package name "org.eclipse.fx" instead of "org.eclipse.e4"):

bundleclass://org.eclipse.fx.ui.workbench.renderers.base/org.eclipse.fx.ui.workbench.renderers.base.addons.DnDAddon

You probably also want to add the clean up:

bundleclass://org.eclipse.fx.ui.workbench.renderers.base/org.eclipse.fx.ui.workbench.renderers.base.addons.CleanUpAddon

Hope that helps!
Re: Cannot run Media Application sample under e(fx)clipse 2.0 [message #1705237 is a reply to message #1705133] Thu, 13 August 2015 07:59 Go to previous messageGo to next message
Michael Marton is currently offline Michael MartonFriend
Messages: 7
Registered: August 2015
Junior Member
FYI:

I checked out a fresh "RCP" version of eclipse mars, installed the tooling and adapted the runtime accordingly (as I did with the luna versions before) and everything works out-of-the-box.

I suppose the problems I faced have to do with the provided e(fx)clipse "all-in-one-build", somehow.

best regards
Michael

Re: Cannot run Media Application sample under e(fx)clipse 2.0 [message #1705254 is a reply to message #1705122] Thu, 13 August 2015 10:30 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Your target platform setup is simply wrong - you should not have the
eclipse install into your target!

Tom

On 12.08.15 11:28, Michael Marton wrote:
> Hi
>
> Thanks for the quick reply.
>
> I did not mean to port an SWT app to JavaFX.
> I simply created a new "e4 Media Application" sample project
> (New ->> JavaFX ->> Samples ->> e4 Media Application).
>
> - the launch config contains the necessary "org.osgi.framework.bundle.parent=ext" definition (launchConfiguration.jpg)
> - the target platform contains the necessary "Target Platform Feature" (targetPlatform.jpg)
> - the product definition is set to "org.eclipse.fx.ui.workbench.fx.application" (productDefinition.jpg)
> - there are apparently no "SWT"-dependencies (as far as I can see...)
>
> Moreover, all settings described are unmodified (i.e. they are exactly as created initially by "New ->> e4 Media Application").
>
> I do have an own e4 JavaFX project (no SWT), which also runs with e(fx)clipse 1.2 without problems but throws the same error
> with 2.0 (thats why I initially wanted to see if the provided e4 Media Application sample project works under 2.0)
>
> thanks
>
>
Re: Cannot run Media Application sample under e(fx)clipse 2.0 [message #1705255 is a reply to message #1705237] Thu, 13 August 2015 10:33 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
I don't think so - to me it looks like your target setup in the previous
post is simply wrong and if the Eclipse install in your target you have
a big problem because then you eg have multiple javax.annotation
provides, multiple javax.xml providers, ... and things start to blow up
as you've seen it happening.

Tom

On 13.08.15 09:59, Michael Marton wrote:
> FYI:
> I checked out a fresh "RCP" version of eclipse mars, installed the
> tooling and adapted the runtime accordingly (as I did with the luna
> versions before) and everything works out-of-the-box.
> I suppose the problems I faced have to do with the provided e(fx)clipse
> "all-in-one-build", somehow.
>
> best regards
> Michael
>
>
Re: Cannot run Media Application sample under e(fx)clipse 2.0 [message #1705265 is a reply to message #1705255] Thu, 13 August 2015 11:25 Go to previous messageGo to next message
Michael Marton is currently offline Michael MartonFriend
Messages: 7
Registered: August 2015
Junior Member
Hi

It was also my first idea that something with the target platform is wrong.
If I use the original "all-in-one" eclipse distro and create a new "e4 sample media" project (without doing any changes to the project/workspace settings), some dependencies are missing (missingDependencies.jpg).

Thats why I extended the contained "Running Platform" target with the runtime bundles from http://download.eclipse.org/efxclipse/runtime-released/2.0.0/site.
It could well be that this was the problem.

Michael
Re: Cannot run Media Application sample under e(fx)clipse 2.0 [message #1705275 is a reply to message #1705265] Thu, 13 August 2015 12:05 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
You never extend the running platform! You create a new empty one and
only add the e(fx)clipse target feature!

Tom

On 13.08.15 13:25, Michael Marton wrote:
> Hi
>
> It was also my first idea that something with the target platform is wrong.
> If I use the original "all-in-one" eclipse distro and create a new "e4 sample media" project (without doing any changes to the project/workspace settings), some dependencies are missing (missingDependencies.jpg).
>
> Thats why I extended the contained "Running Platform" target with the runtime bundles from http://download.eclipse.org/efxclipse/runtime-released/2.0.0/site.
> It could well be that this was the problem.
>
> Michael
>
Re: Cannot run Media Application sample under e(fx)clipse 2.0 [message #1705278 is a reply to message #1705275] Thu, 13 August 2015 12:22 Go to previous message
Michael Marton is currently offline Michael MartonFriend
Messages: 7
Registered: August 2015
Junior Member
Ok, now things get clearer. That might have been my fault then.

In the previous e(fx)clipse versions I always used to install the runtime and
tooling by myself (creating a separate Target, as you mentioned).
This time I thought I'll go with the "all-in-one" package to give it a quick try
(thinking that "all-in-one" means the runtime bundles are already present...).

thanks for the support
Michael

Previous Topic:WWidgetImpl.destroy() called more than once
Next Topic:e(fx)clipse 2.1.0 - Scheduled for 31st of August
Goto Forum:
  


Current Time: Fri Apr 26 00:02:33 GMT 2024

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

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

Back to the top