camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gmh <gordon...@gmail.com>
Subject Re: HMSET problem with Camel Spring Redis component
Date Thu, 11 Dec 2014 21:56:24 GMT
Okay I did something stupid..
Instead of  <setHeader headerName="CamelRedis.Values"> I did  <setHeader
headerName="CamelRedis.Value"> for hmset

But now I am having a really strange exception:

Stacktrace
---------------------------------------------------------------------------------------------------------------------------------------
java.lang.ClassCastException: java.util.ArrayList cannot be cast to
java.lang.String
        at
org.springframework.data.redis.serializer.StringRedisSerializer.serialize(StringRedisSerializer.java:32)
        at
org.springframework.data.redis.core.AbstractOperations.rawHashValue(AbstractOperations.java:145)
        at
org.springframework.data.redis.core.DefaultHashOperations.putAll(DefaultHashOperations.java:124)
        at
org.apache.camel.component.redis.RedisClient.hmset(RedisClient.java:45)
        at
org.apache.camel.component.redis.CommandDispatcher.execute(CommandDispatcher.java:136)
        at
org.apache.camel.component.redis.RedisProducer.process(RedisProducer.java:35)
        at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)

I tired to use other serializer but StringRedisSerializer will prevent wired
characters been inserted in the key when I did hmset so I had to do 

<to
uri="spring-redis://localhost:6379?command=HMSET&amp;serializer=#redisserializer"/>

Help!
Gordon



--
View this message in context: http://camel.465427.n5.nabble.com/HMSET-problem-with-Camel-Spring-Redis-component-tp5760598p5760604.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message