Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » e(fx)clipse » building e4+javafx application with tycho(error building a simple e4-javafx application with tycho)
building e4+javafx application with tycho [message #1717857] Thu, 17 December 2015 12:23 Go to next message
Paul Mira is currently offline Paul MiraFriend
Messages: 8
Registered: December 2015
Junior Member
Hi,

I'm using tycho/maven build to export a simple e4+javafx application, generated following the tutorial at : Efxclipse/Tutorials/Tutorial4

the entire project structure gets generated by the project wizard, and I get the usual

  • fx.mars.project.app.app
  • fx.mars.project.app.feature
  • fx.mars.project.app.product
  • fx.mars.project.app.releng

projects. What I plan to do specifically to build the application is this :

  1. go to the pom.xml of the releng project (which is the parent pom) and execute "clean package" maven goal
  2. build the buld.xml file

Step 1 fails with the following error :
Installation failed.
Cannot complete the install because one or more required items could not be found.
 Software being installed: EKS MARS Product 1.0.2 (fx.mars.project.app.product 1.0.2)
 Missing requirement for filter properties ~= $0: fx.mars.project.app.product.executable.noenv.noenv.noenv 1.0.2 requires 'org.eclipse.equinox.launcher.noenv.noenv.noenv 0.0.0' but it could not be found
 Cannot satisfy dependency:
  From: EKS MARS Product 1.0.2 (fx.mars.project.app.product 1.0.2)
  To: toolingfx.mars.project.app.product.application [1.0.2]
 Cannot satisfy dependency:
  From: toolingfx.mars.project.app.product.application 1.0.2
  To: fx.mars.project.app.product.executable.noenv.noenv.noenv [1.0.2]
Application failed, log file location: C:\Users\JPATRICE\AppData\Local\Temp\tycho8448792623365606509equinox\config\1450352991114.log


my application is running fine within eclipse.

I'm a little bit new to this, so any help would be much appreciated. Thanks

Re: building e4+javafx application with tycho [message #1717858 is a reply to message #1717857] Thu, 17 December 2015 12:33 Go to previous messageGo to next message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2902
Registered: July 2012
Senior Member
did you configure the environment you are building for in the parent POM?
Re: building e4+javafx application with tycho [message #1717859 is a reply to message #1717857] Thu, 17 December 2015 12:33 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Hi,

I think the problem is because of versioning. This is just a wild guess
but I guess the pom.xml-version for your product needs to match the
version in .product.

The first thing I'd try is to create a new project structure (in another
workspace) and immediately run the "mvn clean package" if this succeeds
try modifying the version in your product to 1.0.2. If it then starts
failing you know the root cause ;-)

Tom

On 17.12.15 13:23, Paul Mira wrote:
> Hi,
>
> I'm using tycho/maven build to export a simple e4+javafx application,
> generated following the tutorial at : Efxclipse/Tutorials/Tutorial4
>
> the entire project structure gets generated by the project wizard, and I
> get the usual
> fx.mars.project.app.app
> fx.mars.project.app.feature
> fx.mars.project.app.product
> fx.mars.project.app.releng
>
> projects. What I plan to do specifically to build the application is
> this :
> go to the pom.xml of the releng project (which is the parent pom) and
> execute "clean package" maven goal
> build the buld.xml file
>
> Step 1 fails with the following error : Installation failed.
> Cannot complete the install because one or more required items could not
> be found.
> Software being installed: EKS MARS Product 1.0.2
> (fx.mars.project.app.product 1.0.2)
> Missing requirement for filter properties ~= $0:
> fx.mars.project.app.product.executable.noenv.noenv.noenv 1.0.2 requires
> 'org.eclipse.equinox.launcher.noenv.noenv.noenv 0.0.0' but it could not
> be found
> Cannot satisfy dependency:
> From: EKS MARS Product 1.0.2 (fx.mars.project.app.product 1.0.2)
> To: toolingfx.mars.project.app.product.application [1.0.2]
> Cannot satisfy dependency:
> From: toolingfx.mars.project.app.product.application 1.0.2
> To: fx.mars.project.app.product.executable.noenv.noenv.noenv [1.0.2]
> Application failed, log file location:
> C:\Users\JPATRICE\AppData\Local\Temp\tycho8448792623365606509equinox\config\1450352991114.log
>
>
> my application is running fine within eclipse.
>
> I'm a little bit new to this, so any help would be much appreciated. Thanks
>
>
Re: building e4+javafx application with tycho [message #1717865 is a reply to message #1717858] Thu, 17 December 2015 12:53 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
you don't do that if you want to deploy via java-packager hence the
noenv.noenv as you don't have to deploy any OS-Dependent artifacts!

Tom

On 17.12.15 13:33, Dirk Fauth wrote:
> did you configure the environment you are building for in the parent POM?
Re: building e4+javafx application with tycho [message #1717922 is a reply to message #1717865] Thu, 17 December 2015 17:51 Go to previous messageGo to next message
Paul Mira is currently offline Paul MiraFriend
Messages: 8
Registered: December 2015
Junior Member
Thanks everyone,

I was able to get through this by unchecking "the product includes native launcher artifacts" in the general information section of the product configuration file. I also matched all the versions in the pom.xml files to the feature.xml versions just in case, as suggested by Tom. Now the export works fine and I get a working product generated.
Another problem though. I usually launch my application from the command line, with this
java -jar plugins\org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
so I can use the console to view the System output. In this case, this doesn't work, and I get this error
!ENTRY org.eclipse.equinox.app 4 0 2015-12-17 18:31:26.719
!MESSAGE javafx/application/Application
!STACK 0
java.lang.NoClassDefFoundError: javafx/application/Application
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
	at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
	at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	at org.eclipse.fx.ui.workbench.fx.E4Application.getJfxApplicationClass(E4Application.java:322)
	at org.eclipse.fx.ui.workbench.fx.E4Application.launchE4JavaFxApplication(E4Application.java:307)
	at org.eclipse.fx.ui.workbench.fx.E4Application.start(E4Application.java:111)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:26)
	at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application cannot be found by org.eclipse.fx.ui.workbench.fx_2.2.0.201512170703
	at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
	at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
	at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
	... 20 more

in the log file

Note : launching the application by double-clicking the generated .exe works fine. Any Idea?
Re: building e4+javafx application with tycho [message #1717923 is a reply to message #1717922] Thu, 17 December 2015 18:07 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
Yes if you launch with Java you need to reconfigure Equinox-Classloader
hiearchies with java -Dorg.osgi.framework.bundle.parent=ext ....

Tom


On 17.12.15 18:51, Paul Mira wrote:
> Thanks everyone,
> I was able to get through this by unchecking "the product includes
> native launcher artifacts" in the general information section of the
> product configuration file. I also matched all the versions in the
> pom.xml files to the feature.xml versions just in case, as suggested by
> Tom. Now the export works fine and I get a working product generated.
> Another problem though. I usually launch my application from the command
> line, with this java -jar
> plugins\org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar so I can
> use the console to view the System output. In this case, this doesn't
> work, and I get this error !ENTRY org.eclipse.equinox.app 4 0 2015-12-17
> 18:31:26.719
> !MESSAGE javafx/application/Application
> !STACK 0
> java.lang.NoClassDefFoundError: javafx/application/Application
> at java.lang.ClassLoader.defineClass1(Native Method)
> at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
> at
> org.eclipse.osgi.internal.loader.ModuleClassLoader.defineClass(ModuleClassLoader.java:272)
>
> at
> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.defineClass(ClasspathManager.java:632)
>
> at
> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findClassImpl(ClasspathManager.java:588)
>
> at
> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClassImpl(ClasspathManager.java:540)
>
> at
> org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:527)
>
> at
> org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:324)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:327)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:402)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
>
> at
> org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> at
> org.eclipse.fx.ui.workbench.fx.E4Application.getJfxApplicationClass(E4Application.java:322)
>
> at
> org.eclipse.fx.ui.workbench.fx.E4Application.launchE4JavaFxApplication(E4Application.java:307)
>
> at
> org.eclipse.fx.ui.workbench.fx.E4Application.start(E4Application.java:111)
> at
> org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
>
> at
> org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:26)
>
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.lang.ClassNotFoundException:
> javafx.application.Application cannot be found by
> org.eclipse.fx.ui.workbench.fx_2.2.0.201512170703
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:439)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:352)
>
> at
> org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:344)
>
> at
> org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:160)
>
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> ... 20 more
>
> in the log file
>
> Note : launching the application by double-clicking the generated .exe
> works fine. Any Idea?
Re: building e4+javafx application with tycho [message #1717926 is a reply to message #1717923] Thu, 17 December 2015 18:37 Go to previous messageGo to next message
Paul Mira is currently offline Paul MiraFriend
Messages: 8
Registered: December 2015
Junior Member
Thank you very much Tom, it worked. I also added a few dependencies (org.eclipse.fx.osgi, org.eclise.fx.javafx, ...) to the feature.xml (feature project) again, just in case. Now everything works fine

[Updated on: Thu, 17 December 2015 18:38]

Report message to a moderator

Re: building e4+javafx application with tycho [message #1717933 is a reply to message #1717926] Thu, 17 December 2015 20:13 Go to previous message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 6651
Registered: July 2009
Senior Member
They are not needed any more in 2.x! No classloader hooking if you
reconfigure equinox to use a sensible classloader hierarchy ;-)

Tom

On 17.12.15 19:37, Paul Mira wrote:
> Thank you very much Tom, it worked. I also added a few dependencies to
> my features.xml (org.eclipse.fx.osgi, org.eclise.fx.javafx, ...) again,
> just in case. Now everything works fine
Previous Topic:R5 repo requirement indexing - osgi.ds
Next Topic:JavaFX Codeeditors: Asciidoc demo?
Goto Forum:
  


Current Time: Tue Apr 23 10:59:50 GMT 2024

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

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

Back to the top