Skip to content
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.

spring-boot-starter-data-redis with Lettuce should work natively #694

Closed
scalastic opened this issue Apr 1, 2021 · 3 comments
Closed

spring-boot-starter-data-redis with Lettuce should work natively #694

scalastic opened this issue Apr 1, 2021 · 3 comments
Labels
status: superseded An issue that has been superseded by another

Comments

@scalastic
Copy link

Hi,

When running a spring-native 0.9.1 app with spring-boot-starter-data-redis and Lettuce client (app code here, I get this error :

java.lang.NoSuchMethodError: io.lettuce.core.pubsub.api.sync.RedisPubSubCommands.dispatch(io.lettuce.core.protocol.ProtocolKeyword, io.lettuce.core.output.CommandOutput, io.lettuce.core.protocol.CommandArgs)
	at com.sun.proxy.$Proxy234.<clinit>(Unknown Source) ~[na:na]
	at com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:375) ~[na:na]
	at com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:295) ~[na:na]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:490) ~[na:na]
	at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:1022) ~[na:na]
	at java.lang.reflect.Proxy.newProxyInstance(Proxy.java:1008) ~[na:na]
	at io.lettuce.core.RedisChannelHandler.syncHandler(RedisChannelHandler.java:322) ~[io.scalastic.coronapubsub.virusapp.VirusappApplication:6.1.0.RELEASE]
	at io.lettuce.core.pubsub.StatefulRedisPubSubConnectionImpl.newRedisSyncCommandsImpl(StatefulRedisPubSubConnectionImpl.java:103) ~[na:na]
	at io.lettuce.core.pubsub.StatefulRedisPubSubConnectionImpl.newRedisSyncCommandsImpl(StatefulRedisPubSubConnectionImpl.java:45) ~[na:na]
	at io.lettuce.core.StatefulRedisConnectionImpl.<init>(StatefulRedisConnectionImpl.java:81) ~[na:na]
	at io.lettuce.core.pubsub.StatefulRedisPubSubConnectionImpl.<init>(StatefulRedisPubSubConnectionImpl.java:61) ~[na:na]
	at io.lettuce.core.RedisClient.newStatefulRedisPubSubConnection(RedisClient.java:641) ~[io.scalastic.coronapubsub.virusapp.VirusappApplication:6.1.0.RELEASE]
	at io.lettuce.core.RedisClient.connectPubSubAsync(RedisClient.java:417) ~[io.scalastic.coronapubsub.virusapp.VirusappApplication:6.1.0.RELEASE]
	at io.lettuce.core.RedisClient.connectPubSub(RedisClient.java:363) ~[io.scalastic.coronapubsub.virusapp.VirusappApplication:6.1.0.RELEASE]
	at org.springframework.data.redis.connection.lettuce.StandaloneConnectionProvider.getConnection(StandaloneConnectionProvider.java:109) ~[na:na]
	at org.springframework.data.redis.connection.lettuce.LettuceConnectionFactory$ExceptionTranslatingConnectionProvider.getConnection(LettuceConnectionFactory.java:1459) ~[na:na]
	at org.springframework.data.redis.connection.lettuce.LettuceConnection.switchToPubSub(LettuceConnection.java:907) ~[na:na]
	at org.springframework.data.redis.connection.lettuce.LettuceConnection.initSubscription(LettuceConnection.java:911) ~[na:na]
	at org.springframework.data.redis.connection.lettuce.LettuceConnection.subscribe(LettuceConnection.java:847) ~[na:na]
	at org.springframework.data.redis.listener.RedisMessageListenerContainer$SubscriptionTask.eventuallyPerformSubscription(RedisMessageListenerContainer.java:796) ~[na:na]
	at org.springframework.data.redis.listener.RedisMessageListenerContainer$SubscriptionTask.run(RedisMessageListenerContainer.java:752) ~[na:na]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[na:na]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[na:na]
	at java.lang.Thread.run(Thread.java:834) ~[na:na]
	at com.oracle.svm.core.thread.JavaThreads.threadStartRoutine(JavaThreads.java:519) ~[na:na]
	at com.oracle.svm.core.posix.thread.PosixJavaThreads.pthreadStartRoutine(PosixJavaThreads.java:192) ~[na:na]

According to this Lettuce documentation, Lettuce project has configured native indications for GraalVM (native-image.properties, proxy-config.json, reflect-config.json).

Does spring-native (or spring-boot-starter-data-redis) take them into account or do we have to specify something more ?

Thanks for your hard work!

@sdeleuze sdeleuze added the status: waiting-for-triage An issue we've not yet triaged or decided on label Apr 1, 2021
@mp911de
Copy link

mp911de commented Apr 6, 2021

Lettuce ships with a reflect-config.json and this ticket can be closed in favor of redis/lettuce#1710.

@scalastic
Copy link
Author

@mp911de Thanks for taking this issue into account. I'll check when the release will be published.

@sdeleuze sdeleuze added status: superseded An issue that has been superseded by another and removed status: waiting-for-triage An issue we've not yet triaged or decided on labels Apr 8, 2021
@sdeleuze sdeleuze closed this as completed Apr 8, 2021
@sdeleuze
Copy link
Contributor

sdeleuze commented Apr 8, 2021

Thanks @mp911de, I close this one as requested then.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: superseded An issue that has been superseded by another
Development

No branches or pull requests

3 participants