Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Bundle org.eclipse.fx.osgi not found :-((Encountering some errors when creating first Eclipse RCP JavaFX based App )
icon9.gif  Bundle org.eclipse.fx.osgi not found :-( [message #1729259] Tue, 12 April 2016 13:01 Go to next message
Bob Bobson is currently offline Bob BobsonFriend
Messages: 13
Registered: April 2016
Junior Member
Hi Everyone,

Apologies in advance if this is a rookie mistake but i have encountered some a problem writing my first eclipse rcp application using JavaFX.

By following several tutorials i got a got a basic application, with a few buttons in a main window, working no problem.

I then wanted to play around with using JavaFX themes and so followed this tutorial

efxclipse-1-2-0-themes-are-osgi-services (can't link due to no messages Sad ) .

Unfortunately it didn't work and I now get the following messages in my console:

!ENTRY org.eclipse.osgi 4 0 2016-04-12 13:26:28.966
!MESSAGE Bundle org.eclipse.fx.osgi not found.

!ENTRY org.eclipse.equinox.ds 1 0 2016-04-12 13:26:29.514
!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 2016-04-12 13:26:29.900
!MESSAGE Could not bind a reference of component org.eclipse.fx.ui.theme.internal.DefaultThemeManager. The reference is: Reference[name = registerTheme, interface = org.eclipse.fx.ui.services.theme.Theme, policy = static, policy-option = greedy, cardinality = 0..n, target = null, bind = registerTheme, unbind = unregisterTheme, updated = null]
Apr 12, 2016 1:26:30 PM org.eclipse.fx.ui.workbench.fx.PartRenderingEngine <init>
INFO: No current theme is set


Some googling suggested possible solutions. One was to unsure -Dosgi.framework.extensions=org.eclipse.fx.osgi was set in the product launch (it is). The other suggested i check that the org.eclipse.fx.osgi fragment was in the correct place for a local archive. But this doesn't seem relevant as my target platform uses the 2.3.0 update site.

Any help or suggestion would be appreciated!
Re: Bundle org.eclipse.fx.osgi not found :-( [message #1729313 is a reply to message #1729259] Tue, 12 April 2016 19:11 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6320
Registered: July 2009
Senior Member
Well somehow you don't contribute a theme hence? Did you generated the
application using the tooling? Is there a Theme-Instance and is it
contributed to as a DS-Service?

Tom

On 12.04.16 19:17, Bob Bobson wrote:
> Hi Everyone,
>
> Apologies in advance if this is a rookie mistake but i have encountered
> some a problem writing my first eclipse rcp application using JavaFX.
>
> By following several tutorials i got a got a basic application, with a
> few buttons in a main window, working no problem.
>
> I then wanted to play around with using JavaFX themes and so followed
> this tutorial
> efxclipse-1-2-0-themes-are-osgi-services (can't link due to no messages
> :( ) .
>
> Unfortunately it didn't work and I now get the following messages in my
> console:
>
>
> !ENTRY org.eclipse.osgi 4 0 2016-04-12 13:26:28.966
> !MESSAGE Bundle org.eclipse.fx.osgi not found.
>
> !ENTRY org.eclipse.equinox.ds 1 0 2016-04-12 13:26:29.514
> !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 2016-04-12 13:26:29.900
> !MESSAGE Could not bind a reference of component
> org.eclipse.fx.ui.theme.internal.DefaultThemeManager. The reference is:
> Reference[name = registerTheme, interface =
> org.eclipse.fx.ui.services.theme.Theme, policy = static, policy-option =
> greedy, cardinality = 0..n, target = null, bind = registerTheme, unbind
> = unregisterTheme, updated = null]
> Apr 12, 2016 1:26:30 PM
> org.eclipse.fx.ui.workbench.fx.PartRenderingEngine <init>
> INFO: No current theme is set
>
>
> Some googling suggested possible solutions. One was to unsure
> -Dosgi.framework.extensions=org.eclipse.fx.osgi was set in the product
> launch (it is). The other suggested i check that the
> org.eclipse.fx.osgi fragment was in the correct place for a local
> archive. But this doesn't seem relevant as my target platform uses the
> 2.3.0 update site.
>
> Any help or suggestion would be appreciated!
>
Re: Bundle org.eclipse.fx.osgi not found :-( [message #1729343 is a reply to message #1729313] Wed, 13 April 2016 09:17 Go to previous messageGo to next message
Bob Bobson is currently offline Bob BobsonFriend
Messages: 13
Registered: April 2016
Junior Member
Hi Tom,

I'm I built up the application following http://www.vogella.com/tutorials/EclipseRCP/article.html and then ported it to using JavaFX rendering.

I provide a default theme implementation:

public class DefaultTheme extends AbstractTheme
{

	/**
	 * TODOC
	 *
	 * @param id
	 * @param name
	 * @param baseStylesheetUrl
	 */
	public DefaultTheme()
	{
		super("default", "Default Theme", DefaultTheme.class.getClassLoader().getResource("default.css"));

		System.out.println("Theme created");
	}

}


And define it as a DS service using:

<scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0" name="org.example.gui.themes.default">
   <implementation class="org.example.gui.themes.DefaultTheme"/>
   <reference
     bind="registerStylesheet"
     cardinality="0..n"
     interface="org.eclipse.fx.ui.services.theme.Stylesheet"
     name="Stylesheet"
     policy="dynamic"
     unbind="unregisterStylesheet"/>
</scr:component>


I know from debugging that an instance of DefaultTheme is indeed created and "Theme created" appears in the console.
Re: Bundle org.eclipse.fx.osgi not found :-( [message #1729344 is a reply to message #1729343] Wed, 13 April 2016 09:20 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6320
Registered: July 2009
Senior Member
You better start with our wizard and
https://wiki.eclipse.org/Efxclipse/Tutorials/Tutorial4 this should give
you appropriately configured e4 setup

Tom

On 13.04.16 11:17, Bob Bobson wrote:
> Hi Tom,
>
> I'm I built up the application following
> http://www.vogella.com/tutorials/EclipseRCP/article.html and then ported
> it to using JavaFX rendering.
>
> I provide a default theme implementation:
>
>
> public class DefaultTheme extends AbstractTheme
> {
>
> /**
> * TODOC
> *
> * @param id
> * @param name
> * @param baseStylesheetUrl
> */
> public DefaultTheme()
> {
> super("default", "Default Theme",
> DefaultTheme.class.getClassLoader().getResource("default.css"));
>
> System.out.println("Theme created");
> }
>
> }
>
>
> And define it as a DS service using:
>
>
> <scr:component xmlns:scr="http://www.osgi.org/xmlns/scr/v1.1.0"
> name="org.example.gui.themes.default">
> <implementation class="org.example.gui.themes.DefaultTheme"/>
> <reference
> bind="registerStylesheet"
> cardinality="0..n"
> interface="org.eclipse.fx.ui.services.theme.Stylesheet"
> name="Stylesheet"
> policy="dynamic"
> unbind="unregisterStylesheet"/>
> </scr:component>
>
>
> I know from debugging that an instance of DefaultTheme is indeed created
> and "Theme created" appears in the console.
Re: Bundle org.eclipse.fx.osgi not found :-( [message #1729599 is a reply to message #1729344] Fri, 15 April 2016 19:05 Go to previous messageGo to next message
Bob Bobson is currently offline Bob BobsonFriend
Messages: 13
Registered: April 2016
Junior Member
Ok, rebuilding my entire application to use projects setup by the wizard did solve the problem. I spent ages comparing the configuration of my original plugins to those created by the wizard. No idea what the difference was but at least its now working!
Re: Bundle org.eclipse.fx.osgi not found :-( [message #1729601 is a reply to message #1729599] Fri, 15 April 2016 19:13 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6320
Registered: July 2009
Senior Member
For sure it is only a very very small detail (eg the bundle is not
marked lazy, ...).

Anyways the wizard now even brought you a headless build, so you are now
in a good shape to really develop your application in a professional way!

Tom

On 15.04.16 21:05, Bob Bobson wrote:
> Ok, rebuilding my entire application to use projects setup by the wizard
> did solve the problem. I spent ages comparing the configuration of my
> original plugins to those created by the wizard. No idea what the
> difference was but at least its now working!
Re: Bundle org.eclipse.fx.osgi not found :-( [message #1729632 is a reply to message #1729601] Sat, 16 April 2016 11:20 Go to previous message
Bob Bobson is currently offline Bob BobsonFriend
Messages: 13
Registered: April 2016
Junior Member
Yup, definitely an improvement Smile Thanks for the help!
Previous Topic:TreeItem problem in JavaxFX with EMF Edit
Next Topic:Restart Service not starting application after build
Goto Forum:
  


Current Time: Sun Jun 25 20:59:11 GMT 2017

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

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