Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » "unknown protocol: dyndata" after upgrade to 3.1.0
"unknown protocol: dyndata" after upgrade to 3.1.0 [message #1778279] Tue, 12 December 2017 15:29 Go to next message
Selim Dincer is currently offline Selim DincerFriend
Messages: 9
Registered: November 2017
Junior Member
Hey,

We have a product that was running on efxclipse v2.3.0. I recently updated the target platform to 3.1.0 since I believe a version later than 3.0.0 is required for proper java 9 support(?).
We were using the URLDynamicDataStreamHandler to load stylesheets. After upgrading to 3.1.0 I get following exception for the URL
dyndata:bundleresource://65.fwk1206883981:1/css/customization-stylesheet.css?efx_DynamicDataHandlerId=efx_DynamicDataHandlerId&theme=theme.dark&colorCategory=bla.bla.app


java.lang.IllegalStateException: Failed to create URL 'dyndata:bundleresource://65.fwk1206883981:1/css/customization-stylesheet.css?efx_DynamicDataHandlerId=efx_DynamicDataHandlerId&theme=theme.light&colorCategory=bla.bla.app'
	at org.eclipse.fx.core.URLDynamicDataStreamHandler.createDynamicDataStreamURL(URLDynamicDataStreamHandler.java:91)

...

Caused by: java.net.MalformedURLException: unknown protocol: dyndata
	at java.net.URL.<init>(Unknown Source)
	at java.net.URL.<init>(Unknown Source)
	at java.net.URL.<init>(Unknown Source)
	at org.eclipse.fx.core.URLDynamicDataStreamHandler.createDynamicDataStreamURL(URLDynamicDataStreamHandler.java:89)


Unfortunately I couldn't find any documentation on this feature anywhere. How can I register the proper handler for the dyndata protocol?
Thanks!

Selim
Re: "unknown protocol: dyndata" after upgrade to 3.1.0 [message #1778302 is a reply to message #1778279] Tue, 12 December 2017 21:31 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6373
Registered: July 2009
Senior Member
Are you running on Java9 or Java8?
Re: "unknown protocol: dyndata" after upgrade to 3.1.0 [message #1778338 is a reply to message #1778302] Wed, 13 December 2017 09:36 Go to previous messageGo to next message
Selim Dincer is currently offline Selim DincerFriend
Messages: 9
Registered: November 2017
Junior Member
It's still running on 8u151. I wanted to get it working there before starting with 9.
Re: "unknown protocol: dyndata" after upgrade to 3.1.0 [message #1778874 is a reply to message #1778338] Fri, 22 December 2017 18:51 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6373
Registered: July 2009
Senior Member
I guess you need to debug a bit:
* Put a break-point into DynamicDataStreamHandler#getProtocol() is it called?
* When is it a called? Who calls it?

The registration should happen in "DefaultThemeManager"s constructor. Is the DefaultThemeManager instantiated?

Re: "unknown protocol: dyndata" after upgrade to 3.1.0 [message #1778973 is a reply to message #1778874] Wed, 27 December 2017 09:51 Go to previous messageGo to next message
Selim Dincer is currently offline Selim DincerFriend
Messages: 9
Registered: November 2017
Junior Member
Hey Thomas,

as you said the DefaultThemeManager calls DynamicDataStreamHandler#getProtocol() but the exception is logged before, so maybe something with the order of the registration was changed.
I will try to investigate further.

Thanks!
Re: "unknown protocol: dyndata" after upgrade to 3.1.0 [message #1779063 is a reply to message #1778973] Sun, 31 December 2017 20:04 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6373
Registered: July 2009
Senior Member
Well in 3.1 the upstream platform adopted felix-scr as the DS implementation - so yes there might be changes! I'm not really happy how the registration is done today - we should find a better way anyways in 4.0 or even 3.x
Re: "unknown protocol: dyndata" after upgrade to 3.1.0 [message #1779150 is a reply to message #1779063] Wed, 03 January 2018 09:17 Go to previous messageGo to next message
Selim Dincer is currently offline Selim DincerFriend
Messages: 9
Registered: November 2017
Junior Member
Hey Thomas,

indeed with a target platform of v3.0.0 the issue is resolved... Maybe we'll stick with this for now.

Thanks
Selim
Re: "unknown protocol: dyndata" after upgrade to 3.1.0 [message #1779165 is a reply to message #1779150] Wed, 03 January 2018 12:05 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6373
Registered: July 2009
Senior Member
3.0.0 does not fully support Java9 and we should definately find out why the URL is used before the theme-mangager has been started the URL you show indicates you load some CSS
Re: "unknown protocol: dyndata" after upgrade to 3.1.0 [message #1779177 is a reply to message #1779165] Wed, 03 January 2018 15:43 Go to previous messageGo to next message
Selim Dincer is currently offline Selim DincerFriend
Messages: 9
Registered: November 2017
Junior Member
Hey,

From the release notes it looks like only this FXCanvas is not supported? Is there anything else that is known to not work?

Is there a way to request an instance of DefaultThemeManager before the Themes are being created? I don't know who requests the creation of the themes but my idea would be to just request an instance of DefaultThemeManager before?
Re: "unknown protocol: dyndata" after upgrade to 3.1.0 [message #1779198 is a reply to message #1779177] Wed, 03 January 2018 18:24 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6373
Registered: July 2009
Senior Member
The important Java9 changes are in the platform/equinox parts we inherit from upstream projects!
Previous Topic:What replaces the PreferencesObjectSupplier?
Next Topic:DirectoryTreeView - where's the jar/maven?
Goto Forum:
  


Current Time: Thu Jan 18 04:19:55 GMT 2018

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

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