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

slf4j-log4j12-1.7.6 and log4j-over-slf4j-1.7.7 both present in classpath generate error "Detected both log4j-over-slf4j.jar AND slf4j-log4j12.jar on the class path, preempting StackOverflowError" #45

Open
tfrancart opened this issue Aug 3, 2021 · 2 comments

Comments

@tfrancart
Copy link

image

This should not happen : http://www.slf4j.org/codes.html
This prevents deployment on Tomcat.

log4j-over-slf4j is coming from spring-boot-starter, this dependency should probably be excluded.

@tfrancart
Copy link
Author

Proposed fix in pom.xml, which solves the issue:

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-integration</artifactId>
			<version>1.1.4.RELEASE</version>
			<exclusions>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>log4j-over-slf4j</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

Strangely enough, the original problem is not triggered in Tomcat8.5 on Windows, but was triggered on Tomcat8 on Ubuntu

@oddek
Copy link

oddek commented Sep 9, 2021

Proposed fix in pom.xml, which solves the issue:

		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-starter-integration</artifactId>
			<version>1.1.4.RELEASE</version>
			<exclusions>
				<exclusion>
					<groupId>org.slf4j</groupId>
					<artifactId>log4j-over-slf4j</artifactId>
				</exclusion>
			</exclusions>
		</dependency>

Strangely enough, the original problem is not triggered in Tomcat8.5 on Windows, but was triggered on Tomcat8 on Ubuntu

Thanks a lot. This fixes it for Tomcat 9 on Ubuntu as well

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

2 participants