title: spring-data-redis redisTemplate Exception
body: <p>When I call get() method, an exception occured</p>
  
  <p>here is the code</p>
  
  <pre><code>@Service("RedisService")
  public class RedisServiceImpl implements RedisService {
  
  @Autowired
  RedisTemplate&lt;String, Long&gt; redisTemplate;
  
  @Override
  public Long get(String key) {
      return redisTemplate.opsForValue().get(key);
  }
  
  @Override
  public Long incrBy(String key, long increment) {
      return redisTemplate.opsForValue().increment(key, increment);
  }
  </code></pre>
  
  <p>when I use incrBy method, there are no exceptions but only errors only get method <br>
  <br><br><br><br><br>
  here is the stacktrace ---</p>
  
  <pre><code>java.io.EOFException
      at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2280)
      at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2749)
      at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:779)
      at java.io.ObjectInputStream.&lt;init&gt;(ObjectInputStream.java:279)
      at org.springframework.core.serializer.DefaultDeserializer.deserialize(DefaultDeserializer.java:38)
      at org.springframework.core.serializer.support.DeserializingConverter.convert(DeserializingConverter.java:58)
      at org.springframework.core.serializer.support.DeserializingConverter.convert(DeserializingConverter.java:1)
      at org.springframework.data.redis.serializer.JdkSerializationRedisSerializer.deserialize(JdkSerializationRedisSerializer.java:40)
      at org.springframework.data.redis.core.AbstractOperations.deserializeValue(AbstractOperations.java:198)
      at org.springframework.data.redis.core.AbstractOperations$ValueDeserializingRedisCallback.doInRedis(AbstractOperations.java:50)
      at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:162)
      at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:133)
      at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:84)
      at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:42)
      at net.daum.air21.bot.common.service.RedisServiceImpl.get(RedisServiceImpl.java:29)
      at net.daum.air21.bot.user.service.SeraCoffeeServiceImpl.getCurrentCount(SeraCoffeeServiceImpl.java:41)
  </code></pre>