-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Starting executable war with -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager produces a ClassNotFoundException #12659
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
Comments
Looks like we're either missing a dependency or our documentation needs updating. Try adding the following to your POM: <dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-jul</artifactId>
</dependency> |
See #11660 which added that documentation. I wonder if there's any problem adding the dependency to the starter? |
@philwebb Adding that dependency to my pom worked. |
I can't recall if we considered adding |
I think we should add it since it's only 24kb. |
still getting exception with spring boot 2.0.3.RELEASE:
adding dependency doesn't help :(
|
As shown by the stack trace, that's a different problem to the one reported in this issue. In your case, Log4j needs to be available to the system class loader rather than the launcher class loader that Boot creates from the contents of |
Uh oh!
There was an error while loading. Please reload this page.
I would like to use Log4j2 as the logging implementation. As per the documentation here: https://docs.spring.io/spring-boot/docs/current/reference/html/howto-logging.html#howto-configure-log4j-for-logging, I have set the following system property: -Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager.
The following error is printed at startup:
Attached is a sample project that demonstrates the problem. Build it with "mvn package", unzip the log4j-war-example-1.0.0-SNAPSHOT.zip and run bin/run.sh.
I am using Spring Boot 2.0.0.
log4j-war-example.zip
The text was updated successfully, but these errors were encountered: