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

java.lang.IllegalStateException: Cannot resolve type description for org.slf4j.event.LoggingEvent #71

Closed
sergey-morenets opened this issue Nov 15, 2019 · 9 comments
Assignees
Labels
area/java-agent status/has-workaround This has a known workaround described type/bug A general bug

Comments

@sergey-morenets
Copy link

sergey-morenets commented Nov 15, 2019

When I try to use BlockHound library in my Spring Boot application I get this exception when calling:

BlockHound.install();

Expected Behavior

BlockHound should successfully install.

Actual Behavior

[Byte Buddy] ERROR ch.qos.logback.classic.Logger [jdk.internal.loader.ClassLoaders$AppClassLoader@14514713, unnamed module @3b220bcb, loaded=true]
java.lang.IllegalStateException: Cannot resolve type description for org.slf4j.event.LoggingEvent
	at reactor.blockhound.shaded.net.bytebuddy.pool.TypePool$Resolution$Illegal.resolve(TypePool.java:159)
	at reactor.blockhound.shaded.net.bytebuddy.pool.TypePool$Default$LazyTypeDescription$TokenizedGenericType.toErasure(TypePool.java:6241)
	at reactor.blockhound.shaded.net.bytebuddy.pool.TypePool$Default$LazyTypeDescription$LazyTypeList.get(TypePool.java:6049)
	at reactor.blockhound.shaded.net.bytebuddy.pool.TypePool$Default$LazyTypeDescription$LazyTypeList.get(TypePool.java:6022)
	at java.base/java.util.AbstractList$Itr.next(AbstractList.java:371)

Steps to Reproduce

public class SampleReactor {

	public static void main(String[] args) {
		BlockHound.install();
}
}

Your Environment

Windows 10 Pro
JDK 11.0.2
Reactor 3.3.0
BlockHound 1.0.1
Spring Boot 2.2.1

@sergey-morenets
Copy link
Author

If I use JDK 1.8.0.191 or remove reactor-tools dependency the exception still appears.

@bsideup bsideup self-assigned this Nov 20, 2019
@bsideup
Copy link
Contributor

bsideup commented Nov 20, 2019

Hi @sergey-morenets,

I just tried to run Spring Boot 2.2.1 with BlockHound 1.0.1 on JDK 11 and it did not fail.

Could you please provide a reproducer maybe?

@bsideup bsideup added area/java-agent for/user-attention This issue needs user attention (feedback, rework, etc...) type/bug A general bug labels Nov 20, 2019
@sergey-morenets
Copy link
Author

Hi @bsideup

Yes, I will try to narrow down this issue and provide a project to reproduce it.

@sergey-morenets
Copy link
Author

Hi @bsideup

I created a project to reproduce this issue: https://github.com/sergey-morenets/blockhound
If I run SampleReactor or SampleWebFlux in IDE (for example, Intellij Idea 2019.2) I get this exception.

@bsideup bsideup added status/has-workaround This has a known workaround described and removed for/user-attention This issue needs user attention (feedback, rework, etc...) labels Nov 22, 2019
@bsideup
Copy link
Contributor

bsideup commented Nov 22, 2019

@sergey-morenets
Thanks! I confirm the bug. I need to check whether the bug comes from ByteBuddy or not. Meanwhile, please add this dependency as a workaround:

<dependency>
    <groupId>org.slf4j</groupId>
    <artifactId>slf4j-api</artifactId>
    <version>1.7.29</version>
</dependency>

@bsideup
Copy link
Contributor

bsideup commented Nov 22, 2019

Looks like a bug in ByteBuddy, reported:
raphw/byte-buddy#780

@bsideup
Copy link
Contributor

bsideup commented Nov 25, 2019

@sergey-morenets do you also see that the blocking calls are not reported or it is just the annoying error log statement?

I did some testing and it seems that, despite the error message, the instrumentation works fine and the calls are reported as usual.

@sergey-morenets
Copy link
Author

Hi @bsideup

Since my application terminated because of exception I didn't check whether actual instrumentation worked as expected.

@simonbasle
Copy link
Member

closing this since the associated ByteBuddy issue has been resolved on top of original workaround

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/java-agent status/has-workaround This has a known workaround described type/bug A general bug
Projects
None yet
Development

No branches or pull requests

3 participants