Could not initialize JfrConnectionCreatedEvent
See original GitHub issueBug Report
Current Behavior
Since the latest Spring 2.5.0 Update we observe a Lettuce/Redis Error on every single Request, which basically breaks our App. It is in the Stacktrace below.
We use the default Property based Autoconfiguration. Spring 2.4.5 worked perfectly fine. Has something changed that i am not aware of?
Stack trace
Unhandled Exception in Controller, returning: HTTP 500 INTERNAL_SERVER_ERROR
org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class io.lettuce.core.event.connection.JfrConnectionCreatedEvent
Expected behavior/code
It should work fine like it did with Spring 2.4.5.
Environment
- spring-boot-starter-data-redis: 2.5.0
Any help/hint is greatly appreciated
Issue Analytics
- State:
- Created 2 years ago
- Comments:24 (8 by maintainers)
Top Results From Across the Web
Getting exception NoClassDefFoundError when connecting to ...
I'm new to java. Trying to connect to Redis with Lettuce. Environment: openjdk - 15.0.1, Lettuce-core-6.0.1.
Read more >LettuceConnectionFactory (Spring Data Redis 3.0.0 API)
Indicates shared connections should be eagerly initialized. String. getHostName(). Returns the current host. io.lettuce.core.AbstractRedisClient.
Read more >lettuce-io/lettuce-core 6.1.3.RELEASE on GitHub
Introduce API to allow for extending RedisClusterClient and its connections #1754; Could not initialize JfrConnectionCreatedEvent #1767 ...
Read more >Could not initialize JfrConnectionCreatedEvent - Codesti
It should work fine like it did with Spring 2.4.5. Environment. spring-boot-starter-data-redis: 2.5.0. Any help/hint is greatly appreciated.
Read more >Lettuce Reference Guide
methods are now blocking to await pool initialization. ... However, there are some cases you should not share a connection among threads to ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For visibility, adding
--add-reads=jdk.jfr=ALL-UNNAMED
to your JVM args will resolve the issue. TBD if this is something that needs to be permanent or addressed in future agent release.The property is a system property. Spring Boot’s application properties are not system properties. If you do not have access to system properties I suggest setting the system property in your
main
method before invokingSpringApplication.run(…)
.