spring-data-redis

Caused by: java.lang.IllegalArgumentException: CONTAINING (1): [IsContaining, Containing, Contains]is not supported for redis query derivation - Redis

こ雲淡風輕ζ 提交于 2019-12-01 13:10:39
问题 I'm developing Spring Boot + Redis example. In this example, I've developed some custom methods which pull details based on RoleName. For the below method userRepository.findByRole_RoleName("ADMIN") or userRepository.findByMiddleNameContaining("Li"); , we're getting the below exception. The reference URL: https://docs.spring.io/spring-data/keyvalue/docs/1.2.15.RELEASE/reference/html/ Could anyone please provider pointers ? All the other methods are working fine. But just this method causing

Could not connect to Redis at 10.XX.XX.28:6379: Unknown error - while accessing from Spring Batch or windows machine

佐手、 提交于 2019-12-01 12:49:39
I have followed all the steps from link: https://linuxtechlab.com/how-install-redis-server-linux/ and using below linux version. uname -a Linux ech-10-XX-XX-28 2.6.32-696.13.2.el6.x86_64 #1 SMP Thu Oct 5 17:03:21 PDT 2017 x86_64 x86_64 x86_64 GNU/Linux This is installed somewhere on cloud on virtual machine and from local windows machine I am trying to access the redis getting below error mentioned here: nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool . My Windows machine: C:\Softwares\redis-2.4.5-win32-win64\64bit>redis-cli

How to model Data in Redis for values Complex Data structure?

喜你入骨 提交于 2019-12-01 07:54:55
I've taken a reference of the link : http://panuoksala.blogspot.com/2015/09/redis-many-to-many.html to developed below code. I've implemented some code, looks like nothing is achievable so far as Get User 1 groups: hget User:1 Groups Does not yeild the results. I wanted to get answer more from the Data Modelling perspectives. I've modeled code like below, but its not working as per my requirement - Group.java @Builder @Data @AllArgsConstructor @NoArgsConstructor @RedisHash("groups") public class Group { @Id private Long groupId; private String name; private List<User> users; } And User.java

Spring Redis - Indexes not deleted after main entry expires

一曲冷凌霜 提交于 2019-11-30 23:59:59
问题 I am saving new entries with a Spring Data Repository. I have a TTL of 10 seconds for each entry. When I save an entry with indexes, here is what i get in Redis 127.0.0.1:6379> keys * 1) "job:campaignId:aa" 2) "job:a6d6e491-5d75-4fd0-bd8e-71692f6d18be" 3) "job:recipient:dd" 4) "job:a6d6e491-5d75-4fd0-bd8e-71692f6d18be:phantom" 5) "job:listId:cc" 6) "job:accountId:bb" 7) "job" 8) "job:a6d6e491-5d75-4fd0-bd8e-71692f6d18be:idx" After the expiration, I still have data : 127.0.0.1:6379> keys * 1)

nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool

一个人想着一个人 提交于 2019-11-30 09:08:28
问题 I already went through many links like Jedis, Cannot get jedis connection: cannot get resource from pool and Cannot get Jedis connection; Could not get a resource from the pool, but still getting the below error. I am using Spring Data Redis in Spring Batch and reading data from mysql and writing to redis DB. It seems some connection errors. The error below for reference. 2018-07-19 00:08:46 DEBUG o.s.t.support.TransactionTemplate - Initiating transaction rollback on application exception org

Redis Serialization and Deserialization

痞子三分冷 提交于 2019-11-30 05:25:22
I have noticed that some of my serialized objects stored in Redis have problems deserializing. This typically occurs when I make changes to the object class being stored in Redis. I want to understand the problem so that I can have a clear design for a solution. My question is, what causes deserialization problems? Would a removal of a public/private property cause a problem? Adding new properties, perhaps? Would a adding a new function to the class create problems? How about more constructors? In my serialized object, I have a property Map, what if I change (updated some properties, added

nested exception is redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool

懵懂的女人 提交于 2019-11-29 12:47:25
I already went through many links like Jedis, Cannot get jedis connection: cannot get resource from pool and Cannot get Jedis connection; Could not get a resource from the pool , but still getting the below error. I am using Spring Data Redis in Spring Batch and reading data from mysql and writing to redis DB. It seems some connection errors. The error below for reference. 2018-07-19 00:08:46 DEBUG o.s.t.support.TransactionTemplate - Initiating transaction rollback on application exception org.springframework.data.redis.RedisConnectionFailureException: Cannot get Jedis connection; nested

Redis Serialization and Deserialization

旧城冷巷雨未停 提交于 2019-11-29 05:05:32
问题 I have noticed that some of my serialized objects stored in Redis have problems deserializing. This typically occurs when I make changes to the object class being stored in Redis. I want to understand the problem so that I can have a clear design for a solution. My question is, what causes deserialization problems? Would a removal of a public/private property cause a problem? Adding new properties, perhaps? Would a adding a new function to the class create problems? How about more

Cannot get connection for redisTemplate for Spring data redis

流过昼夜 提交于 2019-11-27 22:31:02
I'm trying to publish a message to a channel using Spring data Redis using Jedis. Here is a very simple Java config: @Bean(name="jedisConnectionFactory") JedisConnectionFactory jedisConnectionFactory() { JedisConnectionFactory factory = new JedisConnectionFactory(); factory.setHostName(redisHostName); factory.setPort(redisPort); factory.setUsePool(true); return factory; } @Bean(name="redisTemplate") RedisTemplate<Object, Object> redisTemplate() { RedisTemplate<Object, Object> redisTemplate = new RedisTemplate<Object, Object>(); redisTemplate.setConnectionFactory(jedisConnectionFactory());

Jedis, Cannot get jedis connection: cannot get resource from pool

跟風遠走 提交于 2019-11-27 16:25:16
问题 I have seen answers in couple of threads but didn't work out for me and since my problem occurs occasionally, asking this question if any one has any idea. I am using jedis version 2.8.0, Spring Data redis version 1.7.5. and redis server version 2.8.4 for our caching application. I have multiple cache that gets saved in redis and get request is done from redis. I am using spring data redis APIs to save and get data. All save and get works fine, but getting below exception occasionally: Cannot