eclipse-efx / efxclipse-rt

Eclipse Public License 1.0
28 stars 29 forks source link

Exception in Application start method(It is e4 with javafx application, When I am launching my application then I am getting below problem. Please help...) #48

Closed inamaurya closed 7 years ago

inamaurya commented 7 years ago

eclipse.buildId=unknown java.version=1.8.0_121 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -product com.bosch.composeandconfigure.app.product -clearPersistedState Command-line arguments: -product com.bosch.composeandconfigure.app.product -data C:\Users\MJU1KOR\workspace_demo_running/../runtime-com.bosch.composeandconfigure.app.product -dev file:C:/Users/MJU1KOR/workspace_demo_running/.metadata/.plugins/org.eclipse.pde.core/com.bosch.composeandconfigure.app.product.product/dev.properties -os win32 -ws win32 -arch x86 -consoleLog -clearPersistedState

!ENTRY org.eclipse.equinox.app 4 0 2017-03-23 16:54:17.846 !MESSAGE Exception in Application start method !STACK 0 java.lang.RuntimeException: Exception in Application start method at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182) at java.lang.Thread.run(Thread.java:745) Caused by: org.eclipse.e4.core.di.InjectionException: Unable to process "LoggerProviderImpl.factory": no actual value was found for the argument "LoggerFactory".

tomsontom commented 7 years ago

Is it running the nightly build or the latest release? Is this really the complete stack-trace? I doubt that.

inamaurya commented 7 years ago

I used "e(fx)clipse - Runtime - Updatesite - http://download.eclipse.org/efxclipse/runtime-released/2.4.0/site" as target.

inamaurya commented 7 years ago

Please find Complete stack trace below:

!SESSION 2017-03-31 11:42:23.329 ----------------------------------------------- eclipse.buildId=unknown java.version=1.8.0_121 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.equinox.app 4 0 2017-03-31 11:42:30.666 !MESSAGE Exception in Application start method !STACK 0 java.lang.RuntimeException: Exception in Application start method at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:917) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$155(LauncherImpl.java:182) at java.lang.Thread.run(Thread.java:745) Caused by: org.eclipse.e4.core.di.InjectionException: Unable to process "LoggerProviderImpl.factory": no actual value was found for the argument "LoggerFactory". at org.eclipse.e4.core.internal.di.InjectorImpl.reportUnresolvedArgument(InjectorImpl.java:424) at org.eclipse.e4.core.internal.di.InjectorImpl.resolveRequestorArgs(InjectorImpl.java:415) at org.eclipse.e4.core.internal.di.InjectorImpl.inject(InjectorImpl.java:110) at org.eclipse.e4.core.internal.di.InjectorImpl.internalMake(InjectorImpl.java:345) at org.eclipse.e4.core.internal.di.InjectorImpl.make(InjectorImpl.java:264) at org.eclipse.e4.core.contexts.ContextInjectionFactory.make(ContextInjectionFactory.java:162) at org.eclipse.fx.ui.workbench.base.AbstractE4Application.createApplicationContext(AbstractE4Application.java:454) at org.eclipse.fx.ui.workbench.fx.E4Application.initE4Workbench(E4Application.java:274) at org.eclipse.fx.ui.workbench.fx.E4Application$1.run(E4Application.java:153) 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$162(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191) ... 1 more

tomsontom commented 7 years ago

It's next to impossible to get this exception because there's always a ILoggerFactory available unless you are not running with DS. Is Equinox-DS running? You can do the following:

inamaurya commented 7 years ago

Sorry, I am beginner for this topic. So please can you explain where I will use $BUNDLE_ID?

tomsontom commented 7 years ago

To me it looks like you have not used the generated .launch-File but created your own one because a typical startup looks like this:

!SESSION 2017-03-31 10:23:07.423 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_121
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_AT
Framework arguments:  -product test.app.product
Command-line arguments:  -product test.app.product -data /Users/tomschindl/Documents/e-workspaces/forumSTAR/../runtime-test.app.product -dev file:/Users/tomschindl/Documents/e-workspaces/forumSTAR/.metadata/.plugins/org.eclipse.pde.core/test.app.product.product/dev.properties -consoleLog

I also think you have still not shown the complete exception stacktrace because there somewhere has to be the IApplication#start() method but I can not see that

tomsontom commented 7 years ago

Need to correct me - it looks like you are running the application "appropriately" your initial log shows the corect arguments, your second does not

tomsontom commented 7 years ago

This is how a successful launch looks like and shows you the ss and ls commands

