Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » Strange issue with e(fx)clipse 0.9.0
Strange issue with e(fx)clipse 0.9.0 [message #1265820] Thu, 06 March 2014 15:57 Go to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 255
Registered: July 2009
Senior Member
Hi all,

I recently tried to check out the latest GEF4 bits from its development repository that has some JavaFX dependencies that are solved by relying on the exported JavaFX packages provided by the e(fx)eclipse project.

I tried to follow the documentation, and
1. Used recent Java 7 versions (1.7.0.40 and 1.7.0.51), both on OSX
2. I have added the jfxrt.jar to my JVM build path on the JVM configuration session
3. Installed e(fx)eclipse 0.9.0.201401250805
4. Restarted my Eclipse instance, and managed to compile and run the GEF4 code

However, after I have restarted again my Eclipse instance, all projects with JavaFX dependencies were showing a very strange classpath error (I noticed exactly the same issue when using 1.7.0.40):
The container 'Plug-in Dependencies' references non existing library '/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre/lib/jfxswt.jar'

I tried to find out about this missing jar file, but the only thing I found about it that it was missing from a Java 8 pre-build recently.

Can you give me some hint what am I doing wrong? I have really no idea what to check.

Thanks in advance,
Zoltán
Re: Strange issue with e(fx)clipse 0.9.0 [message #1265826 is a reply to message #1265820] Thu, 06 March 2014 16:09 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5767
Registered: July 2009
Senior Member
Somehow e(fx)clipse thinks you are running on JDK8 - there is no need to
modify any VM setting e(fx)clipse would have detected everything by itself.

jfxswt.jar has been factored out of jfxrt.jar in JDK8 so that swt
dependencies are not on the extension classpath.

Tom

On 06.03.14 16:57, Zoltan Ujhelyi wrote:
> Hi all,
>
> I recently tried to check out the latest GEF4 bits from its development
> repository that has some JavaFX dependencies that are solved by relying
> on the exported JavaFX packages provided by the e(fx)eclipse project.
>
> I tried to follow the documentation, and
> 1. Used recent Java 7 versions (1.7.0.40 and 1.7.0.51), both on OSX
> 2. I have added the jfxrt.jar to my JVM build path on the JVM
> configuration session
> 3. Installed e(fx)eclipse 0.9.0.201401250805
> 4. Restarted my Eclipse instance, and managed to compile and run the
> GEF4 code
>
> However, after I have restarted again my Eclipse instance, all projects
> with JavaFX dependencies were showing a very strange classpath error (I
> noticed exactly the same issue when using 1.7.0.40):
> The container 'Plug-in Dependencies' references non existing library
> '/Library/Java/JavaVirtualMachines/jdk1.7.0_51.jdk/Contents/Home/jre/lib/jfxswt.jar'
>
>
> I tried to find out about this missing jar file, but the only thing I
> found about it that it was missing from a Java 8 pre-build recently.
>
> Can you give me some hint what am I doing wrong? I have really no idea
> what to check.
>
> Thanks in advance,
> Zoltán
Re: Strange issue with e(fx)clipse 0.9.0 [message #1265944 is a reply to message #1265826] Thu, 06 March 2014 19:28 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 255
Registered: July 2009
Senior Member
Hi Tom,

thanks for the very quick answer. I tried to find the issue on my computer, and it seems that something does not get installed correctly in case of my main environment: if I do not add the jfxrt.jar file to the JVM classpath, a lot of compile errors are introduced; after adding it everything works fine until I restart the environment.

Even stranger, when starting a runtime Eclipse from this Kepler-based instance, I turned on the class loader debug messages with the property efxclipse.osgi.hook.debug; and it worked on the happy path of FXClassLoader (http://git.eclipse.org/c/efxclipse/org.eclipse.efxclipse.git/tree/bundles/runtime/org.eclipse.fx.osgi/src/org/eclipse/fx/osgi/fxloader/FXClassLoader.java?id=0.9.0).

I have also installed e(fx)clipse into a new, Luna-based environment, where everything seems to be working out of the box.

Do you have any idea what might have gone wrong in my case, or should I simply create a clean environment and hope for the best?

Thanks again,
Zoltán
Re: Strange issue with e(fx)clipse 0.9.0 [message #1266287 is a reply to message #1265944] Fri, 07 March 2014 08:18 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5767
Registered: July 2009
Senior Member
I have no idea :-( Is the problem reproduceable with our prebuilt
distros as well? See http://efxclipse.bestsolution.at/install.html

Tom

On 06.03.14 20:28, Zoltan Ujhelyi wrote:
> Hi Tom,
>
> thanks for the very quick answer. I tried to find the issue on my
> computer, and it seems that something does not get installed correctly
> in case of my main environment: if I do not add the jfxrt.jar file to
> the JVM classpath, a lot of compile errors are introduced; after adding
> it everything works fine until I restart the environment.
>
> Even stranger, when starting a runtime Eclipse from this Kepler-based
> instance, I turned on the class loader debug messages with the property
> efxclipse.osgi.hook.debug; and it worked on the happy path of
> FXClassLoader
> (http://git.eclipse.org/c/efxclipse/org.eclipse.efxclipse.git/tree/bundles/runtime/org.eclipse.fx.osgi/src/org/eclipse/fx/osgi/fxloader/FXClassLoader.java?id=0.9.0).
>
>
> I have also installed e(fx)clipse into a new, Luna-based environment,
> where everything seems to be working out of the box.
>
> Do you have any idea what might have gone wrong in my case, or should I
> simply create a clean environment and hope for the best?
>
> Thanks again,
> Zoltán
Re: Strange issue with e(fx)clipse 0.9.0 [message #1266333 is a reply to message #1266287] Fri, 07 March 2014 09:43 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 255
Registered: July 2009
Senior Member
Hi,

thanks again for your help. Your prebuilt installation was also working.

As a final idea, I tried to remove and reinstall E(fx)clipse again; at this time, p2 warned me that aomething is not fine, and asked me to update the b3 aggregator as well.

I don't see how was that the issue, but it seems it works now.

Thanks again,
Zoltán
icon9.gif  Me Too: Strange issue with e(fx)clipse 0.9.0 [message #1270960 is a reply to message #1265820] Thu, 13 March 2014 23:37 Go to previous messageGo to next message
Jim Klo is currently offline Jim KloFriend
Messages: 35
Registered: September 2012
Member
I've got a similar issue in the process of upgrading project that was in Juno & e(fx)clipse 0.8.0.

Just installed 4.3.2, and installed e(fx)clipse 0.9.0 via the update site, after which I created a Target Platform containing the RCP 3.x Target Platform and Zest Toolkit and SDK.

After importing the project and updating the references to the workbench3 plugins, I'm left with a bunch of problems that all seem to be related to this missing jfxswt.jar (targeting 1.7.0 update 51).

I'm not quite sure what my next steps should be. Any assistance would be greatly appreciated.

Thanks,

- Jim
Re: Me Too: Strange issue with e(fx)clipse 0.9.0 [message #1270962 is a reply to message #1270960] Thu, 13 March 2014 23:44 Go to previous messageGo to next message
Zoltan Ujhelyi is currently offline Zoltan UjhelyiFriend
Messages: 255
Registered: July 2009
Senior Member
Hi Jim,

I had a few tries installing and uninstalling e(fx)eclipse, changing the current JVM, and after quite a few times it once begin to work. Additionally, what was not clear for me first, that the jfxrt.jar from the JVM lib folder needs NOT to be added to the JVM itself.

Cheers,
Zoltán
Re: Me Too: Strange issue with e(fx)clipse 0.9.0 [message #1270980 is a reply to message #1270962] Fri, 14 March 2014 01:10 Go to previous messageGo to next message
Jim Klo is currently offline Jim KloFriend
Messages: 35
Registered: September 2012
Member
Hi Zoltán,

Thanks. I've been fiddling with installing uninstalling/installing e(fx)clipse, swapping VMS, modifying the target platform, and etc. with no success.

Oddly, so I tried deleting the all the errors (I know sounds weird) then cleaning all projects. And the template Java FXPlugin project will work, but none of my own plugins will work - can't find javafx.scene.Parent. However in both projects, if I go look at the build path - they are both still looking for that jfxswt.jar.

Best,

- JK
Re: Me Too: Strange issue with e(fx)clipse 0.9.0 [message #1271400 is a reply to message #1270980] Sat, 15 March 2014 02:41 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5767
Registered: July 2009
Senior Member
The missing of jfxswt.jar indicates that the tool thinks it is seeing a
JDK8 install!

What is your JDK version?

Tom

On 13.03.14 18:10, Jim Klo wrote:
> Hi Zoltán,
>
> Thanks. I've been fiddling with installing uninstalling/installing
> e(fx)clipse, swapping VMS, modifying the target platform, and etc. with
> no success.
>
> Oddly, so I tried deleting the all the errors (I know sounds weird) then
> cleaning all projects. And the template Java FXPlugin project will work,
> but none of my own plugins will work - can't find javafx.scene.Parent.
> However in both projects, if I go look at the build path - they are both
> still looking for that jfxswt.jar.
>
> Best,
>
> - JK
>
Re: Me Too: Strange issue with e(fx)clipse 0.9.0 [message #1271407 is a reply to message #1271400] Sat, 15 March 2014 03:06 Go to previous messageGo to next message
Jim Klo is currently offline Jim KloFriend
Messages: 35
Registered: September 2012
Member
Thomas Schindl wrote on Fri, 14 March 2014 22:41
The missing of jfxswt.jar indicates that the tool thinks it is seeing a
JDK8 install!

What is your JDK version?


Well in this instance - it's JDK 1.7 u51. I thought 0.9.0 was supposed to work with JDK 7, and 1.0.0 was JDK 8.

For giggles, I did try downloading the JDK 8 RC, which I know is scheduled for GA next week. The project compiles but has major issues. The JavaFX view we have has lots of issues. For one thing, I can't seem to get the FXViewPart to reopen after it's closed, because I can't load the FXML due to a not an FX Thread exception, which I can't seem to resolve. On top of that there's a lot of artifacts in the tree and list views that don't flush (items render multiple times on top of each other). I'm not convinced Java 8 is stable enough for us yet (considering as it is we're building an IDE for a logic language that's subject to frequent change).

Thanks!

Any ideas how to proceed? I created another thread which is more relevant to my specific issue if you'd rather respond there.


- Jim
Re: Me Too: Strange issue with e(fx)clipse 0.9.0 [message #1271581 is a reply to message #1271407] Sat, 15 March 2014 15:01 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5767
Registered: July 2009
Senior Member
On 14.03.14 20:06, Jim Klo wrote:
> Thomas Schindl wrote on Fri, 14 March 2014 22:41
>> The missing of jfxswt.jar indicates that the tool thinks it is seeing a
>> JDK8 install!
>>
>> What is your JDK version?
>
>
> Well in this instance - it's JDK 1.7 u51. I thought 0.9.0 was supposed
> to work with JDK 7, and 1.0.0 was JDK 8.

Correct! 0.9.0 should support both Java7 and 8 but it somehow
incorrectly detects the Java7 case adds jfxswt.jar

> For giggles, I did try downloading the JDK 8 RC, which I know is
> scheduled for GA next week. The project compiles but has major issues.
> The JavaFX view we have has lots of issues. For one thing, I can't seem
> to get the FXViewPart to reopen after it's closed, because I can't load
> the FXML due to a not an FX Thread exception, which I can't seem to

I think i introduce a regression in 1.0.0 in this regard! I've hopefully
fixed it with https://bugs.eclipse.org/bugs/show_bug.cgi?id=430447 -
don't know for sure before I've produced the next snapshot build - will
report back once I can confirm this is fixed.

> resolve. On top of that there's a lot of artifacts in the tree and list
> views that don't flush (items render multiple times on top of each
> other). I'm not convinced Java 8 is stable enough for us yet
> (considering as it is we're building an IDE for a logic language that's
> subject to frequent change).
> Thanks!

That's sounds bad - for me FX8 felt much more stable and mature. Does
this also happen in a pure FX or when using FXCanvas only? I don't think
you should wait until this gets fixed by itself but proactively report
this to Oracle by providing a test case.

>
> Any ideas how to proceed? I created another thread which is more
> relevant to my specific issue if you'd rather respond there.
>

Not really - I'll now try to reproduce your Java7 problem. Still
exporting directly from the IDE will still not work because FX is not on
the classpath.

My suggestion is to make use of tycho which fully supports building
JavaFX2.2 apps without modifying your JRE setup.

Tom

> - Jim
Re: Me Too: Strange issue with e(fx)clipse 0.9.0 [message #1272738 is a reply to message #1271581] Tue, 18 March 2014 16:37 Go to previous messageGo to next message
Jim Klo is currently offline Jim KloFriend
Messages: 35
Registered: September 2012
Member
Thanks for you replies/help Tom!

Thomas Schindl wrote on Sat, 15 March 2014 11:01

I think i introduce a regression in 1.0.0 in this regard! I've hopefully
fixed it with https://bugs.eclipse.org/bugs/show_bug.cgi?id=430447 -
don't know for sure before I've produced the next snapshot build - will
report back once I can confirm this is fixed.


Yes, I think that was it. I've not tried your patch yet, however, removing the jfxrt.jar from lib/ext, upon your suggestion did the trick. Thanks.

Thomas Schindl wrote on Sat, 15 March 2014 11:01

> resolve. On top of that there's a lot of artifacts in the tree and list
> views that don't flush (items render multiple times on top of each
> other). I'm not convinced Java 8 is stable enough for us yet
> (considering as it is we're building an IDE for a logic language that's
> subject to frequent change).
> Thanks!

That's sounds bad - for me FX8 felt much more stable and mature. Does
this also happen in a pure FX or when using FXCanvas only? I don't think
you should wait until this gets fixed by itself but proactively report
this to Oracle by providing a test case.


Yes, I think once I get this installer to a base place I can fiddle with J8 more and figure out what the deal is. For one thing - I can't figure out the right way to load the FXML file in the FXViewPart in createFXScene:

	@Override
	protected Scene createFxScene() {
		SplitPane queryPage = null;
		
		FXMLLoader fxmlloader = new FXMLLoader(getClass().getResource( "/ravelayout.fxml"));
		try {
//			System.err.println("IS FX Thread? "+Platform.isFxApplicationThread());
			queryPage = (SplitPane) fxmlloader.load();
			queryController = (QueryController) fxmlloader.getController();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} 
		
		Scene scene = new Scene(queryPage);
        scene.getStylesheets().add(getClass().getResource("/ravelayout.css").toString());
        scene.getStylesheets().add(getClass().getResource("/com/sri/sunflower/fxquery/controls/PopupMenu.css").toString());
//        ScenicView.show(scene);
		return scene;
	}


If I close the view and reopen it.. the call to fxmlloader.load() fails with a Not on an FX Thread exception. But even when the view does open the first time, it has issues with ListView - there's a lot of side-by-side lists and trees - click on one element the all the components reload their data; however it leaves behind a bunch of rendered artifacts now with Java8. Until I have a solution to loading the fxml file; the artifacts are a secondary concern - it could be one solution solves the other.

Thomas Schindl wrote on Sat, 15 March 2014 11:01

My suggestion is to make use of tycho which fully supports building
JavaFX2.2 apps without modifying your JRE setup.


Thanks, I've never used tycho, and have been searching for a way to do this - can you point me in the right direction to start down this?
Re: Me Too: Strange issue with e(fx)clipse 0.9.0 [message #1272752 is a reply to message #1272738] Tue, 18 March 2014 17:20 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5767
Registered: July 2009
Senior Member
On 18.03.14 09:37, Jim Klo wrote:
> Thanks for you replies/help Tom!
>
> Thomas Schindl wrote on Sat, 15 March 2014 11:01
>> I think i introduce a regression in 1.0.0 in this regard! I've hopefully
>> fixed it with https://bugs.eclipse.org/bugs/show_bug.cgi?id=430447 -
>> don't know for sure before I've produced the next snapshot build - will
>> report back once I can confirm this is fixed.
>
>
> Yes, I think that was it. I've not tried your patch yet, however,
> removing the jfxrt.jar from lib/ext, upon your suggestion did the trick.
> Thanks.
>
> Thomas Schindl wrote on Sat, 15 March 2014 11:01
>> > resolve. On top of that there's a lot of artifacts in the tree and
>> list
>> > views that don't flush (items render multiple times on top of each
>> > other). I'm not convinced Java 8 is stable enough for us yet
>> > (considering as it is we're building an IDE for a logic language that's
>> > subject to frequent change).
>> > Thanks!
>>
>> That's sounds bad - for me FX8 felt much more stable and mature. Does
>> this also happen in a pure FX or when using FXCanvas only? I don't think
>> you should wait until this gets fixed by itself but proactively report
>> this to Oracle by providing a test case.
>
>
> Yes, I think once I get this installer to a base place I can fiddle with
> J8 more and figure out what the deal is. For one thing - I can't figure
> out the right way to load the FXML file in the FXViewPart in createFXScene:
>
>
> @Override
> protected Scene createFxScene() {
> SplitPane queryPage = null;
>
> FXMLLoader fxmlloader = new FXMLLoader(getClass().getResource(
> "/ravelayout.fxml"));
> try {
> // System.err.println("IS FX Thread?
> "+Platform.isFxApplicationThread());
> queryPage = (SplitPane) fxmlloader.load();
> queryController = (QueryController) fxmlloader.getController();
> } catch (IOException e) {
> // TODO Auto-generated catch block
> e.printStackTrace();
> }
> Scene scene = new Scene(queryPage);
>
> scene.getStylesheets().add(getClass().getResource("/ravelayout.css").toString());
>
>
> scene.getStylesheets().add(getClass().getResource("/com/sri/sunflower/fxquery/controls/PopupMenu.css").toString());
>
> // ScenicView.show(scene);
> return scene;
> }
>
>
> If I close the view and reopen it.. the call to fxmlloader.load() fails
> with a Not on an FX Thread exception. But even when the view does open
> the first time, it has issues with ListView - there's a lot of
> side-by-side lists and trees - click on one element the all the
> components reload their data; however it leaves behind a bunch of
> rendered artifacts now with Java8. Until I have a solution to loading
> the fxml file; the artifacts are a secondary concern - it could be one
> solution solves the other.

The error you see at work is not that things get called on the wrong
thread but that if you close the first FXCanvas the fx-system is
shutting down.

Can you try setting Platform.setImplicitExit(false) yourself which
should fix the problem (or use the lastest nightly).

Another thing I see as a problem in your code is that you are not
setting the correct classloader to use so it should fail creating an
instance of your controller in a OSGi-Env.

>
> Thomas Schindl wrote on Sat, 15 March 2014 11:01
>> My suggestion is to make use of tycho which fully supports building
>> JavaFX2.2 apps without modifying your JRE setup.
>
>
> Thanks, I've never used tycho, and have been searching for a way to do
> this - can you point me in the right direction to start down this?

I think there are tutorials around - there would have been one yesterday
at EclipseConNA :-( I'll try to add a wizard to create a Eclipse-Plugin
setup with tycho similar to what you get executing the JavaFX => OSGi
Application one.

You can give that a try and see what the wizard generate to maybe
understand how to apply tycho.

Tom
Re: Me Too: Strange issue with e(fx)clipse 0.9.0 [message #1403470 is a reply to message #1272752] Thu, 24 July 2014 00:20 Go to previous messageGo to next message
Jim Klo is currently offline Jim KloFriend
Messages: 35
Registered: September 2012
Member
Hi Tom,

Finally getting back to this, now that Java 8 is rearing up upon me.

Where would I set the Platform.setImplicitExit(false)?

And where am I not setting the correct classloader? Could you provide an example?

Also here's a screen grab of the artifacts that I'm seeing:
https://www.evernote.com/shard/s111/sh/fc022476-2b1c-4e13-8871-02b745ebb699/bda1cb627bd8f0f7835e35139d284f51/deep/0/Cursor-and-Sunflower---Sunflower-with-Tasks.png

(direct link to screen grab: http://note.io/1mGg81n)
Not sure what is going on here but when I change the contents of this control, some artifacts seem to hang around in places that should just be empty rows.

[Updated on: Thu, 24 July 2014 00:21]

Report message to a moderator

Re: Me Too: Strange issue with e(fx)clipse 0.9.0 [message #1403517 is a reply to message #1403470] Thu, 24 July 2014 09:25 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5767
Registered: July 2009
Senior Member
On 24.07.14 02:20, Jim Klo wrote:
> Hi Tom,
>
> Finally getting back to this, now that Java 8 is rearing up upon me.
>
> Where would I set the Platform.setImplicitExit(false)?

Somewhere in your code where you create FXCanvas.

>
> And where am I not setting the correct classloader? Could you provide
> an example?
>

You need to push the classloader on FXMLLoader.

> Also here's a screen grab of the artifacts that I'm seeing:
>
>
> Not sure what is going on here but when I change the contents of this
> control, some artifacts seem to hang around in places that should just
> be empty rows.

My wild guess is that the Tree artifacts are the result from a incorrect
TreeCell implementation but I could be wrong.

Tom
Previous Topic:Drop a Part into a Part!
Next Topic:1.0.0 Release count down
Goto Forum:
  


Current Time: Sat Jul 04 16:30:40 GMT 2015

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

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