NoClassDefFoundError for io/lettuce/core/ protocol/CommandArgs $StringArgument

I have a spring boot project with lettuce version 5.1.8.RELEASE as a dependency. The project was running well till now. However then suddenly the above exception is thrown.

I checked my build path and I see only Lettuce dependency - 5.1.8.RELEASE.

Exception in thread "main" java.lang.NoClassDefFoundError: io/lettuce/core/protocol/CommandArgs$StringArgument
        at io.lettuce.core.protocol.CommandArgs.add(CommandArgs.java:188)
        at io.lettuce.core.RedisCommandBuilder.xadd(RedisCommandBuilder.java:2097)
        at io.lettuce.core.AbstractRedisAsyncCommands.xadd(AbstractRedisAsyncCommands.java:1489)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at io.lettuce.core.FutureSyncInvocationHandler.handleInvocation(FutureSyncInvocationHandler.java:57)
        at io.lettuce.core.internal.AbstractInvocationHandler.invoke(AbstractInvocationHandler.java:80)
        at com.sun.proxy.$Proxy48.xadd(Unknown Source)
        at .........RedisPusher.xadd(RedisPusher.java:....) -> see xadd method in below code