!SESSION 2017-03-31 10:36:39.559 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_121
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=de_AT
Framework arguments:  -product test.app.product
Command-line arguments:  -product test.app.product -data /Users/tomschindl/Documents/e-workspaces/forumSTAR/../runtime-test.app.product -dev file:/Users/tomschindl/Documents/e-workspaces/forumSTAR/.metadata/.plugins/org.eclipse.pde.core/test.app.product.product/dev.properties -consoleLog -console

!ENTRY org.eclipse.equinox.ds 1 0 2017-03-31 10:36:40.384
!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]
osgi> 
!ENTRY org.eclipse.equinox.ds 1 0 2017-03-31 10:36:41.024
!MESSAGE Could not bind a reference of component test.app.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]

!ENTRY org.eclipse.equinox.ds 1 0 2017-03-31 10:36:41.056
!MESSAGE Could not bind a reference of component org.eclipse.fx.core.internal.DefaultValueSerializer. The reference is: Reference[name = registerProvider, interface = org.eclipse.fx.core.ValueSerializer$ValueSerializeProvider, policy = static, policy-option = greedy, cardinality = 0..n, target = null, bind = registerProvider, unbind = unregisterProvider, updated = null]

osgi> ss org.eclipse.fx.core
"Framework is launched."

id  State       Bundle
125 ACTIVE      org.eclipse.fx.core_3.0.0.201703271206
126 RESOLVED    org.eclipse.fx.core.databinding_3.0.0.201703271206
127 RESOLVED    org.eclipse.fx.core.di_3.0.0.201703271206
128 ACTIVE      org.eclipse.fx.core.di.context_3.0.0.201703271206
129 RESOLVED    org.eclipse.fx.core.fxml_3.0.0.201703271206
osgi> ls 125
Components in bundle org.eclipse.fx.core: 
ID  State           Component Name          Located in bundle
13  Active      org.eclipse.fx.core.internal.JAXBObjectSerializer           org.eclipse.fx.core(bid=125)
14  Active      org.eclipse.fx.core.adapter.internal.AdapterServiceImpl         org.eclipse.fx.core(bid=125)
15  Active      org.eclipse.fx.core.internal.JUtilLoggerFactory         org.eclipse.fx.core(bid=125)
16  Registered      org.eclipse.fx.core.internal.OSGiEventBusImpl           org.eclipse.fx.core(bid=125)
17  Active      org.eclipse.fx.core.internal.TplURLDynamicDataStreamHandler         org.eclipse.fx.core(bid=125)
18  Active      org.eclipse.fx.core.internal.DefaultValueSerializer         org.eclipse.fx.core(bid=125)
19  Registered      org.eclipse.fx.core.internal.FileSystemServiceImpl          org.eclipse.fx.core(bid=125)
20  Active      org.eclipse.fx.core.internal.DynamicDataStreamHandler           org.eclipse.fx.core(bid=125)
21  Registered      org.eclipse.fx.core.cache.internal.SimpleMapCacheFactory            org.eclipse.fx.core(bid=125)
osgi> ss org.eclipse.equinox.ds
"Framework is launched."

id  State       Bundle
118 ACTIVE      org.eclipse.equinox.ds_1.4.400.v20160226-2036
osgi> 
inamaurya commented 7 years ago

!SESSION 2017-03-31 14:30:32.084 ----------------------------------------------- eclipse.buildId=unknown java.version=1.8.0_121 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -product com.bosch.composeandconfigure.app.product Command-line arguments: -product com.bosch.composeandconfigure.app.product -data C:\Users\MJU1KOR\workspace_demo_running/../runtime-com.bosch.composeandconfigure.app.product -dev file:C:/Users/MJU1KOR/workspace_demo_running/.metadata/.plugins/org.eclipse.pde.core/com.bosch.composeandconfigure.app.product.product/dev.properties -os win32 -ws win32 -arch x86 -consoleLog

!ENTRY org.eclipse.equinox.ds 1 0 2017-03-31 14:30:32.877 !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 2017-03-31 14:30:33.209 !MESSAGE Could not bind a reference of component com.bosch.composeandconfigure.app.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]

tomsontom commented 7 years ago

Is it still not working? I see that you did not add the -console -noexitparameters in your launch configuration

inamaurya commented 7 years ago

When I running in eclipse then it is working properly but after exporting the product then I am facing the issue.

tomsontom commented 7 years ago

How do you export your application? You should use the generated pom.xml and maven-tycho. I'm closing this issue because there's nothing to fix for us.

Reopen if you think otherwise.

inamaurya commented 7 years ago

Ok Thanks!!