Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to latest Micronaut (requires solving jlink issues) #40

Open
msgilligan opened this issue Jun 8, 2023 · 1 comment
Open

Upgrade to latest Micronaut (requires solving jlink issues) #40

msgilligan opened this issue Jun 8, 2023 · 1 comment

Comments

@msgilligan
Copy link
Member

We haven't updated to Micronaut newer than 3.4.4 because (one or more) changes have been made to Micronaut that break the (BadAss) jlink portion of the build.

We need a workaround to solve that issue. (Or perhaps it will work in Micronaut 4.x)

@msgilligan
Copy link
Member Author

msgilligan commented Jun 8, 2023

With Micronaut 3.9.3 when we launch SupernautFX Hello, we get the following (simplified for readability):

NoSuchBeanException: No bean of type [ApplicationEventPublisher<StartupEvent>] exists. 

See PR #39

The full trace is:

==== Running apps/supernaut-fx-sample-hello/build/jpackage/SupernautFX Hello.app/Contents/MacOS/SupernautFX Hello
10:20:17.805 INFO    [app.supernaut.fx.FxLauncherAbstract] (app.supernaut.fx.FxLauncherAbstract launch) 
 launch... 
10:20:17.825 INFO    [app.supernaut.fx.FxLauncherAbstract] (app.supernaut.fx.FxLauncherAbstract launchBackgroundApp) 
 Launching background app on SupernautFX-Background-Launcher thread 
10:20:17.826 INFO    [app.supernaut.fx.FxLauncherAbstract] (app.supernaut.fx.FxLauncherAbstract launchForegroundApp) 
 Launching on caller's thread 
10:20:17.826 INFO    [app.supernaut.fx.FxLauncherAbstract] (app.supernaut.fx.FxLauncherAbstract startBackgroundApp) 
 Instantiating appFactory 
10:20:17.827 INFO    [app.supernaut.fx.FxLauncherAbstract] (app.supernaut.fx.FxLauncherAbstract startForegroundApp) 
 Calling Application.launch() 
10:20:17.828 INFO    [app.supernaut.fx.FxLauncherAbstract] (app.supernaut.fx.micronaut.MicronautFxLauncher$MicronautAppFactory <init>) 
 Creating Micronaut BeanContext 
10:20:17.840 INFO    [app.supernaut.fx.FxLauncherAbstract] (app.supernaut.fx.micronaut.MicronautFxLauncher$MicronautAppFactory <init>) 
 Starting context 
Exception in thread "SupernautFX-Background-Launcher" io.micronaut.context.exceptions.NoSuchBeanException: No bean of type [io.micronaut.context.event.ApplicationEventPublisher<io.micronaut.context.event.StartupEvent>] exists. Make sure the bean is not disabled by bean requirements (enable trace logging for 'io.micronaut.context.condition' to check) and if the bean is enabled then ensure the class is declared a bean and annotation processing is enabled (for Java and Kotlin the 'micronaut-inject-java' dependency should be configured as an annotation processor).
	at [email protected]/io.micronaut.context.DefaultBeanContext.resolveBeanRegistration(Unknown Source)
	at [email protected]/io.micronaut.context.DefaultBeanContext.getBean(Unknown Source)
	at [email protected]/io.micronaut.context.DefaultBeanContext.getBean(Unknown Source)
	at [email protected]/io.micronaut.context.BeanLocator.getBean(Unknown Source)
	at [email protected]/io.micronaut.context.DefaultBeanContext.publishEvent(Unknown Source)
	at [email protected]/io.micronaut.context.DefaultBeanContext.start(Unknown Source)
	at [email protected]/io.micronaut.context.DefaultBeanContext.start(Unknown Source)
	at [email protected]/app.supernaut.fx.micronaut.MicronautFxLauncher$MicronautAppFactory.<init>(Unknown Source)
	at [email protected]/app.supernaut.fx.micronaut.MicronautFxLauncher.lambda$new$0(Unknown Source)
	at [email protected]/app.supernaut.fx.FxLauncherAbstract.startBackgroundApp(Unknown Source)
	at [email protected]/app.supernaut.fx.FxLauncherAbstract.lambda$launchBackgroundApp$0(Unknown Source)
	at java.base/java.lang.Thread.run(Unknown Source)

@msgilligan msgilligan changed the title Upgrade to latest Micronaut (requires solving link issues) Upgrade to latest Micronaut (requires solving jlink issues) Jun 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant