[ 
https://issues.apache.org/jira/browse/LOG4J2-2241?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16385346#comment-16385346
 ] 

Ralph Goers commented on LOG4J2-2241:
-------------------------------------

I tried building the example but it failed with the errors below. However, I 
have a couple of observations:
1. The errors you show have nothing to do with SLF4J. The failure happens 
trying to create LogManager.
2. The error is trying in your example looks like a duplicate of LOG4J2-2129, 
which is fixed in both release-2.x and master. Please try one of those and see 
if the error still occurs.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.gradle.internal.reflect.JavaMethod 
(file:/Users/rgoers/.gradle/wrapper/dists/gradle-4.0-bin/3p92xsbhik5vmig8i90n16yxc/gradle-4.0/lib/gradle-base-services-4.0.jar)
 to method java.lang.ClassLoader.getPackages()
WARNING: Please consider reporting this to the maintainers of 
org.gradle.internal.reflect.JavaMethod
WARNING: Use --illegal-access=warn to enable warnings of further illegal 
reflective access operations
WARNING: All illegal access operations will be denied in a future release

> Task :compileJava
/Users/rgoers/projects/github/rgoers/lbe/src/main/java/module-info.java:1: 
error: file should be on source path, or on patch path for module
module com.example.lbe {
^
/Users/rgoers/projects/github/rgoers/lbe/src/main/java/com/example/lbe/App.java:1:
 error: file should be on source path, or on patch path for module
package com.example.lbe;
^
2 errors


FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug 
option to get more log output.

BUILD FAILED in 1s
1 actionable task: 1 executed

> log4j-slf4j-impl does not provide slf4j with the service provider with Java 9
> -----------------------------------------------------------------------------
>
>                 Key: LOG4J2-2241
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-2241
>             Project: Log4j 2
>          Issue Type: Bug
>          Components: SLF4J Bridge
>    Affects Versions: 2.10.0
>            Reporter: Joshua Popoff
>            Priority: Blocker
>
> log4j-slf4j-impl does not 
> {noformat}
> provides org.slf4j.spi.SLF4JServiceProvider with 
> org.apache.logging.slf4j.SLF4JServiceProvider;{noformat}
> (due to no module-info.java, and only an automatic module name, in the 
> log4j-slf4j-impl project.
> When ran:
> {noformat}
> SLF4J: No SLF4J providers were found.
> SLF4J: Defaulting to no-operation (NOP) logger implementation
> SLF4J: See http://www.slf4j.org/codes.html#noProviders for further details.
> SLF4J: Class path contains SLF4J bindings targeting slf4j-api versions prior 
> to 1.8.
> SLF4J: Ignoring binding found at 
> [jar:file://[redacted]/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
> SLF4J: See http://www.slf4j.org/codes.html#ignoredBindings for an explanation.
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to