diff --git a/build.gradle b/build.gradle index f3dedf0f3e..80042a85af 100644 --- a/build.gradle +++ b/build.gradle @@ -125,6 +125,7 @@ configure(javaprojects) { springAmqpVersion = '1.0.0.RC2' springDataMongoVersion = '1.0.0.BUILD-SNAPSHOT' springDataCommonsVersion = '1.2.0.BUILD-SNAPSHOT' + springDataRedisVersion = '1.0.0.BUILD-SNAPSHOT' springSecurityVersion = '3.0.5.RELEASE' springWsVersion = '2.0.2.RELEASE' @@ -333,6 +334,16 @@ project('spring-integration-mongodb') { } } +project('spring-integration-redis') { + description = 'Spring Integration Redis Support' + dependencies { + compile project(":spring-integration-core") + compile "org.springframework:spring-context:$springVersion" + compile "org.springframework.data:spring-data-redis:$springDataRedisVersion" + compile "org.springframework.data:spring-data-commons-core:$springDataCommonsVersion" + } +} + project('spring-integration-rmi') { description = 'Spring Integration RMI Support' dependencies { diff --git a/settings.gradle b/settings.gradle index 8138a6daab..beda24d73e 100644 --- a/settings.gradle +++ b/settings.gradle @@ -31,6 +31,7 @@ include 'spring-integration-jms' include 'spring-integration-jmx' include 'spring-integration-mail' include 'spring-integration-mongodb' +include 'spring-integration-redis' include 'spring-integration-rmi' include 'spring-integration-security' include 'spring-integration-sftp' diff --git a/spring-integration-redis/jredis.log b/spring-integration-redis/jredis.log new file mode 100644 index 0000000000..2412d1df46 --- /dev/null +++ b/spring-integration-redis/jredis.log @@ -0,0 +1,556 @@ +2011-07-19 16:08:49,351 DEBUG [org.springframework.test.context.junit4.SpringJUnit4ClassRunner] - SpringJUnit4ClassRunner constructor called with [class org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests]. +2011-07-19 16:08:49,377 INFO [org.springframework.test.context.TestContextManager] - @TestExecutionListeners is not present for class [class org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests]: using defaults. +2011-07-19 16:08:49,394 DEBUG [org.springframework.test.context.junit4.SpringJUnit4ClassRunner] - SpringJUnit4ClassRunner constructor called with [class org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests]. +2011-07-19 16:08:49,394 INFO [org.springframework.test.context.TestContextManager] - @TestExecutionListeners is not present for class [class org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests]: using defaults. +2011-07-19 16:08:49,705 DEBUG [org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer] - Postpone listening for Redis messages until actual listeners are added +2011-07-19 16:08:54,705 DEBUG [org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer] - Started RedisMessageListenerContainer +2011-07-19 16:08:54,728 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved @ProfileValueSourceConfiguration [null] for test class [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests] +2011-07-19 16:08:54,729 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests] +2011-07-19 16:08:54,729 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved @ProfileValueSourceConfiguration [null] for test class [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests] +2011-07-19 16:08:54,729 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests] +2011-07-19 16:08:54,730 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved @ProfileValueSourceConfiguration [null] for test class [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests] +2011-07-19 16:08:54,730 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests] +2011-07-19 16:08:54,735 DEBUG [org.springframework.test.context.support.DependencyInjectionTestExecutionListener] - Performing dependency injection for test context [[TestContext@d78ec testClass = RedisOutboundChannelAdapterParserTests, locations = array['classpath:/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml'], testInstance = org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests@7df472, testMethod = [null], testException = [null]]]. +2011-07-19 16:08:54,736 DEBUG [org.springframework.test.context.support.AbstractGenericContextLoader] - Loading ApplicationContext for locations [classpath:/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml]. +2011-07-19 16:08:54,839 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml] +2011-07-19 16:08:54,865 DEBUG [org.springframework.beans.factory.xml.DefaultDocumentLoader] - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl] +2011-07-19 16:08:54,902 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loading schema mappings from [META-INF/spring.schemas] +2011-07-19 16:08:54,904 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loaded schema mappings: {http://www.springframework.org/schema/redis/spring-redis-1.0.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/redis/spring-redis.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration-1.0.xsd=org/springframework/integration/config/xml/spring-integration-1.0.xsd, http://www.springframework.org/schema/integration/spring-integration-2.0.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd} +2011-07-19 16:08:54,908 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/beans/spring-beans.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.0.xsd +2011-07-19 16:08:55,000 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/spring-integration-2.0.xsd] in classpath: org/springframework/integration/config/xml/spring-integration-2.0.xsd +2011-07-19 16:08:55,088 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd] in classpath: org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd +2011-07-19 16:08:55,117 DEBUG [org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader] - Loading bean definitions +2011-07-19 16:08:55,134 DEBUG [org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver] - Loaded NamespaceHandler mappings: {http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler, http://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler, http://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler, http://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler, http://www.springframework.org/schema/oxm=org.springframework.oxm.config.OxmNamespaceHandler, http://www.springframework.org/schema/redis=org.springframework.data.keyvalue.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/integration/redis=org.springframework.integration.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler, http://www.springframework.org/schema/integration=org.springframework.integration.config.xml.IntegrationNamespaceHandler, http://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler, http://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler, http://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler} +2011-07-19 16:08:55,193 DEBUG [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loaded 8 bean definitions from location pattern [classpath:/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml] +2011-07-19 16:08:55,213 INFO [org.springframework.context.support.GenericApplicationContext] - Refreshing org.springframework.context.support.GenericApplicationContext@9a5d54: startup date [Tue Jul 19 16:08:55 EDT 2011]; root of context hierarchy +2011-07-19 16:08:55,214 DEBUG [org.springframework.context.support.GenericApplicationContext] - Bean factory for org.springframework.context.support.GenericApplicationContext@9a5d54: org.springframework.beans.factory.support.DefaultListableBeanFactory@549f0e: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,sendChannel,org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0,outboundAdapter,org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0,receiveChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor]; root of factory hierarchy +2011-07-19 16:08:55,255 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' +2011-07-19 16:08:55,255 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' +2011-07-19 16:08:55,282 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' to allow for resolving potential circular references +2011-07-19 16:08:55,283 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' +2011-07-19 16:08:55,340 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:55,341 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:55,341 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' to allow for resolving potential circular references +2011-07-19 16:08:55,341 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:55,341 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created. +2011-07-19 16:08:55,342 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created. +2011-07-19 16:08:55,348 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' +2011-07-19 16:08:55,348 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' +2011-07-19 16:08:55,349 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' to allow for resolving potential circular references +2011-07-19 16:08:55,349 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' +2011-07-19 16:08:55,349 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' +2011-07-19 16:08:55,349 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' +2011-07-19 16:08:55,350 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' to allow for resolving potential circular references +2011-07-19 16:08:55,350 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' +2011-07-19 16:08:55,352 DEBUG [org.springframework.context.support.GenericApplicationContext] - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@125fac] +2011-07-19 16:08:55,356 DEBUG [org.springframework.context.support.GenericApplicationContext] - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@158bbe] +2011-07-19 16:08:55,357 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@549f0e: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,sendChannel,org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0,outboundAdapter,org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0,receiveChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy +2011-07-19 16:08:55,357 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:55,358 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'sendChannel' +2011-07-19 16:08:55,358 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'sendChannel' +2011-07-19 16:08:55,361 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'sendChannel' to allow for resolving potential circular references +2011-07-19 16:08:55,383 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'sendChannel' +2011-07-19 16:08:55,383 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'sendChannel' +2011-07-19 16:08:55,383 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' +2011-07-19 16:08:55,383 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' +2011-07-19 16:08:55,407 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'redisConnectionFactory' +2011-07-19 16:08:55,407 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'redisConnectionFactory' +2011-07-19 16:08:55,421 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'redisConnectionFactory' to allow for resolving potential circular references +2011-07-19 16:08:55,426 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'redisConnectionFactory' +2011-07-19 16:08:55,428 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'redisConnectionFactory' +2011-07-19 16:08:55,434 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' to allow for resolving potential circular references +2011-07-19 16:08:55,437 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'testConverter' +2011-07-19 16:08:55,437 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'testConverter' +2011-07-19 16:08:55,437 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'testConverter' to allow for resolving potential circular references +2011-07-19 16:08:55,442 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'testConverter' +2011-07-19 16:08:55,442 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' +2011-07-19 16:08:55,442 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'outboundAdapter' +2011-07-19 16:08:55,443 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'outboundAdapter' +2011-07-19 16:08:55,446 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'outboundAdapter' to allow for resolving potential circular references +2011-07-19 16:08:55,450 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' +2011-07-19 16:08:55,460 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'outboundAdapter' +2011-07-19 16:08:55,460 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'sendChannel' +2011-07-19 16:08:55,461 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'outboundAdapter' +2011-07-19 16:08:55,462 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0' +2011-07-19 16:08:55,462 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0' +2011-07-19 16:08:55,462 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'redisConnectionFactory' +2011-07-19 16:08:55,464 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0' to allow for resolving potential circular references +2011-07-19 16:08:55,474 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'receiveChannel' +2011-07-19 16:08:55,474 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'receiveChannel' +2011-07-19 16:08:55,475 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'receiveChannel' to allow for resolving potential circular references +2011-07-19 16:08:55,482 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'receiveChannel' +2011-07-19 16:08:55,482 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'receiveChannel' +2011-07-19 16:08:55,482 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0' +2011-07-19 16:08:55,485 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@549f0e: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,sendChannel,org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0,outboundAdapter,org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0,receiveChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy +2011-07-19 16:08:55,486 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Retrieved dependent beans for bean 'redisConnectionFactory': [org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0] +2011-07-19 16:08:55,486 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Retrieved dependent beans for bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0': [outboundAdapter] +2011-07-19 16:08:55,486 DEBUG [org.springframework.beans.factory.support.DisposableBeanAdapter] - Invoking destroy() on bean with name 'redisConnectionFactory' +2011-07-19 16:08:55,489 ERROR [org.springframework.test.context.TestContextManager] - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@2bc418] to prepare test instance [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests@7df472] +java.lang.IllegalStateException: Failed to load ApplicationContext + at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:308) + at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109) + at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75) + at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:321) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:220) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:301) + at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:303) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240) + at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) + at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) + at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) + at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) + at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) + at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) + at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) + at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) + at org.junit.runners.ParentRunner.run(ParentRunner.java:236) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) + at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) + at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) + at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) + at org.apache.maven.surefire.Surefire.run(Surefire.java:177) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) + at java.lang.reflect.Method.invoke(Method.java:585) + at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) + at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: java.lang.String.getBytes(Ljava/nio/charset/Charset;)[B + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) + at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) + at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84) + at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:1) + at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:280) + at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:304) + ... 28 more +Caused by: java.lang.NoSuchMethodError: java.lang.String.getBytes(Ljava/nio/charset/Charset;)[B + at org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer.serialize(StringRedisSerializer.java:54) + at org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer.serialize(StringRedisSerializer.java:32) + at org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer.addListener(RedisMessageListenerContainer.java:451) + at org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer.addMessageListener(RedisMessageListenerContainer.java:377) + at org.springframework.integration.redis.inbound.RedisInboundChannelAdapter.onInit(RedisInboundChannelAdapter.java:77) + at org.springframework.integration.context.IntegrationObjectSupport.afterPropertiesSet(IntegrationObjectSupport.java:98) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) + ... 41 more +2011-07-19 16:08:55,495 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved @ProfileValueSourceConfiguration [null] for test class [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests] +2011-07-19 16:08:55,495 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests] +2011-07-19 16:08:55,495 DEBUG [org.springframework.test.context.support.DependencyInjectionTestExecutionListener] - Performing dependency injection for test context [[TestContext@d78ec testClass = RedisOutboundChannelAdapterParserTests, locations = array['classpath:/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml'], testInstance = org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests@145315, testMethod = [null], testException = [null]]]. +2011-07-19 16:08:55,495 DEBUG [org.springframework.test.context.support.AbstractGenericContextLoader] - Loading ApplicationContext for locations [classpath:/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml]. +2011-07-19 16:08:55,496 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml] +2011-07-19 16:08:55,498 DEBUG [org.springframework.beans.factory.xml.DefaultDocumentLoader] - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl] +2011-07-19 16:08:55,501 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loading schema mappings from [META-INF/spring.schemas] +2011-07-19 16:08:55,503 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loaded schema mappings: {http://www.springframework.org/schema/redis/spring-redis-1.0.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/redis/spring-redis.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration-1.0.xsd=org/springframework/integration/config/xml/spring-integration-1.0.xsd, http://www.springframework.org/schema/integration/spring-integration-2.0.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd} +2011-07-19 16:08:55,547 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/beans/spring-beans.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.0.xsd +2011-07-19 16:08:55,582 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/spring-integration-2.0.xsd] in classpath: org/springframework/integration/config/xml/spring-integration-2.0.xsd +2011-07-19 16:08:55,614 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd] in classpath: org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd +2011-07-19 16:08:55,625 DEBUG [org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader] - Loading bean definitions +2011-07-19 16:08:55,627 DEBUG [org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver] - Loaded NamespaceHandler mappings: {http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler, http://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler, http://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler, http://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler, http://www.springframework.org/schema/oxm=org.springframework.oxm.config.OxmNamespaceHandler, http://www.springframework.org/schema/redis=org.springframework.data.keyvalue.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/integration/redis=org.springframework.integration.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler, http://www.springframework.org/schema/integration=org.springframework.integration.config.xml.IntegrationNamespaceHandler, http://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler, http://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler, http://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler} +2011-07-19 16:08:55,629 DEBUG [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loaded 8 bean definitions from location pattern [classpath:/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml] +2011-07-19 16:08:55,637 INFO [org.springframework.context.support.GenericApplicationContext] - Refreshing org.springframework.context.support.GenericApplicationContext@5aa997: startup date [Tue Jul 19 16:08:55 EDT 2011]; root of context hierarchy +2011-07-19 16:08:55,637 DEBUG [org.springframework.context.support.GenericApplicationContext] - Bean factory for org.springframework.context.support.GenericApplicationContext@5aa997: org.springframework.beans.factory.support.DefaultListableBeanFactory@e3e4c5: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,sendChannel,org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0,outboundAdapter,org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0,receiveChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor]; root of factory hierarchy +2011-07-19 16:08:55,639 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' +2011-07-19 16:08:55,639 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' +2011-07-19 16:08:55,639 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' to allow for resolving potential circular references +2011-07-19 16:08:55,639 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' +2011-07-19 16:08:55,669 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:55,669 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:55,670 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' to allow for resolving potential circular references +2011-07-19 16:08:55,670 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:55,670 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created. +2011-07-19 16:08:55,670 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created. +2011-07-19 16:08:55,672 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' +2011-07-19 16:08:55,672 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' +2011-07-19 16:08:55,672 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' to allow for resolving potential circular references +2011-07-19 16:08:55,672 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' +2011-07-19 16:08:55,673 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' +2011-07-19 16:08:55,673 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' +2011-07-19 16:08:55,673 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' to allow for resolving potential circular references +2011-07-19 16:08:55,673 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' +2011-07-19 16:08:55,673 DEBUG [org.springframework.context.support.GenericApplicationContext] - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@40c4d5] +2011-07-19 16:08:55,674 DEBUG [org.springframework.context.support.GenericApplicationContext] - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@3aab44] +2011-07-19 16:08:55,675 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@e3e4c5: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,sendChannel,org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0,outboundAdapter,org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0,receiveChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy +2011-07-19 16:08:55,675 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:55,675 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'sendChannel' +2011-07-19 16:08:55,675 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'sendChannel' +2011-07-19 16:08:55,676 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'sendChannel' to allow for resolving potential circular references +2011-07-19 16:08:55,677 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'sendChannel' +2011-07-19 16:08:55,677 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'sendChannel' +2011-07-19 16:08:55,677 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' +2011-07-19 16:08:55,677 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' +2011-07-19 16:08:55,677 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'redisConnectionFactory' +2011-07-19 16:08:55,677 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'redisConnectionFactory' +2011-07-19 16:08:55,678 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'redisConnectionFactory' to allow for resolving potential circular references +2011-07-19 16:08:55,678 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'redisConnectionFactory' +2011-07-19 16:08:55,678 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'redisConnectionFactory' +2011-07-19 16:08:55,680 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' to allow for resolving potential circular references +2011-07-19 16:08:55,681 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'testConverter' +2011-07-19 16:08:55,681 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'testConverter' +2011-07-19 16:08:55,682 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'testConverter' to allow for resolving potential circular references +2011-07-19 16:08:55,682 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'testConverter' +2011-07-19 16:08:55,682 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' +2011-07-19 16:08:55,682 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'outboundAdapter' +2011-07-19 16:08:55,682 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'outboundAdapter' +2011-07-19 16:08:55,683 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'outboundAdapter' to allow for resolving potential circular references +2011-07-19 16:08:55,683 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0' +2011-07-19 16:08:55,684 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'outboundAdapter' +2011-07-19 16:08:55,684 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'sendChannel' +2011-07-19 16:08:55,684 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'outboundAdapter' +2011-07-19 16:08:55,684 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0' +2011-07-19 16:08:55,684 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0' +2011-07-19 16:08:55,684 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'redisConnectionFactory' +2011-07-19 16:08:55,686 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0' to allow for resolving potential circular references +2011-07-19 16:08:55,686 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'receiveChannel' +2011-07-19 16:08:55,686 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'receiveChannel' +2011-07-19 16:08:55,687 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'receiveChannel' to allow for resolving potential circular references +2011-07-19 16:08:55,687 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'receiveChannel' +2011-07-19 16:08:55,687 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'receiveChannel' +2011-07-19 16:08:55,688 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0' +2011-07-19 16:08:55,688 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@e3e4c5: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,sendChannel,org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0,outboundAdapter,org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0,receiveChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy +2011-07-19 16:08:55,688 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Retrieved dependent beans for bean 'redisConnectionFactory': [org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0] +2011-07-19 16:08:55,688 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Retrieved dependent beans for bean 'org.springframework.integration.redis.outbound.RedisPublishingMessageHandler#0': [outboundAdapter] +2011-07-19 16:08:55,688 DEBUG [org.springframework.beans.factory.support.DisposableBeanAdapter] - Invoking destroy() on bean with name 'redisConnectionFactory' +2011-07-19 16:08:55,688 ERROR [org.springframework.test.context.TestContextManager] - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@2bc418] to prepare test instance [org.springframework.integration.redis.config.RedisOutboundChannelAdapterParserTests@145315] +java.lang.IllegalStateException: Failed to load ApplicationContext + at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:308) + at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109) + at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75) + at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:321) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:220) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:301) + at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:303) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240) + at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) + at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) + at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) + at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) + at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) + at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) + at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) + at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) + at org.junit.runners.ParentRunner.run(ParentRunner.java:236) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) + at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) + at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) + at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) + at org.apache.maven.surefire.Surefire.run(Surefire.java:177) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) + at java.lang.reflect.Method.invoke(Method.java:585) + at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) + at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.redis.inbound.RedisInboundChannelAdapter#0': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: java.lang.String.getBytes(Ljava/nio/charset/Charset;)[B + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) + at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) + at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84) + at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:1) + at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:280) + at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:304) + ... 28 more +Caused by: java.lang.NoSuchMethodError: java.lang.String.getBytes(Ljava/nio/charset/Charset;)[B + at org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer.serialize(StringRedisSerializer.java:54) + at org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer.serialize(StringRedisSerializer.java:32) + at org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer.addListener(RedisMessageListenerContainer.java:451) + at org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer.addMessageListener(RedisMessageListenerContainer.java:377) + at org.springframework.integration.redis.inbound.RedisInboundChannelAdapter.onInit(RedisInboundChannelAdapter.java:77) + at org.springframework.integration.context.IntegrationObjectSupport.afterPropertiesSet(IntegrationObjectSupport.java:98) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) + ... 41 more +2011-07-19 16:08:55,698 DEBUG [org.springframework.test.context.support.DirtiesContextTestExecutionListener] - After test class: context [[TestContext@d78ec testClass = RedisOutboundChannelAdapterParserTests, locations = array['classpath:/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml'], testInstance = [null], testMethod = [null], testException = [null]]], dirtiesContext [false]. +2011-07-19 16:08:55,704 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved @ProfileValueSourceConfiguration [null] for test class [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests] +2011-07-19 16:08:55,705 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests] +2011-07-19 16:08:55,705 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved @ProfileValueSourceConfiguration [null] for test class [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests] +2011-07-19 16:08:55,705 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests] +2011-07-19 16:08:55,706 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved @ProfileValueSourceConfiguration [null] for test class [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests] +2011-07-19 16:08:55,707 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests] +2011-07-19 16:08:55,707 DEBUG [org.springframework.test.context.support.DependencyInjectionTestExecutionListener] - Performing dependency injection for test context [[TestContext@932892 testClass = RedisInboundChannelAdapterParserTests, locations = array['classpath:/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml'], testInstance = org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests@4cab63, testMethod = [null], testException = [null]]]. +2011-07-19 16:08:55,707 DEBUG [org.springframework.test.context.support.AbstractGenericContextLoader] - Loading ApplicationContext for locations [classpath:/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml]. +2011-07-19 16:08:55,710 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml] +2011-07-19 16:08:55,712 DEBUG [org.springframework.beans.factory.xml.DefaultDocumentLoader] - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl] +2011-07-19 16:08:55,713 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loading schema mappings from [META-INF/spring.schemas] +2011-07-19 16:08:55,763 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loaded schema mappings: {http://www.springframework.org/schema/redis/spring-redis-1.0.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/redis/spring-redis.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration-1.0.xsd=org/springframework/integration/config/xml/spring-integration-1.0.xsd, http://www.springframework.org/schema/integration/spring-integration-2.0.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd} +2011-07-19 16:08:55,764 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/beans/spring-beans.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.0.xsd +2011-07-19 16:08:55,784 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd] in classpath: org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd +2011-07-19 16:08:55,787 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/spring-integration-2.0.xsd] in classpath: org/springframework/integration/config/xml/spring-integration-2.0.xsd +2011-07-19 16:08:55,826 DEBUG [org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader] - Loading bean definitions +2011-07-19 16:08:55,830 DEBUG [org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver] - Loaded NamespaceHandler mappings: {http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler, http://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler, http://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler, http://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler, http://www.springframework.org/schema/oxm=org.springframework.oxm.config.OxmNamespaceHandler, http://www.springframework.org/schema/redis=org.springframework.data.keyvalue.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/integration/redis=org.springframework.integration.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler, http://www.springframework.org/schema/integration=org.springframework.integration.config.xml.IntegrationNamespaceHandler, http://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler, http://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler, http://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler} +2011-07-19 16:08:55,831 DEBUG [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loaded 6 bean definitions from location pattern [classpath:/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml] +2011-07-19 16:08:55,832 INFO [org.springframework.context.support.GenericApplicationContext] - Refreshing org.springframework.context.support.GenericApplicationContext@881734: startup date [Tue Jul 19 16:08:55 EDT 2011]; root of context hierarchy +2011-07-19 16:08:55,832 DEBUG [org.springframework.context.support.GenericApplicationContext] - Bean factory for org.springframework.context.support.GenericApplicationContext@881734: org.springframework.beans.factory.support.DefaultListableBeanFactory@61daf0: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,adapter,receiveChannel,testErrorChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor]; root of factory hierarchy +2011-07-19 16:08:55,833 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' +2011-07-19 16:08:55,834 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' +2011-07-19 16:08:55,834 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' to allow for resolving potential circular references +2011-07-19 16:08:55,835 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' +2011-07-19 16:08:55,841 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:55,841 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:55,842 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' to allow for resolving potential circular references +2011-07-19 16:08:55,842 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:55,842 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created. +2011-07-19 16:08:55,842 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created. +2011-07-19 16:08:55,844 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' +2011-07-19 16:08:55,844 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' +2011-07-19 16:08:55,844 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' to allow for resolving potential circular references +2011-07-19 16:08:55,844 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' +2011-07-19 16:08:55,845 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' +2011-07-19 16:08:55,845 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' +2011-07-19 16:08:55,845 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' to allow for resolving potential circular references +2011-07-19 16:08:55,845 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' +2011-07-19 16:08:55,845 DEBUG [org.springframework.context.support.GenericApplicationContext] - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@da7b85] +2011-07-19 16:08:55,845 DEBUG [org.springframework.context.support.GenericApplicationContext] - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@e373de] +2011-07-19 16:08:55,846 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@61daf0: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,adapter,receiveChannel,testErrorChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy +2011-07-19 16:08:55,847 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:55,847 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'adapter' +2011-07-19 16:08:55,847 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'adapter' +2011-07-19 16:08:55,847 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'redisConnectionFactory' +2011-07-19 16:08:55,847 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'redisConnectionFactory' +2011-07-19 16:08:55,848 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'redisConnectionFactory' to allow for resolving potential circular references +2011-07-19 16:08:55,848 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'redisConnectionFactory' +2011-07-19 16:08:55,848 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'redisConnectionFactory' +2011-07-19 16:08:55,850 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'adapter' to allow for resolving potential circular references +2011-07-19 16:08:55,851 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'receiveChannel' +2011-07-19 16:08:55,851 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'receiveChannel' +2011-07-19 16:08:55,852 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'receiveChannel' to allow for resolving potential circular references +2011-07-19 16:08:55,852 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'receiveChannel' +2011-07-19 16:08:55,852 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'receiveChannel' +2011-07-19 16:08:55,853 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'testErrorChannel' +2011-07-19 16:08:55,853 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'testErrorChannel' +2011-07-19 16:08:55,853 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'testErrorChannel' to allow for resolving potential circular references +2011-07-19 16:08:55,854 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'testErrorChannel' +2011-07-19 16:08:55,854 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'testErrorChannel' +2011-07-19 16:08:55,854 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'testConverter' +2011-07-19 16:08:55,855 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'testConverter' +2011-07-19 16:08:55,855 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'testConverter' to allow for resolving potential circular references +2011-07-19 16:08:55,859 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'testConverter' +2011-07-19 16:08:55,859 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'adapter' +2011-07-19 16:08:55,860 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@61daf0: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,adapter,receiveChannel,testErrorChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy +2011-07-19 16:08:55,860 DEBUG [org.springframework.beans.factory.support.DisposableBeanAdapter] - Invoking destroy() on bean with name 'redisConnectionFactory' +2011-07-19 16:08:55,860 ERROR [org.springframework.test.context.TestContextManager] - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@1c9ca1] to prepare test instance [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests@4cab63] +java.lang.IllegalStateException: Failed to load ApplicationContext + at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:308) + at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109) + at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75) + at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:321) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:220) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:301) + at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:303) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240) + at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) + at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) + at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) + at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) + at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) + at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) + at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) + at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) + at org.junit.runners.ParentRunner.run(ParentRunner.java:236) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) + at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) + at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) + at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) + at org.apache.maven.surefire.Surefire.run(Surefire.java:177) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) + at java.lang.reflect.Method.invoke(Method.java:585) + at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) + at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adapter': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: java.lang.String.getBytes(Ljava/nio/charset/Charset;)[B + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) + at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) + at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84) + at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:1) + at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:280) + at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:304) + ... 28 more +Caused by: java.lang.NoSuchMethodError: java.lang.String.getBytes(Ljava/nio/charset/Charset;)[B + at org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer.serialize(StringRedisSerializer.java:54) + at org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer.serialize(StringRedisSerializer.java:32) + at org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer.addListener(RedisMessageListenerContainer.java:451) + at org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer.addMessageListener(RedisMessageListenerContainer.java:377) + at org.springframework.integration.redis.inbound.RedisInboundChannelAdapter.onInit(RedisInboundChannelAdapter.java:77) + at org.springframework.integration.context.IntegrationObjectSupport.afterPropertiesSet(IntegrationObjectSupport.java:98) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) + ... 41 more +2011-07-19 16:08:55,865 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved @ProfileValueSourceConfiguration [null] for test class [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests] +2011-07-19 16:08:55,865 DEBUG [org.springframework.test.annotation.ProfileValueUtils] - Retrieved ProfileValueSource type [class org.springframework.test.annotation.SystemProfileValueSource] for class [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests] +2011-07-19 16:08:55,865 DEBUG [org.springframework.test.context.support.DependencyInjectionTestExecutionListener] - Performing dependency injection for test context [[TestContext@932892 testClass = RedisInboundChannelAdapterParserTests, locations = array['classpath:/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml'], testInstance = org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests@6f29c8, testMethod = [null], testException = [null]]]. +2011-07-19 16:08:55,865 DEBUG [org.springframework.test.context.support.AbstractGenericContextLoader] - Loading ApplicationContext for locations [classpath:/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml]. +2011-07-19 16:08:55,866 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml] +2011-07-19 16:08:55,867 DEBUG [org.springframework.beans.factory.xml.DefaultDocumentLoader] - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl] +2011-07-19 16:08:55,870 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loading schema mappings from [META-INF/spring.schemas] +2011-07-19 16:08:55,871 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loaded schema mappings: {http://www.springframework.org/schema/redis/spring-redis-1.0.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/redis/spring-redis.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration-1.0.xsd=org/springframework/integration/config/xml/spring-integration-1.0.xsd, http://www.springframework.org/schema/integration/spring-integration-2.0.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd} +2011-07-19 16:08:55,873 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/beans/spring-beans.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.0.xsd +2011-07-19 16:08:55,933 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd] in classpath: org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd +2011-07-19 16:08:55,935 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/spring-integration-2.0.xsd] in classpath: org/springframework/integration/config/xml/spring-integration-2.0.xsd +2011-07-19 16:08:55,966 DEBUG [org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader] - Loading bean definitions +2011-07-19 16:08:55,968 DEBUG [org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver] - Loaded NamespaceHandler mappings: {http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler, http://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler, http://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler, http://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler, http://www.springframework.org/schema/oxm=org.springframework.oxm.config.OxmNamespaceHandler, http://www.springframework.org/schema/redis=org.springframework.data.keyvalue.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/integration/redis=org.springframework.integration.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler, http://www.springframework.org/schema/integration=org.springframework.integration.config.xml.IntegrationNamespaceHandler, http://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler, http://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler, http://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler} +2011-07-19 16:08:55,970 DEBUG [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loaded 6 bean definitions from location pattern [classpath:/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml] +2011-07-19 16:08:55,971 INFO [org.springframework.context.support.GenericApplicationContext] - Refreshing org.springframework.context.support.GenericApplicationContext@2011e5: startup date [Tue Jul 19 16:08:55 EDT 2011]; root of context hierarchy +2011-07-19 16:08:55,971 DEBUG [org.springframework.context.support.GenericApplicationContext] - Bean factory for org.springframework.context.support.GenericApplicationContext@2011e5: org.springframework.beans.factory.support.DefaultListableBeanFactory@fd4bba: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,adapter,receiveChannel,testErrorChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor]; root of factory hierarchy +2011-07-19 16:08:55,972 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' +2011-07-19 16:08:55,972 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' +2011-07-19 16:08:55,972 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' to allow for resolving potential circular references +2011-07-19 16:08:55,972 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalConfigurationAnnotationProcessor' +2011-07-19 16:08:55,976 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:55,977 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:55,977 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' to allow for resolving potential circular references +2011-07-19 16:08:55,977 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:55,977 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created. +2011-07-19 16:08:55,977 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created. +2011-07-19 16:08:55,980 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' +2011-07-19 16:08:55,980 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' +2011-07-19 16:08:55,980 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' to allow for resolving potential circular references +2011-07-19 16:08:55,981 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalAutowiredAnnotationProcessor' +2011-07-19 16:08:55,981 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' +2011-07-19 16:08:55,981 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' +2011-07-19 16:08:55,981 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' to allow for resolving potential circular references +2011-07-19 16:08:55,981 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.context.annotation.internalRequiredAnnotationProcessor' +2011-07-19 16:08:55,981 DEBUG [org.springframework.context.support.GenericApplicationContext] - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@bf8785] +2011-07-19 16:08:55,981 DEBUG [org.springframework.context.support.GenericApplicationContext] - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@5a5ee5] +2011-07-19 16:08:55,982 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@fd4bba: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,adapter,receiveChannel,testErrorChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy +2011-07-19 16:08:55,983 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:55,983 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'adapter' +2011-07-19 16:08:55,983 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'adapter' +2011-07-19 16:08:55,983 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'redisConnectionFactory' +2011-07-19 16:08:55,983 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'redisConnectionFactory' +2011-07-19 16:08:55,984 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'redisConnectionFactory' to allow for resolving potential circular references +2011-07-19 16:08:55,984 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'redisConnectionFactory' +2011-07-19 16:08:55,984 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'redisConnectionFactory' +2011-07-19 16:08:55,986 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'adapter' to allow for resolving potential circular references +2011-07-19 16:08:55,987 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'receiveChannel' +2011-07-19 16:08:55,987 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'receiveChannel' +2011-07-19 16:08:55,987 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'receiveChannel' to allow for resolving potential circular references +2011-07-19 16:08:55,987 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'receiveChannel' +2011-07-19 16:08:55,988 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'receiveChannel' +2011-07-19 16:08:55,988 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'testErrorChannel' +2011-07-19 16:08:55,988 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'testErrorChannel' +2011-07-19 16:08:55,988 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'testErrorChannel' to allow for resolving potential circular references +2011-07-19 16:08:55,989 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'testErrorChannel' +2011-07-19 16:08:55,989 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'testErrorChannel' +2011-07-19 16:08:55,989 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'testConverter' +2011-07-19 16:08:55,989 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'testConverter' +2011-07-19 16:08:55,989 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'testConverter' to allow for resolving potential circular references +2011-07-19 16:08:55,990 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'testConverter' +2011-07-19 16:08:55,990 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'adapter' +2011-07-19 16:08:55,990 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@fd4bba: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,adapter,receiveChannel,testErrorChannel,redisConnectionFactory,testConverter,org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy +2011-07-19 16:08:55,990 DEBUG [org.springframework.beans.factory.support.DisposableBeanAdapter] - Invoking destroy() on bean with name 'redisConnectionFactory' +2011-07-19 16:08:55,990 ERROR [org.springframework.test.context.TestContextManager] - Caught exception while allowing TestExecutionListener [org.springframework.test.context.support.DependencyInjectionTestExecutionListener@1c9ca1] to prepare test instance [org.springframework.integration.redis.config.RedisInboundChannelAdapterParserTests@6f29c8] +java.lang.IllegalStateException: Failed to load ApplicationContext + at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:308) + at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.injectDependencies(DependencyInjectionTestExecutionListener.java:109) + at org.springframework.test.context.support.DependencyInjectionTestExecutionListener.prepareTestInstance(DependencyInjectionTestExecutionListener.java:75) + at org.springframework.test.context.TestContextManager.prepareTestInstance(TestContextManager.java:321) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTest(SpringJUnit4ClassRunner.java:220) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner$1.runReflectiveCall(SpringJUnit4ClassRunner.java:301) + at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.methodBlock(SpringJUnit4ClassRunner.java:303) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240) + at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49) + at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) + at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) + at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) + at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) + at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) + at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) + at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) + at org.junit.runners.ParentRunner.run(ParentRunner.java:236) + at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) + at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:62) + at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140) + at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127) + at org.apache.maven.surefire.Surefire.run(Surefire.java:177) + at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) + at java.lang.reflect.Method.invoke(Method.java:585) + at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) + at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) +Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'adapter': Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: java.lang.String.getBytes(Ljava/nio/charset/Charset;)[B + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) + at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) + at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) + at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) + at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) + at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:580) + at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) + at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) + at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:84) + at org.springframework.test.context.support.AbstractGenericContextLoader.loadContext(AbstractGenericContextLoader.java:1) + at org.springframework.test.context.TestContext.loadApplicationContext(TestContext.java:280) + at org.springframework.test.context.TestContext.getApplicationContext(TestContext.java:304) + ... 28 more +Caused by: java.lang.NoSuchMethodError: java.lang.String.getBytes(Ljava/nio/charset/Charset;)[B + at org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer.serialize(StringRedisSerializer.java:54) + at org.springframework.data.keyvalue.redis.serializer.StringRedisSerializer.serialize(StringRedisSerializer.java:32) + at org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer.addListener(RedisMessageListenerContainer.java:451) + at org.springframework.data.keyvalue.redis.listener.RedisMessageListenerContainer.addMessageListener(RedisMessageListenerContainer.java:377) + at org.springframework.integration.redis.inbound.RedisInboundChannelAdapter.onInit(RedisInboundChannelAdapter.java:77) + at org.springframework.integration.context.IntegrationObjectSupport.afterPropertiesSet(IntegrationObjectSupport.java:98) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) + at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) + ... 41 more +2011-07-19 16:08:55,998 DEBUG [org.springframework.test.context.support.DirtiesContextTestExecutionListener] - After test class: context [[TestContext@932892 testClass = RedisInboundChannelAdapterParserTests, locations = array['classpath:/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml'], testInstance = [null], testMethod = [null], testException = [null]]], dirtiesContext [false]. +2011-07-19 16:08:56,008 INFO [org.springframework.context.support.ClassPathXmlApplicationContext] - Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@cf6930: startup date [Tue Jul 19 16:08:56 EDT 2011]; root of context hierarchy +2011-07-19 16:08:56,009 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - Loading XML bean definitions from class path resource [org/springframework/integration/redis/config/RedisChannelParserTests-context.xml] +2011-07-19 16:08:56,011 DEBUG [org.springframework.beans.factory.xml.DefaultDocumentLoader] - Using JAXP provider [com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl] +2011-07-19 16:08:56,012 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loading schema mappings from [META-INF/spring.schemas] +2011-07-19 16:08:56,015 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Loaded schema mappings: {http://www.springframework.org/schema/redis/spring-redis-1.0.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm-3.0.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/util/spring-util.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/task/spring-task.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-3.0.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.0.xsd=org/springframework/aop/config/spring-aop-2.0.xsd, http://www.springframework.org/schema/oxm/spring-oxm.xsd=org/springframework/oxm/config/spring-oxm-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.5.xsd=org/springframework/beans/factory/xml/spring-tool-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.5.xsd=org/springframework/ejb/config/spring-jee-2.5.xsd, http://www.springframework.org/schema/redis/spring-redis.xsd=org/springframework/data/keyvalue/redis/config/spring-redis-1.0.xsd, http://www.springframework.org/schema/aop/spring-aop.xsd=org/springframework/aop/config/spring-aop-3.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.0.xsd=org/springframework/beans/factory/xml/spring-beans-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-3.0.xsd=org/springframework/beans/factory/xml/spring-beans-3.0.xsd, http://www.springframework.org/schema/task/spring-task-3.0.xsd=org/springframework/scheduling/config/spring-task-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx-2.5.xsd=org/springframework/transaction/config/spring-tx-2.5.xsd, http://www.springframework.org/schema/context/spring-context-2.5.xsd=org/springframework/context/config/spring-context-2.5.xsd, http://www.springframework.org/schema/tool/spring-tool-3.0.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/tx/spring-tx.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool-2.0.xsd=org/springframework/beans/factory/xml/spring-tool-2.0.xsd, http://www.springframework.org/schema/util/spring-util-2.5.xsd=org/springframework/beans/factory/xml/spring-util-2.5.xsd, http://www.springframework.org/schema/lang/spring-lang.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.5.xsd=org/springframework/scripting/config/spring-lang-2.5.xsd, http://www.springframework.org/schema/integration/spring-integration-1.0.xsd=org/springframework/integration/config/xml/spring-integration-1.0.xsd, http://www.springframework.org/schema/integration/spring-integration-2.0.xsd=org/springframework/integration/config/xml/spring-integration-2.0.xsd, http://www.springframework.org/schema/jee/spring-jee-3.0.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee-2.0.xsd=org/springframework/ejb/config/spring-jee-2.0.xsd, http://www.springframework.org/schema/context/spring-context.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/jee/spring-jee.xsd=org/springframework/ejb/config/spring-jee-3.0.xsd, http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd, http://www.springframework.org/schema/aop/spring-aop-2.5.xsd=org/springframework/aop/config/spring-aop-2.5.xsd, http://www.springframework.org/schema/tx/spring-tx-2.0.xsd=org/springframework/transaction/config/spring-tx-2.0.xsd, http://www.springframework.org/schema/tx/spring-tx-3.0.xsd=org/springframework/transaction/config/spring-tx-3.0.xsd, http://www.springframework.org/schema/context/spring-context-3.0.xsd=org/springframework/context/config/spring-context-3.0.xsd, http://www.springframework.org/schema/tool/spring-tool.xsd=org/springframework/beans/factory/xml/spring-tool-3.0.xsd, http://www.springframework.org/schema/util/spring-util-3.0.xsd=org/springframework/beans/factory/xml/spring-util-3.0.xsd, http://www.springframework.org/schema/lang/spring-lang-3.0.xsd=org/springframework/scripting/config/spring-lang-3.0.xsd, http://www.springframework.org/schema/util/spring-util-2.0.xsd=org/springframework/beans/factory/xml/spring-util-2.0.xsd, http://www.springframework.org/schema/lang/spring-lang-2.0.xsd=org/springframework/scripting/config/spring-lang-2.0.xsd, http://www.springframework.org/schema/beans/spring-beans-2.5.xsd=org/springframework/beans/factory/xml/spring-beans-2.5.xsd} +2011-07-19 16:08:56,016 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/beans/spring-beans.xsd] in classpath: org/springframework/beans/factory/xml/spring-beans-3.0.xsd +2011-07-19 16:08:56,068 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd] in classpath: org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd +2011-07-19 16:08:56,071 DEBUG [org.springframework.beans.factory.xml.PluggableSchemaResolver] - Found XML schema [http://www.springframework.org/schema/integration/spring-integration-2.0.xsd] in classpath: org/springframework/integration/config/xml/spring-integration-2.0.xsd +2011-07-19 16:08:56,097 DEBUG [org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader] - Loading bean definitions +2011-07-19 16:08:56,100 DEBUG [org.springframework.beans.factory.xml.DefaultNamespaceHandlerResolver] - Loaded NamespaceHandler mappings: {http://www.springframework.org/schema/p=org.springframework.beans.factory.xml.SimplePropertyNamespaceHandler, http://www.springframework.org/schema/util=org.springframework.beans.factory.xml.UtilNamespaceHandler, http://www.springframework.org/schema/jee=org.springframework.ejb.config.JeeNamespaceHandler, http://www.springframework.org/schema/aop=org.springframework.aop.config.AopNamespaceHandler, http://www.springframework.org/schema/oxm=org.springframework.oxm.config.OxmNamespaceHandler, http://www.springframework.org/schema/redis=org.springframework.data.keyvalue.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/integration/redis=org.springframework.integration.redis.config.RedisNamespaceHandler, http://www.springframework.org/schema/tx=org.springframework.transaction.config.TxNamespaceHandler, http://www.springframework.org/schema/integration=org.springframework.integration.config.xml.IntegrationNamespaceHandler, http://www.springframework.org/schema/task=org.springframework.scheduling.config.TaskNamespaceHandler, http://www.springframework.org/schema/lang=org.springframework.scripting.config.LangNamespaceHandler, http://www.springframework.org/schema/context=org.springframework.context.config.ContextNamespaceHandler} +2011-07-19 16:08:56,101 DEBUG [org.springframework.context.support.ClassPathXmlApplicationContext] - Bean factory for org.springframework.context.support.ClassPathXmlApplicationContext@cf6930: org.springframework.beans.factory.support.DefaultListableBeanFactory@4145b1: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,redisChannel,redisConnectionFactory]; root of factory hierarchy +2011-07-19 16:08:56,103 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:56,103 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:56,103 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' to allow for resolving potential circular references +2011-07-19 16:08:56,103 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:56,103 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'errorChannel' has been explicitly defined. Therefore, a default PublishSubscribeChannel will be created. +2011-07-19 16:08:56,103 INFO [org.springframework.integration.config.xml.DefaultConfiguringBeanFactoryPostProcessor] - No bean named 'taskScheduler' has been explicitly defined. Therefore, a default ThreadPoolTaskScheduler will be created. +2011-07-19 16:08:56,104 DEBUG [org.springframework.context.support.ClassPathXmlApplicationContext] - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@fdf894] +2011-07-19 16:08:56,104 DEBUG [org.springframework.context.support.ClassPathXmlApplicationContext] - Unable to locate ApplicationEventMulticaster with name 'applicationEventMulticaster': using default [org.springframework.context.event.SimpleApplicationEventMulticaster@cac7d3] +2011-07-19 16:08:56,105 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4145b1: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,redisChannel,redisConnectionFactory,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy +2011-07-19 16:08:56,105 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Returning cached instance of singleton bean 'org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor' +2011-07-19 16:08:56,105 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'redisChannel' +2011-07-19 16:08:56,105 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'redisChannel' +2011-07-19 16:08:56,106 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating shared instance of singleton bean 'redisConnectionFactory' +2011-07-19 16:08:56,106 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Creating instance of bean 'redisConnectionFactory' +2011-07-19 16:08:56,106 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'redisConnectionFactory' to allow for resolving potential circular references +2011-07-19 16:08:56,106 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'redisConnectionFactory' +2011-07-19 16:08:56,106 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Finished creating instance of bean 'redisConnectionFactory' +2011-07-19 16:08:56,108 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Eagerly caching bean 'redisChannel' to allow for resolving potential circular references +2011-07-19 16:08:56,114 DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Invoking afterPropertiesSet() on bean with name 'redisChannel' +2011-07-19 16:08:56,115 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@4145b1: defining beans [org.springframework.integration.internalDefaultConfiguringBeanFactoryPostProcessor,redisChannel,redisConnectionFactory,nullChannel,errorChannel,_org.springframework.integration.errorLogger,taskScheduler]; root of factory hierarchy +2011-07-19 16:08:56,115 DEBUG [org.springframework.beans.factory.support.DisposableBeanAdapter] - Invoking destroy() on bean with name 'redisConnectionFactory' diff --git a/spring-integration-redis/pom.xml b/spring-integration-redis/pom.xml new file mode 100644 index 0000000000..2f354a3683 --- /dev/null +++ b/spring-integration-redis/pom.xml @@ -0,0 +1,179 @@ + + + 4.0.0 + org.springframework.integration + spring-integration-redis + 2.1.0.BUILD-SNAPSHOT + Spring Integration Redis Support + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + src/main/java + + **/* + + + **/*.java + + + + src/main/resources + + **/* + + + + + + src/test/java + + **/* + + + **/*.java + + + + src/test/resources + + **/* + + + + + + maven-compiler-plugin + + 1.5 + 1.5 + + + + maven-surefire-plugin + + + **/*Tests.java + + + **/*Abstract*.java + + + + + + + + http://download.java.net/maven/2 + http://download.java.net/maven/2 + + + http://maven.springframework.org/milestone + http://maven.springframework.org/milestone + + + http://maven.springframework.org/release + http://maven.springframework.org/release + + + http://maven.springframework.org/snapshot + http://maven.springframework.org/snapshot + + + http://repository.springsource.com/maven/bundles/external + http://repository.springsource.com/maven/bundles/external + + + http://repository.springsource.com/maven/bundles/milestone + http://repository.springsource.com/maven/bundles/milestone + + + http://repository.springsource.com/maven/bundles/release + http://repository.springsource.com/maven/bundles/release + + + + + org.easymock + easymock + 2.3 + test + + + org.easymock + easymockclassextension + 2.3 + test + + + org.springframework.data + spring-data-commons-core + 1.2.0.BUILD-SNAPSHOT + compile + + + org.springframework + spring-test + 3.1.0.M2 + test + + + org.springframework.data + spring-data-redis + 1.0.0.BUILD-SNAPSHOT + compile + + + org.springframework + spring-context + 3.1.0.M2 + compile + + + org.hamcrest + hamcrest-all + 1.1 + test + + + org.mockito + mockito-all + 1.8.4 + test + + + log4j + log4j + 1.2.12 + test + + + cglib + cglib-nodep + 2.2 + test + + + junit + junit-dep + 4.8.2 + test + + + org.springframework.integration + spring-integration-core + 2.1.0.BUILD-SNAPSHOT + compile + + + + UTF8 + + diff --git a/spring-integration-redis/src/main/java/org/springframework/integration/redis/channel/SubscribableRedisChannel.java b/spring-integration-redis/src/main/java/org/springframework/integration/redis/channel/SubscribableRedisChannel.java new file mode 100644 index 0000000000..70513a689c --- /dev/null +++ b/spring-integration-redis/src/main/java/org/springframework/integration/redis/channel/SubscribableRedisChannel.java @@ -0,0 +1,169 @@ +/* + * Copyright 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.integration.redis.channel; + +import java.util.concurrent.Executor; + +import org.springframework.beans.factory.DisposableBean; +import org.springframework.context.SmartLifecycle; +import org.springframework.core.task.SimpleAsyncTaskExecutor; +import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.core.StringRedisTemplate; +import org.springframework.data.redis.listener.ChannelTopic; +import org.springframework.data.redis.listener.RedisMessageListenerContainer; +import org.springframework.data.redis.listener.adapter.MessageListenerAdapter; +import org.springframework.data.redis.serializer.RedisSerializer; +import org.springframework.data.redis.serializer.StringRedisSerializer; +import org.springframework.integration.Message; +import org.springframework.integration.channel.AbstractMessageChannel; +import org.springframework.integration.channel.MessagePublishingErrorHandler; +import org.springframework.integration.core.MessageHandler; +import org.springframework.integration.core.SubscribableChannel; +import org.springframework.integration.dispatcher.BroadcastingDispatcher; +import org.springframework.integration.dispatcher.MessageDispatcher; +import org.springframework.integration.support.channel.BeanFactoryChannelResolver; +import org.springframework.integration.support.converter.MessageConverter; +import org.springframework.integration.support.converter.SimpleMessageConverter; +import org.springframework.integration.util.ErrorHandlingTaskExecutor; +import org.springframework.util.ErrorHandler; + +/** + * @author Oleg Zhurakousky + * @since 2.0 + */ +@SuppressWarnings("rawtypes") +public class SubscribableRedisChannel extends AbstractMessageChannel implements SubscribableChannel, SmartLifecycle, DisposableBean { + + private final RedisMessageListenerContainer container = new RedisMessageListenerContainer(); + private final JedisConnectionFactory connectionFactory; + private final RedisTemplate redisTemplate; + private final String topicName; + + private volatile MessageDispatcher dispatcher; + + // defaults + private volatile Executor taskExecutor = new SimpleAsyncTaskExecutor(); + private volatile RedisSerializer serializer = new StringRedisSerializer(); + private volatile MessageConverter messageConverter = new SimpleMessageConverter(); + + public SubscribableRedisChannel(JedisConnectionFactory connectionFactory, String topicName) { + this.connectionFactory = connectionFactory; + this.redisTemplate = new StringRedisTemplate(connectionFactory); + this.topicName = topicName; + } + + public void setTaskExecutor(Executor taskExecutor) { + this.taskExecutor = taskExecutor; + } + + public void setMessageConverter(MessageConverter messageConverter) { + this.messageConverter = messageConverter; + } + + public void setSerializer(RedisSerializer serializer) { + this.serializer = serializer; + } + + public boolean subscribe(MessageHandler handler) { + return this.dispatcher.addHandler(handler); + } + + public boolean unsubscribe(MessageHandler handler) { + return this.dispatcher.removeHandler(handler); + } + + @Override + protected boolean doSend(Message message, long arg1) { + this.redisTemplate.convertAndSend(this.topicName, this.messageConverter.fromMessage(message)); + return true; + } + + @Override + public void onInit() throws Exception { + super.onInit(); + this.configureDispatcher(); + if (this.messageConverter == null){ + this.messageConverter = new SimpleMessageConverter(); + } + this.container.setConnectionFactory(connectionFactory); + if (!(this.taskExecutor instanceof ErrorHandlingTaskExecutor)) { + ErrorHandler errorHandler = new MessagePublishingErrorHandler( + new BeanFactoryChannelResolver(this.getBeanFactory())); + this.taskExecutor = new ErrorHandlingTaskExecutor(this.taskExecutor, errorHandler); + } + this.container.setTaskExecutor(this.taskExecutor); + MessageListenerAdapter adapter = new MessageListenerAdapter(new MessageListenerDelegate()); + adapter.setSerializer(serializer); + this.container.addMessageListener(adapter, new ChannelTopic(topicName)); + this.container.afterPropertiesSet(); + } + + private void configureDispatcher() { + this.dispatcher = new BroadcastingDispatcher(); + } + + /* + * SmartLifecycle implementation (delegates to the MessageListener container) + */ + + public boolean isAutoStartup() { + return (this.container != null) ? this.container.isAutoStartup() : false; + } + + public int getPhase() { + return 0; + } + + public boolean isRunning() { + return (this.container != null) ? this.container.isRunning() : false; + } + + public void start() { + if (this.container != null) { + this.container.start(); + } + } + + public void stop() { + this.connectionFactory.getConnection().discard(); + if (this.container != null) { + this.container.stop(); + } + } + + public void stop(Runnable callback) { + if (this.container != null) { + this.container.stop(callback); + } + } + + public void destroy() throws Exception { + if (this.container != null) { + this.container.destroy(); + } + } + + private class MessageListenerDelegate { + + @SuppressWarnings("unused") + public void handleMessage(String s) { + Message siMessage = messageConverter.toMessage(s); + dispatcher.dispatch(siMessage); + } + } +} diff --git a/spring-integration-redis/src/main/java/org/springframework/integration/redis/config/RedisChannelParser.java b/spring-integration-redis/src/main/java/org/springframework/integration/redis/config/RedisChannelParser.java new file mode 100644 index 0000000000..450806e7a2 --- /dev/null +++ b/spring-integration-redis/src/main/java/org/springframework/integration/redis/config/RedisChannelParser.java @@ -0,0 +1,55 @@ +/* + * Copyright 2002-2010 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.integration.redis.config; + +import org.w3c.dom.Element; + +import org.springframework.beans.factory.support.BeanDefinitionBuilder; +import org.springframework.beans.factory.xml.ParserContext; +import org.springframework.integration.config.xml.AbstractChannelParser; +import org.springframework.integration.config.xml.IntegrationNamespaceUtils; +import org.springframework.util.StringUtils; + +/** + * Parser for the 'channel' and 'publish-subscribe-channel' elements of the + * Spring Integration Redis namespace. + * + * @author Oleg Zhurakusky + * @since 2.1 + */ +public class RedisChannelParser extends AbstractChannelParser { + + @Override + protected BeanDefinitionBuilder buildBeanDefinition(Element element, ParserContext parserContext) { + BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition( + "org.springframework.integration.redis.channel.SubscribableRedisChannel"); + String connectionFactory = element.getAttribute("connection-factory"); + if (!StringUtils.hasText(connectionFactory)) { + connectionFactory = "redisConnectionFactory"; + } + builder.addConstructorArgReference(connectionFactory); + String topicName = element.getAttribute("topic-name"); + builder.addConstructorArgValue(topicName); + + IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "task-executor"); + IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "message-converter"); + IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "phase"); +// IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "auto-startup"); + IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "serializer"); + return builder; + } +} diff --git a/spring-integration-redis/src/main/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParser.java b/spring-integration-redis/src/main/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParser.java new file mode 100644 index 0000000000..6de909eff2 --- /dev/null +++ b/spring-integration-redis/src/main/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParser.java @@ -0,0 +1,52 @@ +/* + * Copyright 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.integration.redis.config; + +import org.springframework.beans.factory.config.RuntimeBeanReference; +import org.springframework.beans.factory.support.AbstractBeanDefinition; +import org.springframework.beans.factory.support.BeanDefinitionBuilder; +import org.springframework.beans.factory.xml.ParserContext; +import org.springframework.integration.config.xml.AbstractChannelAdapterParser; +import org.springframework.integration.config.xml.IntegrationNamespaceUtils; +import org.springframework.util.StringUtils; +import org.w3c.dom.Element; + +/** + * @author Oleg Zhurakousky + * @author Mark Fisher + * @since 2.1 + */ +public class RedisInboundChannelAdapterParser extends AbstractChannelAdapterParser { + + @Override + protected AbstractBeanDefinition doParse(Element element, ParserContext parserContext, String channelName) { + BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition( + "org.springframework.integration.redis.inbound.RedisInboundChannelAdapter"); + String connectionFactory = element.getAttribute("connection-factory"); + if (!StringUtils.hasText(connectionFactory)) { + connectionFactory = "redisConnectionFactory"; + } + builder.addConstructorArgReference(connectionFactory); + builder.addPropertyValue("outputChannel", new RuntimeBeanReference(channelName)); + IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "topics"); + IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "error-channel"); + IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "message-converter"); + IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "auto-startup"); + return builder.getBeanDefinition(); + } + +} diff --git a/spring-integration-redis/src/main/java/org/springframework/integration/redis/config/RedisNamespaceHandler.java b/spring-integration-redis/src/main/java/org/springframework/integration/redis/config/RedisNamespaceHandler.java new file mode 100644 index 0000000000..86a9fc9aa5 --- /dev/null +++ b/spring-integration-redis/src/main/java/org/springframework/integration/redis/config/RedisNamespaceHandler.java @@ -0,0 +1,34 @@ +/* + * Copyright 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.integration.redis.config; + +import org.springframework.integration.config.xml.AbstractIntegrationNamespaceHandler; + +/** + * Namespace handler for Spring Integration's 'redis' namespace. + * + * @author Oleg Zhurakousky + * @since 2.1 + */ +public class RedisNamespaceHandler extends AbstractIntegrationNamespaceHandler { + + public void init() { + registerBeanDefinitionParser("publish-subscribe-channel", new RedisChannelParser()); + registerBeanDefinitionParser("inbound-channel-adapter", new RedisInboundChannelAdapterParser()); + registerBeanDefinitionParser("outbound-channel-adapter", new RedisOutboundChannelAdapterParser()); + } + +} diff --git a/spring-integration-redis/src/main/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParser.java b/spring-integration-redis/src/main/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParser.java new file mode 100644 index 0000000000..934e2d381f --- /dev/null +++ b/spring-integration-redis/src/main/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParser.java @@ -0,0 +1,48 @@ +/* + * Copyright 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.integration.redis.config; + +import org.springframework.beans.factory.support.AbstractBeanDefinition; +import org.springframework.beans.factory.support.BeanDefinitionBuilder; +import org.springframework.beans.factory.xml.ParserContext; +import org.springframework.integration.config.xml.AbstractOutboundChannelAdapterParser; +import org.springframework.integration.config.xml.IntegrationNamespaceUtils; +import org.springframework.util.StringUtils; +import org.w3c.dom.Element; + +/** + * @author Oleg Zhurakousky + * @author Mark Fisher + * @since 2.1 + */ +public class RedisOutboundChannelAdapterParser extends AbstractOutboundChannelAdapterParser { + + @Override + protected AbstractBeanDefinition parseConsumer(Element element, ParserContext parserContext) { + BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition( + "org.springframework.integration.redis.outbound.RedisPublishingMessageHandler"); + String connectionFactory = element.getAttribute("connection-factory"); + if (!StringUtils.hasText(connectionFactory)) { + connectionFactory = "redisConnectionFactory"; + } + builder.addConstructorArgReference(connectionFactory); + IntegrationNamespaceUtils.setValueIfAttributeDefined(builder, element, "topic", "defaultTopic"); + IntegrationNamespaceUtils.setReferenceIfAttributeDefined(builder, element, "message-converter"); + return builder.getBeanDefinition(); + } + +} diff --git a/spring-integration-redis/src/main/java/org/springframework/integration/redis/inbound/RedisInboundChannelAdapter.java b/spring-integration-redis/src/main/java/org/springframework/integration/redis/inbound/RedisInboundChannelAdapter.java new file mode 100644 index 0000000000..66696d601e --- /dev/null +++ b/spring-integration-redis/src/main/java/org/springframework/integration/redis/inbound/RedisInboundChannelAdapter.java @@ -0,0 +1,94 @@ +/* + * Copyright 2007-2011 the original author or authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.integration.redis.inbound; + +import java.util.ArrayList; +import java.util.List; + +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.listener.ChannelTopic; +import org.springframework.data.redis.listener.RedisMessageListenerContainer; +import org.springframework.data.redis.listener.adapter.MessageListenerAdapter; +import org.springframework.data.redis.serializer.StringRedisSerializer; +import org.springframework.integration.Message; +import org.springframework.integration.endpoint.MessageProducerSupport; +import org.springframework.integration.support.converter.MessageConverter; +import org.springframework.integration.support.converter.SimpleMessageConverter; +import org.springframework.util.Assert; + +/** + * @author Mark Fisher + * @author Oleg Zhurakousky + * @since 2.1 + */ +public class RedisInboundChannelAdapter extends MessageProducerSupport { + + private final RedisMessageListenerContainer container = new RedisMessageListenerContainer(); + + private volatile MessageConverter messageConverter = new SimpleMessageConverter(); + + private volatile String[] topics; + + + public RedisInboundChannelAdapter(RedisConnectionFactory connectionFactory) { + Assert.notNull(connectionFactory, "connectionFactory must not be null"); + this.container.setConnectionFactory(connectionFactory); + } + + + public void setTopics(String... topics) { + this.topics = topics; + } + + public void setMessageConverter(MessageConverter messageConverter) { + Assert.notNull(messageConverter, "messageConverter must not be null"); + this.messageConverter = messageConverter; + } + + public String getComponentType() { + return "redis:inbound-channel-adapter"; + } + + @Override + protected void onInit() { + super.onInit(); + Assert.notEmpty(this.topics, "at least one topis is required for subscription"); + MessageListenerDelegate delegate = new MessageListenerDelegate(); + MessageListenerAdapter adapter = new MessageListenerAdapter(delegate); + adapter.setSerializer(new StringRedisSerializer()); + List topicList = new ArrayList(); + for (String topic : this.topics) { + topicList.add(new ChannelTopic(topic)); + } + this.container.addMessageListener(adapter, topicList); + this.container.afterPropertiesSet(); + } + + private Message convertMessage(String s) { + return this.messageConverter.toMessage(s); + } + + + private class MessageListenerDelegate { + + @SuppressWarnings("unused") + public void handleMessage(String s) { + sendMessage(convertMessage(s)); + } + } + +} diff --git a/spring-integration-redis/src/main/java/org/springframework/integration/redis/outbound/RedisPublishingMessageHandler.java b/spring-integration-redis/src/main/java/org/springframework/integration/redis/outbound/RedisPublishingMessageHandler.java new file mode 100644 index 0000000000..c6c7e67f90 --- /dev/null +++ b/spring-integration-redis/src/main/java/org/springframework/integration/redis/outbound/RedisPublishingMessageHandler.java @@ -0,0 +1,69 @@ +/* + * Copyright 2007-2011 the original author or authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.integration.redis.outbound; + +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.core.StringRedisTemplate; +import org.springframework.integration.Message; +import org.springframework.integration.MessagingException; +import org.springframework.integration.core.MessageHandler; +import org.springframework.integration.support.converter.MessageConverter; +import org.springframework.integration.support.converter.SimpleMessageConverter; +import org.springframework.util.Assert; + +/** + * @author Mark Fisher + * @since 2.1 + */ +public class RedisPublishingMessageHandler implements MessageHandler { + + private final StringRedisTemplate template; + + private volatile MessageConverter messageConverter = new SimpleMessageConverter(); + + private volatile String defaultTopic; + + + public RedisPublishingMessageHandler(RedisConnectionFactory connectionFactory) { + Assert.notNull(connectionFactory, "connectionFactory must not be null"); + this.template = new StringRedisTemplate(connectionFactory); + } + + + public void setMessageConverter(MessageConverter messageConverter) { + Assert.notNull(messageConverter, "messageConverter must not be null"); + this.messageConverter = messageConverter; + } + + public void setDefaultTopic(String defaultTopic) { + this.defaultTopic = defaultTopic; + } + + public void handleMessage(Message message) throws MessagingException { + String topic = this.determineTopic(message); + Object value = this.messageConverter.fromMessage(message); + this.template.convertAndSend(topic, value.toString()); + } + + private String determineTopic(Message message) { + // TODO: add support for determining topic by evaluating SpEL against the Message + Assert.hasText(this.defaultTopic, "Failed to determine Redis topic " + + "from Message, and no defaultTopic has been provided."); + return this.defaultTopic; + } + +} diff --git a/spring-integration-redis/src/main/resources/META-INF/spring.handlers b/spring-integration-redis/src/main/resources/META-INF/spring.handlers new file mode 100644 index 0000000000..74999c0ac8 --- /dev/null +++ b/spring-integration-redis/src/main/resources/META-INF/spring.handlers @@ -0,0 +1 @@ +http\://www.springframework.org/schema/integration/redis=org.springframework.integration.redis.config.RedisNamespaceHandler \ No newline at end of file diff --git a/spring-integration-redis/src/main/resources/META-INF/spring.schemas b/spring-integration-redis/src/main/resources/META-INF/spring.schemas new file mode 100644 index 0000000000..cef04c2b24 --- /dev/null +++ b/spring-integration-redis/src/main/resources/META-INF/spring.schemas @@ -0,0 +1,2 @@ +http\://www.springframework.org/schema/integration/redis/spring-integration-redis-2.0.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd +http\://www.springframework.org/schema/integration/redis/spring-integration-redis.xsd=org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd \ No newline at end of file diff --git a/spring-integration-redis/src/main/resources/META-INF/spring.tooling b/spring-integration-redis/src/main/resources/META-INF/spring.tooling new file mode 100644 index 0000000000..2dc2da493e --- /dev/null +++ b/spring-integration-redis/src/main/resources/META-INF/spring.tooling @@ -0,0 +1,4 @@ +# Tooling related information for the integration redis namespace +http\://www.springframework.org/schema/integration/redis@name=integration redis Namespace +http\://www.springframework.org/schema/integration/redis@prefix=int-redis +http\://www.springframework.org/schema/integration/redis@icon=org/springframework/integration/redis/config/spring-integration-redis.gif diff --git a/spring-integration-redis/src/main/resources/org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd b/spring-integration-redis/src/main/resources/org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd new file mode 100644 index 0000000000..df81f21e49 --- /dev/null +++ b/spring-integration-redis/src/main/resources/org/springframework/integration/redis/config/spring-integration-redis-2.0.xsd @@ -0,0 +1,282 @@ + + + + + + + + + + + + + + Defines a publish-subscribe Message Channel that is backed by a Redis topic. + + + + + + + + + Name of the Redis topic that backs this channel. + + + + + + + + + + + + + + + + + + + + + + + + + + + + ID for this channel. Required. + + + + + + + Reference to a RedisConnectionFactory. If none is provided, the default + bean name for the reference will be "redisConnectionFactory". + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Defines an inbound Channel Adapter for subscribing to a Redis topic. + + + + + + + The ID for this Channel Adapter. + + + + + + + Reference to a RedisConnectionFactory. If none is provided, the default + bean name for the reference will be "redisConnectionFactory". + + + + + + + + + + + + Redis topic names as a comma-delimited list of Strings. + + + + + + + Channel to which Messages will be sent. + + + + + + + + + + + + + Channel to which Error Messages will be sent. + + + + + + + + + + + + + + + + + + + + + + + + Defines an outbound Redis Message-sending Channel Adapter. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Common configuration for Redis adapters. + + + + + + + + + + + + + + + + diff --git a/spring-integration-redis/src/main/resources/org/springframework/integration/redis/config/spring-integration-redis.gif b/spring-integration-redis/src/main/resources/org/springframework/integration/redis/config/spring-integration-redis.gif new file mode 100644 index 0000000000..351817f7b3 Binary files /dev/null and b/spring-integration-redis/src/main/resources/org/springframework/integration/redis/config/spring-integration-redis.gif differ diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/channel/SubscribableRedisChannelTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/channel/SubscribableRedisChannelTests.java new file mode 100644 index 0000000000..c797d99943 --- /dev/null +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/channel/SubscribableRedisChannelTests.java @@ -0,0 +1,54 @@ +/* + * Copyright 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.integration.redis.channel; + +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; + +import org.junit.Ignore; +import org.junit.Test; +import org.mockito.Mockito; +import org.springframework.beans.factory.BeanFactory; +import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; +import org.springframework.integration.Message; +import org.springframework.integration.core.MessageHandler; +import org.springframework.integration.message.GenericMessage; +/** + * @author Oleg Zhurakousky + * @since 2.0 + */ +public class SubscribableRedisChannelTests { + + @Test @Ignore // requires instance of redis-server + public void pubSubChanneTest() throws Exception{ + JedisConnectionFactory connectionFactory = new JedisConnectionFactory(); + connectionFactory.afterPropertiesSet(); + + SubscribableRedisChannel channel = new SubscribableRedisChannel(connectionFactory, "si.test.channel"); + channel.setBeanFactory(mock(BeanFactory.class)); + channel.afterPropertiesSet(); + channel.start(); + MessageHandler handler = mock(MessageHandler.class); + channel.subscribe(handler); + + channel.send(new GenericMessage("1")); + channel.send(new GenericMessage("2")); + channel.send(new GenericMessage("3")); + Thread.sleep(100); + verify(handler, times(3)).handleMessage(Mockito.any(Message.class)); + } +} diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisChannelParserTests-context.xml b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisChannelParserTests-context.xml new file mode 100644 index 0000000000..ccc6ca2ad0 --- /dev/null +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisChannelParserTests-context.xml @@ -0,0 +1,16 @@ + + + + + + + + diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisChannelParserTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisChannelParserTests.java new file mode 100644 index 0000000000..f07de1185a --- /dev/null +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisChannelParserTests.java @@ -0,0 +1,62 @@ +/* + * Copyright 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.springframework.integration.redis.config; + +import static junit.framework.Assert.assertEquals; + +import org.junit.Ignore; +import org.junit.Test; +import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; +import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; +import org.springframework.integration.Message; +import org.springframework.integration.MessagingException; +import org.springframework.integration.core.MessageHandler; +import org.springframework.integration.core.SubscribableChannel; +import org.springframework.integration.message.GenericMessage; +import org.springframework.integration.test.util.TestUtils; + +/** + * @author Oleg Zhurakousky + * + */ +public class RedisChannelParserTests { + + @Test @Ignore // requires redis-server instance + public void testPubSubChannelConfig(){ + ApplicationContext context = new ClassPathXmlApplicationContext("RedisChannelParserTests-context.xml", this.getClass()); + SubscribableChannel redisChannel = context.getBean("redisChannel", SubscribableChannel.class); + JedisConnectionFactory connectionFactory = + TestUtils.getPropertyValue(redisChannel, "connectionFactory", JedisConnectionFactory.class); + assertEquals(connectionFactory, context.getBean("redisConnectionFactory")); + assertEquals("si.test.topic", TestUtils.getPropertyValue(redisChannel, "topicName")); + } + + @Test + @Ignore + public void testPubSubChannelUsage(){ + ApplicationContext context = new ClassPathXmlApplicationContext("RedisChannelParserTests-context.xml", this.getClass()); + SubscribableChannel redisChannel = context.getBean("redisChannel", SubscribableChannel.class); + redisChannel.subscribe(new MessageHandler() { + + public void handleMessage(Message message) throws MessagingException { + System.out.println("Message: " + message); + } + }); + redisChannel.send(new GenericMessage("Hello Redis")); + } + +} diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml new file mode 100644 index 0000000000..2c5fa2f367 --- /dev/null +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests-context.xml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests.java new file mode 100644 index 0000000000..db1abf68f6 --- /dev/null +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisInboundChannelAdapterParserTests.java @@ -0,0 +1,73 @@ +/* + * Copyright 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.integration.redis.config; + +import static junit.framework.Assert.assertEquals; + +import org.junit.Ignore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.DirectFieldAccessor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; +import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; +import org.springframework.integration.channel.QueueChannel; +import org.springframework.integration.redis.inbound.RedisInboundChannelAdapter; +import org.springframework.integration.support.converter.SimpleMessageConverter; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +/** + * @author Oleg Zhurakousky + * @author Mark Fisher + */ +@ContextConfiguration +@RunWith(SpringJUnit4ClassRunner.class) +public class RedisInboundChannelAdapterParserTests { + + @Autowired + private ApplicationContext context; + + @Test + public void validateConfiguration() { + RedisInboundChannelAdapter adapter = context.getBean("adapter", RedisInboundChannelAdapter.class); + assertEquals("adapter", adapter.getComponentName()); + assertEquals("redis:inbound-channel-adapter", adapter.getComponentType()); + DirectFieldAccessor accessor = new DirectFieldAccessor(adapter); + Object errorChannelBean = context.getBean("testErrorChannel"); + assertEquals(errorChannelBean, accessor.getPropertyValue("errorChannel")); + Object converterBean = context.getBean("testConverter"); + assertEquals(converterBean, accessor.getPropertyValue("messageConverter")); + } + + @Test @Ignore + public void testInboundChannelAdapterMessaging() { + JedisConnectionFactory connectionFactory = new JedisConnectionFactory(); + connectionFactory.afterPropertiesSet(); + connectionFactory.getConnection().publish("foo".getBytes(), "Hello Redis from foo".getBytes()); + QueueChannel receiveChannel = context.getBean("receiveChannel", QueueChannel.class); + assertEquals("Hello Redis from foo", receiveChannel.receive(1000).getPayload()); + connectionFactory.getConnection().publish("bar".getBytes(), "Hello Redis from bar".getBytes()); + assertEquals("Hello Redis from bar", receiveChannel.receive(1000).getPayload()); + } + + + @SuppressWarnings("unused") + private static class TestMessageConverter extends SimpleMessageConverter { + } + +} diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml new file mode 100644 index 0000000000..eff01ad803 --- /dev/null +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests-context.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests.java new file mode 100644 index 0000000000..f3aded87e9 --- /dev/null +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/config/RedisOutboundChannelAdapterParserTests.java @@ -0,0 +1,72 @@ +/* + * Copyright 2002-2011 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.integration.redis.config; + +import static junit.framework.Assert.assertEquals; + +import org.junit.Ignore; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.beans.DirectFieldAccessor; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationContext; +import org.springframework.integration.MessageChannel; +import org.springframework.integration.channel.QueueChannel; +import org.springframework.integration.endpoint.EventDrivenConsumer; +import org.springframework.integration.message.GenericMessage; +import org.springframework.integration.redis.outbound.RedisPublishingMessageHandler; +import org.springframework.integration.support.converter.SimpleMessageConverter; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +/** + * @author Oleg Zhurakousky + * @author Mark Fisher + */ +@ContextConfiguration +@RunWith(SpringJUnit4ClassRunner.class) +public class RedisOutboundChannelAdapterParserTests { + + @Autowired + private ApplicationContext context; + + @Test + public void validateConfiguration() { + EventDrivenConsumer adapter = context.getBean("outboundAdapter", EventDrivenConsumer.class); + RedisPublishingMessageHandler handler = (RedisPublishingMessageHandler) + new DirectFieldAccessor(adapter).getPropertyValue("handler"); + assertEquals("outboundAdapter", adapter.getComponentName()); + DirectFieldAccessor accessor = new DirectFieldAccessor(handler); + assertEquals("foo", accessor.getPropertyValue("defaultTopic")); + Object converterBean = context.getBean("testConverter"); + assertEquals(converterBean, accessor.getPropertyValue("messageConverter")); + } + + @Test @Ignore // requires redis-server instance + public void testOutboundChannelAdapterMessaging(){ + MessageChannel sendChannel = context.getBean("sendChannel", MessageChannel.class); + sendChannel.send(new GenericMessage("Hello Redis")); + QueueChannel receiveChannel = context.getBean("receiveChannel", QueueChannel.class); + assertEquals("Hello Redis", receiveChannel.receive(1000).getPayload()); + } + + + @SuppressWarnings("unused") + private static class TestMessageConverter extends SimpleMessageConverter { + } + +} diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisInboundChannelAdapterTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisInboundChannelAdapterTests.java new file mode 100644 index 0000000000..9ac6774ab1 --- /dev/null +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/inbound/RedisInboundChannelAdapterTests.java @@ -0,0 +1,66 @@ +/* + * Copyright 2007-2011 the original author or authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.integration.redis.inbound; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import org.junit.Ignore; +import org.junit.Test; +import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; +import org.springframework.data.redis.core.StringRedisTemplate; +import org.springframework.integration.Message; +import org.springframework.integration.channel.QueueChannel; + +/** + * @author Mark Fisher + * @since 2.1 + */ +public class RedisInboundChannelAdapterTests { + + @Test @Ignore + public void testRedisInboundChannelAdapter() throws Exception { + int numToTest = 100; + String redisChannelName = "si.test.channel"; + QueueChannel channel = new QueueChannel(); + + JedisConnectionFactory connectionFactory = new JedisConnectionFactory(); + connectionFactory.afterPropertiesSet(); + + RedisInboundChannelAdapter adapter = new RedisInboundChannelAdapter(connectionFactory); + adapter.setTopics("si.test.channel"); + adapter.setOutputChannel(channel); + adapter.afterPropertiesSet(); + adapter.start(); + + StringRedisTemplate redisTemplate = new StringRedisTemplate(connectionFactory); + redisTemplate.afterPropertiesSet(); + for (int i = 0; i < numToTest; i++) { + redisTemplate.convertAndSend(redisChannelName, "test-" + i); + } + int counter = 0; + for (int i = 0; i < numToTest; i++) { + Message message = channel.receive(1000); + assertNotNull(message); + assertTrue(message.getPayload().toString().startsWith("test-")); + counter++; + } + assertEquals(numToTest, counter); + } + +} diff --git a/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisPublishingMessageHandlerTests.java b/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisPublishingMessageHandlerTests.java new file mode 100644 index 0000000000..648ecb1b5c --- /dev/null +++ b/spring-integration-redis/src/test/java/org/springframework/integration/redis/outbound/RedisPublishingMessageHandlerTests.java @@ -0,0 +1,85 @@ +/* + * Copyright 2007-2011 the original author or authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.springframework.integration.redis.outbound; + +import static org.junit.Assert.assertEquals; + +import java.util.Collections; +import java.util.concurrent.CountDownLatch; +import java.util.concurrent.TimeUnit; + +import org.junit.Ignore; +import org.junit.Test; +import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; +import org.springframework.data.redis.listener.ChannelTopic; +import org.springframework.data.redis.listener.RedisMessageListenerContainer; +import org.springframework.data.redis.listener.Topic; +import org.springframework.data.redis.listener.adapter.MessageListenerAdapter; +import org.springframework.data.redis.serializer.StringRedisSerializer; +import org.springframework.integration.support.MessageBuilder; + +/** + * @author Mark Fisher + * @since 2.1 + */ +public class RedisPublishingMessageHandlerTests { + + @Test @Ignore + public void testRedisPublishingMessageHandler() throws Exception { + int numToTest = 100; + String topic = "si.test.channel"; + final CountDownLatch latch = new CountDownLatch(numToTest); + + JedisConnectionFactory connectionFactory = new JedisConnectionFactory(); + connectionFactory.afterPropertiesSet(); + + MessageListenerAdapter listener = new MessageListenerAdapter(); + listener.setDelegate(new Listener(latch)); + listener.setSerializer(new StringRedisSerializer()); + + RedisMessageListenerContainer container = new RedisMessageListenerContainer(); + container.setConnectionFactory(connectionFactory); + container.afterPropertiesSet(); + container.addMessageListener(listener, Collections.singletonList(new ChannelTopic(topic))); + container.start(); + Thread.sleep(500); + + final RedisPublishingMessageHandler handler = new RedisPublishingMessageHandler(connectionFactory); + handler.setDefaultTopic(topic); + for (int i = 0; i < numToTest; i++) { + handler.handleMessage(MessageBuilder.withPayload("test-" + i).build()); + } + latch.await(3, TimeUnit.SECONDS); + assertEquals(0, latch.getCount()); + } + + + private static class Listener { + + private final CountDownLatch latch; + + private Listener(CountDownLatch latch) { + this.latch = latch; + } + + @SuppressWarnings("unused") + public void handleMessage(String s) { + this.latch.countDown(); + } + } + +} diff --git a/spring-integration-redis/template.mf b/spring-integration-redis/template.mf new file mode 100644 index 0000000000..85d851ac13 --- /dev/null +++ b/spring-integration-redis/template.mf @@ -0,0 +1,16 @@ +Bundle-SymbolicName: org.springframework.integration.redis +Bundle-Name: Spring Integration Redis Support +Bundle-Vendor: SpringSource +Bundle-ManifestVersion: 2 +Import-Template: + org.apache.commons.logging;version="[1.1.1, 2.0.0)", + org.springframework.integration.*;version="[2.0.0, 2.0.1)", + org.springframework.beans.*;version="[3.0.0, 4.0.0)", + org.springframework.context;version="[3.0.0, 4.0.0)", + org.springframework.core.*;version="[3.0.0, 4.0.0)", + org.springframework.expression.*;version="[3.0.0, 4.0.0)", + org.springframework.util;version="[3.0.0, 4.0.0)", + org.springframework.expression.*;version="[3.0.0, 4.0.0)", + org.springframework.data.keyvalue.redis.*;version="[1.0.0, 2.0.0)", + javax.*;version="0", + org.w3c.dom.*;version="0"