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

log4j 2.18.0 not working #5

Open
tbnguyen1407 opened this issue Jul 25, 2022 · 0 comments
Open

log4j 2.18.0 not working #5

tbnguyen1407 opened this issue Jul 25, 2022 · 0 comments

Comments

@tbnguyen1407
Copy link

Problem

Sample not working for log4j 2.18.0

Reproduction

  1. Update log4j
~ build.gradle ~
dependencies {
    implementation 'org.apache.logging.log4j:log4j-core:2.18.0'
}
  1. Build jlink dist
./gradlew clean jlink
  1. Run
./build/image/bin/helloFX

Output

ERROR StatusLogger Unable to load services for service class org.apache.logging.log4j.spi.Provider
 java.util.ServiceConfigurationError: org.apache.logging.log4j.spi.Provider: module hellofx.merged.module does not declare `uses`
        at java.base/java.util.ServiceLoader.fail(Unknown Source)
        at java.base/java.util.ServiceLoader.checkCaller(Unknown Source)
        at java.base/java.util.ServiceLoader.<init>(Unknown Source)
        at java.base/java.util.ServiceLoader.load(Unknown Source)
        at hellofx.merged.module/org.apache.logging.log4j.util.ServiceLoaderUtil.loadClassloaderServices(Unknown Source)
        at hellofx.merged.module/org.apache.logging.log4j.util.ServiceLoaderUtil.loadServices(Unknown Source)
        at hellofx.merged.module/org.apache.logging.log4j.util.ServiceLoaderUtil.loadServices(Unknown Source)
        at hellofx.merged.module/org.apache.logging.log4j.util.ProviderUtil.<init>(Unknown Source)
        at hellofx.merged.module/org.apache.logging.log4j.util.ProviderUtil.lazyInit(Unknown Source)
        at hellofx.merged.module/org.apache.logging.log4j.util.ProviderUtil.hasProviders(Unknown Source)
        at hellofx.merged.module/org.apache.logging.log4j.LogManager.<clinit>(Unknown Source)
        at hellofx/org.openjfx.HelloFX.start(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(Unknown Source)
        at java.base/java.security.AccessController.doPrivileged(Unknown Source)
        at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(Unknown Source)
        at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
        at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(Unknown Source)
        at java.base/java.lang.Thread.run(Unknown Source)
ERROR StatusLogger Log4j2 could not find a logging implementation. Please add log4j-core to the classpath. Using SimpleLogger to log to the console...
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