redis org.springframework.data.keyvalue.core.UncategorizedKeyValueException

greenTeaยท2023๋…„ 6์›” 18์ผ
1

๋ฌธ์ œ ๋ฐœ์ƒ

๐Ÿ˜ญredis๋ฅผ ์ด์šฉํ•ด ํ”„๋กœ์ ํŠธ๋ฅผ ๋Œ๋ฆฌ๋˜ ์ค‘ redis๋ฅผ ํŠธ๋žœ์žญ์…˜๊ณผ ๊ฐ™์ด ๋ฌถ์–ด์„œ ๋Œ๋ฆฌ๋ ค๊ณ  ํ•˜๋ฉด "org.springframework.data.redis.connection.RedisConnection.del(byte[][])" is null ๋ฌธ๊ตฌ๊ฐ€ ๋œจ๋ฉด์„œ ์—๋Ÿฌ๊ฐ€ ๋ฐœ์ƒํ•˜์˜€์Šต๋‹ˆ๋‹ค.

ํ˜„์žฌ ์ €์˜ ์ƒํ™ฉ์€ @RedisHash๋ฅผ ์ด์šฉํ•ด redisRepository๋ฅผ ํ™œ์šฉํ•˜๊ณ  ์žˆ๋Š” ์ƒํ™ฉ์ž…๋‹ˆ๋‹ค.

์›์ธ

๐Ÿค”์œ„ ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐ ํ•˜๊ธฐ ์œ„ํ•ด ๊ตฌ๊ธ€๋ง์„ ํ•œ ๊ฒฐ๊ณผ Stack Over Flow์—์„œ ๋‹ต์„ ์ฐพ์„ ์ˆ˜ ์žˆ์—ˆ์Šต๋‹ˆ๋‹ค.

RedisRepository๋Š” Transaction๊ณผ ๊ฐ™์ด ์ด์šฉํ•  ์ˆ˜ ์—†๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

๐Ÿ˜ฐ์ด์œ ๋Š” Redis๊ฐ€ ํŠธ๋žœ์žญ์…˜๊ณผ ๊ฐ™์ด ์›€์ง์ด๊ฒŒ ๋˜๋ฉด์„œ Queue์— ์ €์žฅ์„ ํ•˜๊ฒŒ ๋˜๋Š”๋ฐ ์Šคํ”„๋ง ๋ถ€ํŠธ์—์„œ๋Š” ํ•ด๋‹น ๊ฐ’์„ ์ฆ‰์‹œ ์š”๊ตฌํ•˜๊ธฐ ๋•Œ๋ฌธ์— null๊ฐ’์ด ๋‚˜์˜ค๊ฒŒ ๋˜๊ณ  ์ด๋กœ ์ธํ•ด nullPointException์ด ํ„ฐ์ง€๊ฒŒ ๋œ๋‹ค๋Š” ๊ฒƒ์ž…๋‹ˆ๋‹ค.

๐Ÿ˜ญ๋งŒ์•ฝ Redis repository๋ฅผ ์‚ฌ์šฉํ•˜์‹ ๋‹ค๋ฉด ํŠธ๋žœ์žญ์…˜์ด ์—†๋Š” ๊ณณ์—์„œ ์‚ฌ์šฉํ•˜๋ฉด ๋  ๋“ฏ ํ•ฉ๋‹ˆ๋‹ค.

์ถœ์ฒ˜ : Stack Over Flow - uncategorizedkeyvalueexception

profile
greenTea์ž…๋‹ˆ๋‹ค.

0๊ฐœ์˜ ๋Œ“๊ธ€