GithubHelp home page GithubHelp logo

spring-projects / spring-integration-samples Goto Github PK

View Code? Open in Web Editor NEW
2.3K 246.0 2.5K 13.7 MB

You are looking for examples, code snippets, sample applications for Spring Integration? This is the place.

Home Page: http://www.springsource.org/spring-integration

Java 93.92% Groovy 0.15% JavaScript 0.96% Python 0.06% Ruby 0.05% Perl 0.10% CSS 3.29% HTML 1.41% XSLT 0.07%

spring-integration-samples's Introduction

Spring Integration Samples

Revved up by Develocity

Welcome to the Spring Integration Samples repository which provides 50+ samples to help you learn Spring Integration. To simplify your experience, the Spring Integration samples are split into 4 distinct categories:

  • Basic
  • Intermediate
  • Advanced
  • Applications
  • DSL

Inside of each category you'll find a README.md file, which will contain a more detailed description of that category. Each sample also comes with its own README.md file explaining further details, e.g. how to run the respective sample.

| For additional samples, please also checkout the Spring Integration Extensions project as it also provides numerous samples.

Happy Integration!

Note

This (main) branch requires Spring Integration 6.0 or above. For samples running against earlier versions of Spring Integration, use the 5.5.x and other branches.

The project requires now Java 17 or above. To open the project in the IDE, use its import option against a build.gradle file from the root project directory.

Related GitHub projects

Community Sample Projects

Categories

Below is a short description of each category.

DSL

This directory holds demos/samples for Spring Integration 4.0 Java Configuration as well as the Java DSL Extension.

Basic

This is a good place to get started. The samples here are technically motivated and demonstrate the bare minimum with regard to configuration and code to help you to get introduced to the basic concepts, API and configuration of Spring Integration. For example, if you are looking for an answer on how to wire a Service Activator to a Channel or how to apply a Gateway to your message exchange or how to get started with using the MAIL or XML module, this would be the right place to find a relevant sample. The bottom line is that this is a good starting point.

  • amqp - Demonstrates the functionality of the various AMQP Adapters
  • barrier - Shows how to suspend a thread until some asynchronous event occurs
  • control-bus - Demonstrates the functionality of the Control Bus
  • enricher - This sample demonstrates how the Enricher components can be used
  • feed - Demonstrates the functionality of the Feed Adapter (RSS/ATOM)
  • file - Demonstrates aspects of the various File Adapters (e.g. File Inbound/Outbound Channel Adapters, file polling)
  • ftp - Demonstrates the FTP support available with Spring Integration
  • helloworld - Very simple starting example illustrating a basic message flow (using Channel, ServiceActivator, QueueChannel)
  • http - Demonstrates request/reply communication when using a pair of HTTP Inbound/Outbound gateways
  • jdbc - Illustrates the usage of the Jdbc Adapters, including object persistence and retrieval
  • jms - Demonstrates JMS support available with Spring Integration
  • jmx - Demonstrates JMX support using a JMX Attribute Polling Channel and JMX Operation Invoking Channel Adapter
  • jpa - Shows the usage of the JPA Components
  • mail - Example showing IMAP and POP3 support
  • mqtt - Demonstrates the functionality of inbound and outbound MQTT Adapters
  • mongodb - Shows how to persist a Message payload to a MongoDb document store and how to read documents from MongoDb
  • oddeven - Example combining the functionality of Inbound Channel Adapter, Filter, Router and Poller
  • quote - Example demoing core EIP support using Channel Adapter (Inbound and Stdout), Poller with Interval Triggers, Service Activator
  • sftp - Demonstrating SFTP support using SFTP Inbound / Outbound Channel Adapters
  • tcp-amqp - Demonstrates basic functionality of bridging the Spring Integration TCP Adapters with Spring Integration AMQP Adapters
  • tcp-broadcast - Demonstrates broadcasting a message to multiple connected TCP clients.
  • tcp-client-server - Demonstrates socket communication using TcpOutboundGateway, TcpInboundGateway and also uses a Gateway and a Service Activator
  • tcp-with-headers - Demonstrates sending headers along with the payload over TCP using JSON.
  • testing-examples - A series of test cases that show techniques to test Spring Integration applications.
  • twitter - Illustrates Twitter support using the Twitter Inbound Channel Adapter, Twitter Inbound Search Channel Adapter, Twitter Outbound Channel Adapter
  • ws-inbound-gateway - Example showing basic functionality of the Web Service Gateway
  • ws-outbound-gateway - Shows outbound web services support using the Web Service Outbound Gateway, Content Enricher, Composed Message Processor (Chain)
  • xml - Example demonstrates various aspects of the Xml support using an XPath Splitter, XPath Router, XSLT Transformer as well as XPath Expression support
  • xmpp - Show the support for XMPP (formerly known as Jabber) using e.g. GoogleTalk

Intermediate

This category targets developers who are already more familiar with the Spring Integration framework (past getting started), but need some more guidance while resolving more advanced technical problems that you have to deal with when switching to a Messaging architecture. For example, if you are looking for an answer on how to handle errors in various scenarios, or how to properly configure an Aggregator for the situations where some messages might not ever arrive for aggregation, or any other issue that goes beyond a basic understanding and configuration of a particular component to address "what else you can do?" types of problems, this would be the right place to find relevant examples.

  • async-gateway - Usage example of an asynchronous Gateway
  • dynamic-poller - Example shows usage of a Poller with a custom Trigger to change polling periods at runtime
  • async-gateway - Example shows usage of an Asynchronous Gateway
  • errorhandling - Demonstrates basic Error Handling capabilities of Spring Integration
  • file-processing - Sample demonstrates how to wire a message flow to process files either sequentially (maintain the order) or concurrently (no order).
  • mail-attachments - Demonstrates the processing of email attachments
  • monitoring The project used in the Spring Integration Management and Monitoring Webinar Also available on the SpringSourceDev YouTube Channel
  • multipart-http - Demonstrates the sending of HTTP multipart requests using Spring's RestTemplate and a Spring Integration Http Outbound Gateway
  • rest-http - This sample demonstrates how to send an HTTP request to a Spring Integration's HTTP service while utilizing Spring Integration's new HTTP Path usage. This sample also uses Spring Security for HTTP Basic authentication. With HTTP Path facility, the client program can send requests with URL Variables.
  • retry-and-more Provides samples showing the application of MessageHandler Advice Chains to endpoints - retry, circuit breaker, expression evaluating
  • splitter-aggregator-reaper A demonstration of implementing the Splitter and Aggregator Enterprise Integration Patterns (EIP) together. This sample also provides a concrete example of a message store reaper in action.
  • stored-procedures-derby Provides an example of the stored procedure Outbound Gateway using Apache Derby
  • stored-procedures-ms Provides an example of the stored procedure Outbound Gateway using Microsoft SQL Server
  • stored-procedures-oracle Provides an example of the stored procedure Outbound Gateway using ORACLE XE
  • stored-procedures-postgresql Provides an example of the stored procedure Outbound Gateway using PostgreSQL
  • tcp-async-bi-directional - Demonstrates the use of Collaborating Channel Adapters for arbitrary async messaging (not request/reply) between peers.
  • tcp-client-server-multiplex - Demonstrates the use of Collaborating Channel Adapters with multiple in-flight requests/responses over a single connection.
  • travel - More sophisticated example showing the retrieval of weather (SOAP Web Service) and traffic (HTTP Service) reports using real services
  • tx-synch Provides a sample demonstrating the use of transaction synchronization, renaming an input file to a different filename, depending on whether the transaction commits, or rolls back.

Advanced

This category targets advanced developers who are quite familiar with Spring Integration but are looking to address a specific custom need by extending the Spring Integration public API. For example, if you are looking for samples showing how to implement a custom Channel or Consumer (event-based or polling-based), or you are trying to figure out what is the most appropriate way to implement a custom BeanParser on top of the Spring Integration BeanParser hierarchy when implementing a custom namespace, this would be the right place to look. Here you can also find samples that will help you with adapter development. Spring Integration comes with an extensive library of adapters that allow you to connect remote systems with the Spring Integration messaging framework. However you might have a need to integrate with a system for which the core framework does not provide an adapter, so you have to implement your own. This category would include samples showing you how to implement various adapters.

  • advanced-testing-examples - Example test cases that show advanced techniques to test Spring Integration applications
  • dynamic-ftp - Demonstrates one technique for sending files to dynamic destinations.
  • dynamic-tcp-client - Demonstrates a technique for dynamically creating TCP clients.

Applications

This category targets developers and architects who have a good understanding of Message-Driven architecture and Enterprise Integration Patterns, and have an above average understanding of Spring and Spring integration and who are looking for samples that address a particular business problem. In other words, the emphasis of samples in this category is 'business use cases' and how they can be solved via a Messaging architecture and Spring Integration in particular. For example, if you are interested to see how a Loan Broker process or Travel Agent process could be implemented and automated via Spring Integration, this would be the right place to find these types of samples.

  • cafe - Emulates a simple operation of a coffee shop combining various Spring Integration adapters (Including Router and Splitter) see Appendix A of the reference documentation for more details. Implementations are provided for:
    • AMQP
    • JMS
    • In memory channels
  • cafe-scripted - Scripted implementation of the classic cafe sample application. Supports JavaScript, Groovy, Ruby, and Python.
  • loan-broker - Simulates a simple banking application (Uses Gateway, Chain, Header Enricher, Recipient List Router, Aggregator) see Appendix A of the reference documentation for more details
  • loanshark This extension to the loan broker sample shows how to exchange messages between Spring Integration applications (and other technologies) using UDP. file-split-ftp - Reads a file; splits into 3 based on contents; sends files over ftp; sends email with results.

Contributing

See the Spring Integration Contributor Guidelines for information about how to contribute to this repository.

Resources

For more information, please visit the Spring Integration website at: https://projects.spring.io/spring-integration/

spring-integration-samples's People

Contributors

amolnayak311 avatar artembilan avatar bryant1410 avatar christian-posta avatar cirosantilli avatar darxriggs avatar dependabot[bot] avatar dlehammer avatar dturanski avatar erichaagdev avatar fbalicchia avatar freemanj avatar garyrussell avatar ghillert avatar kasoban avatar lbillon avatar liujiong1982 avatar mamachanko avatar markfisher avatar markusherbert avatar moritzreiter avatar olegz avatar qeeqez avatar rstoyanchev avatar spring-operator avatar swiss-chris avatar the-alchemist avatar tzolov avatar vbose avatar yevheniilutsyshyn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

spring-integration-samples's Issues

spring-integration-mqtt With multiple Mqtt Servers for subscription

I am using Spring's spring-integration-mqtt and i can connect to a single Mqtt server and can receive messages on subscribed topics , and now i want to make application which can connect to multiple Mqtt Servers and can receive data from every connection and i want to manage it as dynamic where i can add more Mqtt servers from database or text file.

a simple bean for single Mqtt connection for subscription is as follow

@Bean
    public MessageProducer inbound() {

        MqttPahoMessageDrivenChannelAdapter adapter2 =
                new MqttPahoMessageDrivenChannelAdapter("tcp://192.168.100.1:1883","mqtt_virtual_received_sus_2",
                                                 "DATA/#", "LD/#","CONF/#","CONFIG/#");
        adapter2.setCompletionTimeout(0);
        adapter2.setConverter(new DefaultPahoMessageConverter());
        adapter2.setQos(2);

        adapter2.setOutputChannel(mqttInputChannel());
        return adapter2;

    }

above code creates a connection for the mqtt server and can receive messages and if i copy paste the same code twice for second server with different Mqtt ip address i can connect to both Mqtt Server as follows

@Bean
        public MessageProducer inbound() {

            MqttPahoMessageDrivenChannelAdapter adapter2 =
                    new MqttPahoMessageDrivenChannelAdapter("tcp://192.168.100.1:1883","mqtt_virtual_received_sus_2",
                                                     "DATA/#", "LD/#","CONF/#","CONFIG/#");
            adapter2.setCompletionTimeout(0);
            adapter2.setConverter(new DefaultPahoMessageConverter());
            adapter2.setQos(2);

            adapter2.setOutputChannel(mqttInputChannel());
            return adapter2;

        }
@Bean
        public MessageProducer inbound2() {

            MqttPahoMessageDrivenChannelAdapter adapter2 =
                    new MqttPahoMessageDrivenChannelAdapter("tcp://192.168.100.14:1883","mqtt_virtual_received_sus_1",
                                                     "DATA/#", "LD/#","CONF/#","CONFIG/#");
            adapter2.setCompletionTimeout(0);
            adapter2.setConverter(new DefaultPahoMessageConverter());
            adapter2.setQos(2);

            adapter2.setOutputChannel(mqttInputChannel());
            return adapter2;

        }

above code also works fine and i can receive message from both Mqtt Servers, but is there any way i can manage it dynamically like as follows, i change the bean's return type to list, but didn't worked:

@Bean
 public List<MqttPahoMessageDrivenChannelAdapter> getAdapter () {
     List<MqttPahoMessageDrivenChannelAdapter > logConfList=new ArrayList<MqttPahoMessageDrivenChannelAdapter>();
     MqttPahoMessageDrivenChannelAdapter adapter2 =
             new MqttPahoMessageDrivenChannelAdapter("tcp://192.168.100.1:1883","mqtt_virtual_received_sus_2",
                                              "DATA/#", "LD/#","CONF/#","CONFIG/#");
     adapter2.setCompletionTimeout(0);
     adapter2.setConverter(new DefaultPahoMessageConverter());
     adapter2.setQos(2);

     adapter2.setOutputChannel(mqttInputChannel() );

     MqttPahoMessageDrivenChannelAdapter adapter =
             new MqttPahoMessageDrivenChannelAdapter("tcp://192.168.100.14:1883","mqtt_virtual_received_sus_1",
                                              "DATA/#", "LD/#","CONF/#","CONFIG/#");
     adapter.setCompletionTimeout(0);
     adapter.setConverter(new DefaultPahoMessageConverter());
     adapter.setQos(2);

     adapter.setOutputChannel(mqttInputChannel() );
     logConfList.add(adapter);
     logConfList.add(adapter2);

     return logConfList;

 }

is there any way i can manage these beans dynamically, where i can fetch mqtt server details from text file and in a for loop or something i can manage multiple connections.

Kotlin examples?

I'm trying to set up Spring Integration in a Kotlin application, what would be the best example for that? Something like doing CRUD on Rest endpoints, parsing JSON, etc.

AMQP example runs but throws org.springframework.integration.MessageDeliveryException

When running the basic/amqp example, the following error shows up in the console:

2011-08-25 12:28:28,034 ERROR | task-scheduler-8 | org.springframework.integration.handler.LoggingHandler | org.springframework.integration.MessageDeliveryException: Dispatcher ha
s no subscribers.
at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:104)
at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:97)
at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:61)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:157)
at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:128)
at org.springframework.integration.core.MessagingTemplate.doSend(MessagingTemplate.java:288)
at org.springframework.integration.core.MessagingTemplate.send(MessagingTemplate.java:149)
at org.springframework.integration.endpoint.SourcePollingChannelAdapter.doPoll(SourcePollingChannelAdapter.java:102)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:146)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:144)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:207)
at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:202)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)

Aggregate Processor

Hi @artembilan ,

There is a requirement for us to create a sequential pipeline where we will be getting one MessagePayload and the same payload has to go through sequence of aggregators(one after the other) and perform certain operations (e.g. updating repositories etc) and finally it has to finish.. Could you please let me know how to achieve this..i am planning to do it like below

IntegrationFlows.from("input").aggregate(
processor1-> processor1.outputProcessor(g -> new Processor1().receiver(
g.getMessages().
stream().map(message1 -> message1.getPayload()).
collect(Collectors.toList()))).correlationStrategy(m->m.getHeaders().containsKey("correlation"))
).aggregate(processor2-> processor2.outputProcessor(g -> new Processor2().receiver(
g.getMessages().
stream().map(message1 -> message1.getPayload()).
collect(Collectors.toList()))).correlationStrategy(m->m.getHeaders().containsKey("correlation"))).

         channel(output()).get();

Please let me know whether the understanding is correct

INTSAMPLES-127

with this commit, it seems that the loanshark war won't deploy without adding

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-aspects</artifactId>
    <version>${spring.version}</version>
</dependency>

to the loanshark maven pom. also, now version inconsistencies with insight cause it to not deploy with insight.
loanshark uses spring 4.0.0.RC1 spring, but the spring insight plugins depends on spring framework version 3.2.1.RELEASE and spring.integration.version 2.2.1.RELEASE.
Is it possible that the insight war dependencies are getting into the classloader for loanshark?
I see the following error occur when I deploy and start loan shark:

28-Apr-2014 10:57:28.437 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Initializing Spring root WebApplicationContext
28-Apr-2014 10:57:36.929 SEVERE [localhost-startStop-1] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.config.ConsumerEndpointFactoryBean#0': Cannot resolve reference to bean 'org.springframework.integration.config.TransformerFactoryBean#0' while setting bean property 'handler'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.config.TransformerFactoryBean#0': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/springframework/integration/MessageHeaders
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:336)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1456)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1197)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:537)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:684)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:760)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4939)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5434)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:633)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:983)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1660)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.config.TransformerFactoryBean#0': FactoryBean threw exception on object creation; nested exception is java.lang.NoClassDefFoundError: org/springframework/integration/MessageHeaders
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:151)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:103)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1514)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:252)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:328)
... 29 more
Caused by: java.lang.NoClassDefFoundError: org/springframework/integration/MessageHeaders
at com.springsource.insight.plugin.integration.AbstractIntegrationOperationCollectionAspect.<clinit>(AbstractIntegrationOperationCollectionAspect.aj:40)
at org.springframework.integration.transformer.MessageTransformingHandler.<init>(MessageTransformingHandler.java:49)
at org.springframework.integration.config.TransformerFactoryBean.createHandler(TransformerFactoryBean.java:69)
at org.springframework.integration.config.TransformerFactoryBean.createMethodInvokingHandler(TransformerFactoryBean.java:59)
at org.springframework.integration.config.AbstractStandardMessageHandlerFactoryBean.createHandler(AbstractStandardMessageHandlerFactoryBean.java:97)
at org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean.createHandlerInternal(AbstractSimpleMessageHandlerFactoryBean.java:113)
at org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean.getObject(AbstractSimpleMessageHandlerFactoryBean.java:101)
at org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean.getObject(AbstractSimpleMessageHandlerFactoryBean.java:43)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:144)
... 34 more
Caused by: java.lang.ClassNotFoundException: org.springframework.integration.MessageHeaders
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1702)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1547)
... 43 more

28-Apr-2014 10:57:37.211 INFO [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log Closing Spring root WebApplicationContext

and message handers isn't in spring 4, so why ask for it.

basic/kafka-example: PartitionNotFoundException

I tried out the basic/kafka example and got a PartitionNotFoundException:

16:49:05.695 [main] ERROR o.s.boot.SpringApplication - Application startup failed
org.springframework.context.ApplicationContextException: Failed to start bean 'adapter'; nested exception is org.springframework.integration.kafka.core.PartitionNotFoundException: Partition [si.topicabc2355631326,0] has no leader or has not been found
    at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:176) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:51) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:346) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:149) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:112) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:851) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:540) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) ~[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
    at org.springframework.boot.SpringApplication.doRun(SpringApplication.java:347) ~[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:295) ~[spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
    at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:134) [spring-boot-1.3.0.RELEASE.jar:1.3.0.RELEASE]
    at org.springframework.inon.samples.kafka.Application.main(Application.java:85) [main/:na]
Caused by: org.springframework.integration.kafka.core.PartitionNotFoundException: Partition [si.topicabc2355631326,0] has no leader or has not been found
    at org.springframework.integration.kafka.core.DefaultConnectionFactory.getLeader(DefaultConnectionFactory.java:124) ~[spring-integration-kafka-1.3.0.RELEASE.jar:na]
    at org.springframework.integration.kafka.listener.AbstractOffsetManager.getOffset(AbstractOffsetManager.java:131) ~[spring-integration-kafka-1.3.0.RELEASE.jar:na]
    at org.springframework.integration.kafka.listener.KafkaMessageListenerContainer$GetOffsetForPartitionFunction.safeValueOf(KafkaMessageListenerContainer.java:599) ~[spring-integration-kafka-1.3.0.RELEASE.jar:na]
    at org.springframework.integration.kafka.listener.KafkaMessageListenerContainer$GetOffsetForPartitionFunction.safeValueOf(KafkaMessageListenerContainer.java:593) ~[spring-integration-kafka-1.3.0.RELEASE.jar:na]
    at com.gs.collections.impl.block.function.checked.CheckedFunction.valueOf(CheckedFunction.java:30) ~[gs-collections-5.0.0.jar:na]
    at com.gs.collections.impl.block.procedure.MapCollectProcedure.value(MapCollectProcedure.java:51) ~[gs-collections-5.0.0.jar:na]
    at com.gs.collections.impl.list.immutable.ImmutableSingletonList.forEach(ImmutableSingletonList.java:59) ~[gs-collections-5.0.0.jar:na]
    at com.gs.collections.impl.utility.Iterate.forEach(Iterate.java:114) ~[gs-collections-5.0.0.jar:na]
    at com.gs.collections.impl.map.mutable.UnifiedMap.collectKeysAndValues(UnifiedMap.java:987) ~[gs-collections-5.0.0.jar:na]
    at com.gs.collections.impl.AbstractRichIterable.toMap(AbstractRichIterable.java:196) ~[gs-collections-5.0.0.jar:na]
    at org.springframework.integration.kafka.listener.KafkaMessageListenerContainer.start(KafkaMessageListenerContainer.java:312) ~[spring-integration-kafka-1.3.0.RELEASE.jar:na]
    at org.springframework.integration.kafka.inbound.KafkaMessageDrivenChannelAdapter.doStart(KafkaMessageDrivenChannelAdapter.java:137) ~[spring-integratka-1.3.0.RELEASE.jar:na]
    at org.springframework.integration.endpoint.AbstractEndpoint.start(AbstractEndpoint.java:94) ~[spring-integration-core-4.2.2.RELEASE.jar:na]
    at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:173) ~[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    ... 11 common frames omitted

I think that the problem is that TopicCreator.start() is getting called too late. I'm a beginner when it comes to Spring, but I think that TopicCreator should implement InitializingBean instead of SmartLifecycle. I made the respective change on a branch (see Application.java). It seems to work (I changed the value of kafka.topic several times and I didn't get any exceptions), but this might be pure luck.

exceptions for the mail basic sample

Hi,
Any help would be appreciated.
I'm receiving exceptions with both the IMAP and POP implementations.
The POP3/IMAP access is enabled in my google account.
Here is the status as stated in gmail settings for IMAP: Status: IMAP is enabled.
Here is the status as stated in gmail settings for POP3: 1. Status: POP is enabled for all mail that has arrived since....

The IMAP fails with this exception:

14:20:59.656 WARN  [task-scheduler-1][org.springframework.integration.mail.ImapIdleChannelAdapter] error occurred in idle task
javax.mail.NoSuchProviderException: imaps
        at javax.mail.Session.getService(Session.java:806)
        at javax.mail.Session.getStore(Session.java:592)
        at javax.mail.Session.getStore(Session.java:554)
        at org.springframework.integration.mail.AbstractMailReceiver.connectStoreIfNecessary(AbstractMailReceiver.java:214)
        at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:234)
        at org.springframework.integration.mail.ImapMailReceiver.waitForNewMessages(ImapMailReceiver.java:156)
        at org.springframework.integration.mail.ImapIdleChannelAdapter$IdleTask.run(ImapIdleChannelAdapter.java:220)
        at org.springframework.integration.mail.ImapIdleChannelAdapter$ReceivingTask.run(ImapIdleChannelAdapter.java:190)
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
        at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
14:20:59.658 WARN  [task-scheduler-1][org.springframework.integration.mail.ImapIdleChannelAdapter] Failed to execute IDLE task. Will attempt to resubmit in 10000 milliseconds.
java.lang.IllegalStateException: Failure in 'idle' task. Will resubmit.
        at org.springframework.integration.mail.ImapIdleChannelAdapter$IdleTask.run(ImapIdleChannelAdapa:239)v
        at org.springframework.integration.mail.ImapIdleChannelAdapter$ReceivingTask.run(ImapIdleChannelAdapter.java:190)
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
        at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: javax.mail.NoSuchProviderException: imaps
        at javax.mail.Session.getService(Session.java:806)
        at javax.mail.Session.getStore(Session.java:592)
        at javax.mail.Session.getStore(Session.java:554)
        at org.springframework.integration.mail.AbstractMailReceiver.connectStoreIfNecessary(AbstractMailReceiver.java:214)
        at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:234)
        at org.springframework.integration.mail.ImapMailReceiver.waitForNewMessages(ImapMailReceiver.java:156)
        at org.springframework.integration.mail.ImapIdleChannelAdapter$IdleTask.run(ImapIdleChannelAdapter.java:220)
        ... 10 more

And the POP fails with javax.mail.NoSuchProviderException: pop3, here is the stack trace:

java.lang.ClassNotFoundException: com.sun.mail.pop3.POP3Store
        at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:260)
        at javax.mail.Session.getService(Session.java:802)
        at javax.mail.Session.getStore(Session.java:592)
        at javax.mail.Session.getStore(Session.java:554)
        at org.springframework.integration.mail.AbstractMailReceiver.connectStoreIfNecessary(AbstractMailReceiver.java:214)
        at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:234)
        at org.springframework.integration.mail.AbstractMailReceiver.receive(AbstractMailReceiver.java:260)
        at org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:103)
        at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:144)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:192)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint.access$000(AbstractPollingEndpoint.java:55)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:149)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:146)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:298)
        at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52)
        at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
        at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49)
        at org.springframework.integration.endpoint.tPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:292)
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
        at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
14:22:55.037 ERROR [task-scheduler-1][org.springframework.integration.handler.LoggingHandler] org.springframework.messaging.MessagingException: failure occurred while polling for mail; nested exception is javax.mail.NoSuchProviderException: pop3
        at org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:117)
        at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:144)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:192)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint.access$000(AbstractPollingEndpoint.java:55)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:149)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:146)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:298)
        at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52)
        atringframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
        at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49)
        at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:292)
        at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
        at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
        at java.lang.Thread.run(Thread.java:745)
Caused by: javax.mail.NoSuchProviderException: pop3
        at javax.mail.Session.getService(Session.java:806)
        at javax.mail.Session.getStore(Session.java:592)
        at javax.mail.Session.getStore(Session.java:554)
        at org.springframework.integration.mail.AbstractMailReceiver.connectStoreIfNecessary(AbstractMailReceiver.java:214)
        at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:234)
        at org.springframework.integration.mail.AbstractMailReceiver.receive(AbstractMailReceiver.java:260)
        at org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:103)
        ... 19 more

mqtt over UDP

There is any way to use spring-integration-mqtt over UDP or use mqtt-sn?

No xpath-filter / xpath-router sample

In order to convert xml-based configuration to java config using SI Java DSL, please provide a sample for this:

<int:chain input-channel="inputChannel">
    <int-xml:xpath-filter match-value="my:namespace"
                          discard-channel="wrongMessagesChannel">
        <int-xml:xpath-expression expression="namespace-uri(/*)" />
    </int-xml:xpath-filter>
    <int-xml:xpath-router evaluate-as-string="true"
                          resolution-required="false"
                          default-output-channel="wrongMessagesChannel">
        <int-xml:xpath-expression expression="local-name(/*)" />
        <int-xml:mapping value="Tags" channel="splittingChannel" />
        <int-xml:mapping value="Tag" channel="receivedChannel" />
    </int-xml:xpath-router>
</int:chain>

file-split-ftp Sample

When the DSL 1.2 is GA, change the poller error channel to the channel name, delete the channel bean and revert the error flow to f -> f.... style.

Kafka basic example doesn't work properly

Hi guys,

I'm trying to run the kafka basic example and I'm getting this error:

Sending 10 messages...ECUTING
Sending a null message...
GenericMessage [payload=foo0, headers={kafka_offset=11, kafka_consumer=org.apache.kafka.clients.consumer.KafkaConsumer@62d0ac62, kafka_timestampType=CREATE_TIME, kafka_receivedMessageKey=si.key, kafka_receivedPartitionId=0, kafka_receivedTopic=si.topic, kafka_receivedTimestamp=1496067368943}]
GenericMessage [payload=foo1, headers={kafka_offset=12, kafka_consumer=org.apache.kafka.clients.consumer.KafkaConsumer@62d0ac62, kafka_timestampType=CREATE_TIME, kafka_receivedMessageKey=si.key, kafka_receivedPartitionId=0, kafka_receivedTopic=si.topic, kafka_receivedTimestamp=1496067368955}]
GenericMessage [payload=foo2, headers={kafka_offset=13, kafka_consumer=org.apache.kafka.clients.consumer.KafkaConsumer@62d0ac62, kafka_timestampType=CREATE_TIME, kafka_receivedMessageKey=si.key, kafka_receivedPartitionId=0, kafka_receivedTopic=si.topic, kafka_receivedTimestamp=1496067368955}]
GenericMessage [payload=foo3, headers={kafka_offset=14, kafka_consumer=org.apache.kafka.clients.consumer.KafkaConsumer@62d0ac62, kafka_timestampType=CREATE_TIME, kafka_receivedMessageKey=si.key, kafka_receivedPartitionId=0, kafka_receivedTopic=si.topic, kafka_receivedTimestamp=1496067368955}]
GenericMessage [payload=foo4, headers={kafka_offset=15, kafka_consumer=org.apache.kafka.clients.consumer.KafkaConsumer@62d0ac62, kafka_timestampType=CREATE_TIME, kafka_receivedMessageKey=si.key, kafka_receivedPartitionId=0, kafka_receivedTopic=si.topic, kafka_receivedTimestamp=1496067368955}]
GenericMessage [payload=foo5, headers={kafka_offset=16, kafka_consumer=org.apache.kafka.clients.consumer.KafkaConsumer@62d0ac62, kafka_timestampType=CREATE_TIME, kafka_receivedMessageKey=si.key, kafka_receivedPartitionId=0, kafka_receivedTopic=si.topic, kafka_receivedTimestamp=1496067368955}]
GenericMessage [payload=foo6, headers={kafka_offset=17, kafka_consumer=org.apache.kafka.clients.consumer.KafkaConsumer@62d0ac62, kafka_timestampType=CREATE_TIME, kafka_receivedMessageKey=si.key, kafka_receivedPartitionId=0, kafka_receivedTopic=si.topic, kafka_receivedTimestamp=1496067368955}]
GenericMessage [payload=foo7, headers={kafka_offset=18, kafka_consumer=org.apache.kafka.clients.consumer.KafkaConsumer@62d0ac62, kafka_timestampType=CREATE_TIME, kafka_receivedMessageKey=si.key, kafka_receivedPartitionId=0, kafka_receivedTopic=si.topic, kafka_receivedTimestamp=1496067368955}]
GenericMessage [payload=foo8, headers={kafka_offset=19, kafka_consumer=org.apache.kafka.clients.consumer.KafkaConsumer@62d0ac62, kafka_timestampType=CREATE_TIME, kafka_receivedMessageKey=si.key, kafka_receivedPartitionId=0, kafka_receivedTopic=si.topic, kafka_receivedTimestamp=1496067368955}]
GenericMessage [payload=foo9, headers={kafka_offset=20, kafka_consumer=org.apache.kafka.clients.consumer.KafkaConsumer@62d0ac62, kafka_timestampType=CREATE_TIME, kafka_receivedMessageKey=si.key, kafka_receivedPartitionId=0, kafka_receivedTopic=si.topic, kafka_receivedTimestamp=1496067368955}]
GenericMessage [payload=org.springframework.kafka.support.KafkaNull@150d80c4, headers={kafka_offset=21, kafka_consumer=org.apache.kafka.clients.consumer.KafkaConsumer@62d0ac62, kafka_timestampType=CREATE_TIME, kafka_receivedMessageKey=si.key, kafka_receivedPartitionId=0, kafka_receivedTopic=si.topic, kafka_receivedTimestamp=1496067368962}]
Adding an adapter for a second topic and sending 10 messages...
Exception in thread "main" java.lang.AbstractMethodError: Method org/springframework/integration/kafka/dsl/KafkaMessageDrivenChannelAdapterSpec$KafkaMessageDrivenChannelAdapterListenerContainerSpec.getComponentsToRegister()Ljava/util/Map; is abstract
at org.springframework.integration.kafka.dsl.KafkaMessageDrivenChannelAdapterSpec$KafkaMessageDrivenChannelAdapterListenerContainerSpec.getComponentsToRegister(KafkaMessageDrivenChannelAdapterSpec.java)
at org.springframework.integration.dsl.IntegrationFlows.registerComponents(IntegrationFlows.java:333)
at org.springframework.integration.dsl.IntegrationFlows.from(IntegrationFlows.java:221)
at org.springframework.integration.samples.kafka.Application.addAnotherListenerForTopics(Application.java:166)
at org.springframework.integration.samples.kafka.Application.runDemo(Application.java:95)
at org.springframework.integration.samples.kafka.Application.main(Application.java:74)
<=========----> 75% EXECUTING

I've created the topic that you mentioned en README.md. If I try to publish and consum using kafka bash scripts, it works fine.

My setup;

Gradle 3.4.1

Build time: 2017-03-03 19:45:41 UTC
Revision: 9eb76efdd3d034dc506c719dac2955efb5ff9a93

Groovy: 2.4.7
Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM: 1.8.0_131 (Oracle Corporation 25.131-b11)
OS: Linux 4.4.0-78-generic amd64

Thanks in advanced.

XMPP Complete example

Hi,

This might not be the correct place, but i am looking for a complete eaxmple of xmpp with Spring. I am new to both Spring and XMPP. The coide base provided here doesnt have META-INF folder and other properties files. Please provide me with the complete code.

Thanks,
Niddhi

Cannot resolve the name 'integration:smartLifeCycleAttributeGroup' to a(n) 'attribute group' component when packaged with Maven

When i try to package using maven, some test fails as show below -

Gyro:tcp-client-server gyro$ mvn clean package
[INFO] Scanning for projects...
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for org.springframework.integration.samples:tcp-client-server:jar:4.3.0.BUILD-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 129, column 12
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-shade-plugin is missing. @ line 114, column 12
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building TCP Client Server Sample 4.3.0.BUILD-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] 
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ tcp-client-server ---
[INFO] Deleting /Users/gyro/Documents/workspace-sts-3.7.3.RELEASE/spring-integration-samples/basic/tcp-client-server/target
[INFO] 
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ tcp-client-server ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] Copying 5 resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:compile (default-compile) @ tcp-client-server ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 6 source files to /Users/gyro/Documents/workspace-sts-3.7.3.RELEASE/spring-integration-samples/basic/tcp-client-server/target/classes
[INFO] 
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ tcp-client-server ---
[WARNING] Using platform encoding (UTF-8 actually) to copy filtered resources, i.e. build is platform dependent!
[INFO] skip non existing resourceDirectory /Users/gyro/Documents/workspace-sts-3.7.3.RELEASE/spring-integration-samples/basic/tcp-client-server/src/test/resources
[INFO] 
[INFO] --- maven-compiler-plugin:3.1:testCompile (default-testCompile) @ tcp-client-server ---
[INFO] Changes detected - recompiling the module!
[WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
[INFO] Compiling 6 source files to /Users/gyro/Documents/workspace-sts-3.7.3.RELEASE/spring-integration-samples/basic/tcp-client-server/target/test-classes
[INFO] 
[INFO] --- maven-surefire-plugin:2.12.4:test (default-test) @ tcp-client-server ---
[INFO] Surefire report directory: /Users/gyro/Documents/workspace-sts-3.7.3.RELEASE/spring-integration-samples/basic/tcp-client-server/target/surefire-reports

-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running org.springframework.integration.samples.tcpclientserver.TcpClientServerAnnotationDemoTest
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 2.883 sec
Running org.springframework.integration.samples.tcpclientserver.TcpClientServerDemoTest
16:43:26.915 INFO  [main][org.springframework.integration.samples.tcpclientserver.support.CustomTestContextLoader] Available server socket: 5678
16:43:27.930 ERROR [pool-3-thread-2][org.springframework.integration.handler.LoggingHandler] org.springframework.messaging.MessageHandlingException: nested exception is java.lang.RuntimeException: Failure Demonstration
    at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:96)
    at org.springframework.integration.handler.ServiceActivatingHandler.handleRequestMessage(ServiceActivatingHandler.java:89)
    at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:99)
    at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127)
    at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116)
    at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:147)
    at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:120)
    at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:423)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:373)
    at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:115)
    at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:45)
    at org.springframework.messaging.core.AbstractMessageSendingTemplate.send(AbstractMessageSendingTemplate.java:105)
    at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutput(AbstractMessageProducingHandler.java:297)
    at org.springframework.integration.handler.AbstractMessageProducingHandler.produceOutput(AbstractMessageProducingHandler.java:217)
    at org.springframework.integration.handler.AbstractMessageProducingHandler.sendOutputs(AbstractMessageProducingHandler.java:119)
    at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:105)
    at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127)
    at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116)
    at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:147)
    at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:120)
    at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:423)
    at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:115)
    at org.springframework.messaging.core.GenericMessagingTemplate.doSendAndReceive(GenericMessagingTemplate.java:150)
    at org.springframework.messaging.core.GenericMessagingTemplate.doSendAndReceive(GenericMessagingTemplate.java:45)
    at org.springframework.messaging.core.AbstractMessagingTemplate.sendAndReceive(AbstractMessagingTemplate.java:42)
    at org.springframework.integration.core.MessagingTemplate.sendAndReceive(MessagingTemplate.java:97)
    at org.springframework.integration.gateway.MessagingGatewaySupport.doSendAndReceive(MessagingGatewaySupport.java:422)
    at org.springframework.integration.gateway.MessagingGatewaySupport.sendAndReceiveMessage(MessagingGatewaySupport.java:390)
    at org.springframework.integration.ip.tcp.TcpInboundGateway.doOnMessage(TcpInboundGateway.java:119)
    at org.springframework.integration.ip.tcp.TcpInboundGateway.onMessage(TcpInboundGateway.java:97)
    at org.springframework.integration.ip.tcp.connection.TcpNetConnection.run(TcpNetConnection.java:182)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: Failure Demonstration
    at org.springframework.integration.samples.tcpclientserver.EchoService.test(EchoService.java:29)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.springframework.expression.spel.support.ReflectiveMethodExecutor.execute(ReflectiveMethodExecutor.java:113)
    at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:129)
    at org.springframework.expression.spel.ast.MethodReference.access$000(MethodReference.java:49)
    at org.springframework.expression.spel.ast.MethodReference$MethodValueRef.getValue(MethodReference.java:347)
    at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:88)
    at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:131)
    at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:330)
    at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:166)
    at org.springframework.integration.util.MessagingMethodInvokerHelper.processInternal(MessagingMethodInvokerHelper.java:317)
    at org.springframework.integration.util.MessagingMethodInvokerHelper.process(MessagingMethodInvokerHelper.java:155)
    at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:93)
    ... 35 more

FAIL:Failure Demonstration
echo:Hello world!
echo:
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 1.13 sec
Running org.springframework.integration.samples.tcpclientserver.TcpClientServerDemoWithConversionServiceTest
16:43:28.050 INFO  [main][org.springframework.integration.samples.tcpclientserver.support.CustomTestContextLoader] Available server socket: 5678
16:43:28.559 ERROR [pool-5-thread-2][org.springframework.integration.handler.LoggingHandler] org.springframework.messaging.MessageHandlingException: nested exception is java.lang.RuntimeException: Failure Demonstration
    at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:96)
    at org.springframework.integration.handler.ServiceActivatingHandler.handleRequestMessage(ServiceActivatingHandler.java:89)
    at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:99)
    at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127)
    at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116)
    at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:147)
    at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:120)
    at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77)
    at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:423)
    at org.springframework.messaging.core.GenericMessagingTemplate.doSend(GenericMessagingTemplate.java:115)
    at org.springframework.messaging.core.GenericMessagingTemplate.doSendAndReceive(GenericMessagingTemplate.java:150)
    at org.springframework.messaging.core.GenericMessagingTemplate.doSendAndReceive(GenericMessagingTemplate.java:45)
    at org.springframework.messaging.core.AbstractMessagingTemplate.sendAndReceive(AbstractMessagingTemplate.java:42)
    at org.springframework.integration.core.MessagingTemplate.sendAndReceive(MessagingTemplate.java:97)
    at org.springframework.integration.gateway.MessagingGatewaySupport.doSendAndReceive(MessagingGatewaySupport.java:422)
    at org.springframework.integration.gateway.MessagingGatewaySupport.sendAndReceiveMessage(MessagingGatewaySupport.java:390)
    at org.springframework.integration.ip.tcp.TcpInboundGateway.doOnMessage(TcpInboundGateway.java:119)
    at org.springframework.integration.ip.tcp.TcpInboundGateway.onMessage(TcpInboundGateway.java:97)
    at org.springframework.integration.ip.tcp.connection.TcpNetConnection.run(TcpNetConnection.java:182)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: Failure Demonstration
    at org.springframework.integration.samples.tcpclientserver.EchoService.test(EchoService.java:29)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:483)
    at org.springframework.expression.spel.support.ReflectiveMethodExecutor.execute(ReflectiveMethodExecutor.java:113)
    at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:129)
    at org.springframework.expression.spel.ast.MethodReference.access$000(MethodReference.java:49)
    at org.springframework.expression.spel.ast.MethodReference$MethodValueRef.getValue(MethodReference.java:347)
    at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:88)
    at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:131)
    at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:330)
    at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:166)
    at org.springframework.integration.util.MessagingMethodInvokerHelper.processInternal(MessagingMethodInvokerHelper.java:317)
    at org.springframework.integration.util.MessagingMethodInvokerHelper.process(MessagingMethodInvokerHelper.java:155)
    at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:93)
    ... 21 more

FAIL:Failure Demonstration
echo:Hello world!
echo:
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.576 sec
Running org.springframework.integration.samples.tcpclientserver.TcpServerConnectionDeserializeTest
16:43:28.632 INFO  [main][org.springframework.integration.samples.tcpclientserver.support.CustomTestContextLoader] Available server socket: 5678
16:43:29.018 DEBUG [pool-7-thread-2][org.springframework.integration.samples.tcpclientserver.TcpServerConnectionDeserializeTest$1] org.springframework.integration.samples.tcpclientserver.TcpServerConnectionDeserializeTest$1@9023440 received message: GenericMessage [payload=byte[12], headers={replyChannel=org.springframework.messaging.core.GenericMessagingTemplate$TemporaryReplyChannel@7c5cb10, errorChannel=org.springframework.messaging.core.GenericMessagingTemplate$TemporaryReplyChannel@7c5cb10, ip_tcp_remotePort=50429, ip_connectionId=localhost:50429:5678:7c51dc3f-7867-4278-8912-9daf38ca4732, ip_localInetAddress=/127.0.0.1, ip_address=127.0.0.1, id=57021dbd-bc36-b294-8164-0ac6d5fcd265, ip_hostname=localhost, timestamp=1462286609017}]
16:43:29.019 ERROR [pool-7-thread-2][org.springframework.integration.ip.tcp.connection.TcpNetConnection] Read exception localhost:50429:5678:7c51dc3f-7867-4278-8912-9daf38ca4732 MessageMappingException:Expected STX to begin message
Hello World!
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.405 sec
Running org.springframework.integration.samples.tcpclientserver.TcpServerCustomSerializerTest
16:43:29.067 INFO  [main][org.springframework.integration.samples.tcpclientserver.support.CustomTestContextLoader] Available server socket: 5678
16:43:29.399 DEBUG [pool-9-thread-2][org.springframework.integration.samples.tcpclientserver.TcpServerCustomSerializerTest$1] org.springframework.integration.samples.tcpclientserver.TcpServerCustomSerializerTest$1@4ddc4e42 received message: GenericMessage [payload=org.springframework.integration.samples.tcpclientserver.CustomOrder@473301d1[
  number=123
  sender=PINGPONG02
  message=You got it to work!
], headers={replyChannel=org.springframework.messaging.core.GenericMessagingTemplate$TemporaryReplyChannel@2985d9d5, errorChannel=org.springframework.messaging.core.GenericMessagingTemplate$TemporaryReplyChannel@2985d9d5, ip_tcp_remotePort=50430, ip_connectionId=localhost:50430:5678:e4251f9f-6ad2-486f-9400-91a2ddd7bfad, ip_localInetAddress=/127.0.0.1, ip_address=127.0.0.1, id=5ee26447-f855-4ac3-1186-8fb581715810, ip_hostname=localhost, timestamp=1462286609380}]
Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.379 sec

Results :

Tests run: 9, Failures: 0, Errors: 0, Skipped: 0

[INFO] 
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ tcp-client-server ---
[INFO] Building jar: /Users/gyro/Documents/workspace-sts-3.7.3.RELEASE/spring-integration-samples/basic/tcp-client-server/target/tcp-client-server-4.3.0.BUILD-SNAPSHOT.jar
[INFO] 
[INFO] --- maven-shade-plugin:2.4.3:shade (default) @ tcp-client-server ---
[INFO] Including commons-lang:commons-lang:jar:2.6 in the shaded jar.
[INFO] Including org.springframework:spring-core:jar:4.2.5.RELEASE in the shaded jar.
[INFO] Including commons-logging:commons-logging:jar:1.2 in the shaded jar.
[INFO] Including org.springframework.integration:spring-integration-ip:jar:4.3.0.M1 in the shaded jar.
[INFO] Including org.springframework.integration:spring-integration-core:jar:4.3.0.M1 in the shaded jar.
[INFO] Including org.springframework:spring-tx:jar:4.2.4.RELEASE in the shaded jar.
[INFO] Including org.springframework.retry:spring-retry:jar:1.1.2.RELEASE in the shaded jar.
[INFO] Including org.springframework:spring-aop:jar:4.2.4.RELEASE in the shaded jar.
[INFO] Including aopalliance:aopalliance:jar:1.0 in the shaded jar.
[INFO] Including log4j:log4j:jar:1.2.17 in the shaded jar.
[INFO] Including org.springframework.integration:spring-integration-test:jar:4.3.0.M1 in the shaded jar.
[INFO] Including org.springframework:spring-context:jar:4.2.4.RELEASE in the shaded jar.
[INFO] Including org.springframework:spring-beans:jar:4.2.4.RELEASE in the shaded jar.
[INFO] Including org.springframework:spring-expression:jar:4.2.4.RELEASE in the shaded jar.
[INFO] Including org.springframework:spring-messaging:jar:4.2.4.RELEASE in the shaded jar.
[INFO] Replacing /Users/gyro/Documents/workspace-sts-3.7.3.RELEASE/spring-integration-samples/basic/tcp-client-server/target/uber-tcp-client-server-4.3.0.BUILD-SNAPSHOT.jar with /Users/gyro/Documents/workspace-sts-3.7.3.RELEASE/spring-integration-samples/basic/tcp-client-server/target/tcp-client-server-4.3.0.BUILD-SNAPSHOT-shaded.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 14.983 s
[INFO] Finished at: 2016-05-03T16:43:33+02:00
[INFO] Final Memory: 25M/165M
[INFO] ------------------------------------------------------------------------

And when i try to run the generated jar, I get the below error -

Gyro:tcp-client-server gyro$ java -jar target/uber-tcp-client-server-4.3.0.BUILD-SNAPSHOT.jar 

=========================================================

    Welcome to the Spring Integration                    
          TCP-Client-Server Sample!                      

    For more information please visit:                   
    http://www.springintegration.org/                    

=========================================================
Detect open server socket...using port 5678
Exception in thread "main" org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 55 in XML document from class path resource [META-INF/spring/integration/tcpClientServerDemo-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException; systemId: http://www.springframework.org/schema/integration/ip/spring-integration-ip.xsd; lineNumber: 55; columnNumber: 75; src-resolve: Cannot resolve the name 'integration:smartLifeCycleAttributeGroup' to a(n) 'attribute group' component.
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:399)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:217)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:188)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:252)
    at org.springframework.context.support.GenericXmlApplicationContext.load(GenericXmlApplicationContext.java:124)
    at org.springframework.integration.samples.tcpclientserver.Main.setupContext(Main.java:125)
    at org.springframework.integration.samples.tcpclientserver.Main.main(Main.java:75)
Caused by: org.xml.sax.SAXParseException; systemId: http://www.springframework.org/schema/integration/ip/spring-integration-ip.xsd; lineNumber: 55; columnNumber: 75; src-resolve: Cannot resolve the name 'integration:smartLifeCycleAttributeGroup' to a(n) 'attribute group' component.
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
    at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
    at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:437)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:4162)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:4145)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getGlobalDecl(XSDHandler.java:1741)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDAttributeGroupTraverser.traverseLocal(XSDAttributeGroupTraverser.java:80)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDAbstractTraverser.traverseAttrsAndAttrGrps(XSDAbstractTraverser.java:643)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.processComplexContent(XSDComplexTypeTraverser.java:1123)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexContent(XSDComplexTypeTraverser.java:836)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexTypeDecl(XSDComplexTypeTraverser.java:315)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseLocal(XSDComplexTypeTraverser.java:164)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(XSDElementTraverser.java:392)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTraverser.traverseGlobal(XSDElementTraverser.java:242)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.traverseSchemas(XSDHandler.java:1433)
    at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:630)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:617)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2453)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1773)
    at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.emptyElement(XMLSchemaValidator.java:766)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:356)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2786)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:606)
    at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:117)
    at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:510)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:848)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:777)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:348)
    at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:76)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:429)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:391)
    ... 9 more

I have added below in pom.xml -

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <finalName>uber-${project.artifactId}-${project.version}</finalName>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-jar-plugin</artifactId>
            <configuration>
                <archive>
                    <manifest>
                        <mainClass>org.springframework.integration.samples.tcpclientserver.Main</mainClass>
                    </manifest>
                </archive>
            </configuration>
        </plugin>
    </plugins>
</build>

My maven version -

Gyro:tcp-client-server gyro$ mvn --version
Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
Maven home: /usr/local/apache-maven-3.3.9
Java version: 1.8.0_31, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.4", arch: "x86_64", family: "mac"

message is not deleted from the queue post read

This is not really an issue with RabbitMq but more of a help required in order to implement a SimpleMessageListenerContainer in a manner that it removes the message, un-transactionally, as soon read by the message receiver.

But in my case, irrespective of successful or unsuccessful transactions, the message remains in the queue, causing its repeated processing.

Below is the code snippet of my container bean configuration, it will be of great help if someone can point out the mistake in here:-

@Bean
SimpleMessageListenerContainer container(ConnectionFactory connectionFactory, MessageListenerAdapter listenerAdapter) {
        SimpleMessageListenerContainer container = new SimpleMessageListenerContainer();
        container.setAcknowledgeMode(NONE);
        container.setConnectionFactory(connectionFactory);
        container.setQueueNames(queueName);
        container.setMessageListener(listenerAdapter);
        return container;
    }

I just got branch 4.3.x, when I run StatelessRetryDemo, got the following error

16:14:12.579 WARN  [main][org.springframework.context.support.ClassPathXmlApplicationContext] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'channelInitializer': Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.convert.support.DefaultConversionService.getSharedInstance()Lorg/springframework/core/convert/ConversionService;
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'channelInitializer': Initialization of bean failed; nested exception is java.lang.NoSuchMethodError: org.springframework.core.convert.support.DefaultConversionService.getSharedInstance()Lorg/springframework/core/convert/ConversionService;
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:866)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:542)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
	at org.springframework.integration.samples.advice.StatelessRetryDemo.main(StatelessRetryDemo.java:43)
Caused by: java.lang.NoSuchMethodError: org.springframework.core.convert.support.DefaultConversionService.getSharedInstance()Lorg/springframework/core/convert/ConversionService;
	at org.springframework.expression.spel.support.StandardTypeConverter.<init>(StandardTypeConverter.java:46)
	at org.springframework.expression.spel.support.StandardEvaluationContext.getTypeConverter(StandardEvaluationContext.java:185)
	at org.springframework.expression.spel.support.ReflectiveMethodResolver.resolve(ReflectiveMethodResolver.java:110)
	at org.springframework.expression.spel.ast.MethodReference.findAccessorForMethod(MethodReference.java:196)
	at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:125)
	at org.springframework.expression.spel.ast.MethodReference.getValueInternal(MethodReference.java:85)
	at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:57)
	at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:87)
	at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:120)
	at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:242)
	at org.springframework.context.expression.StandardBeanExpressionResolver.evaluate(StandardBeanExpressionResolver.java:161)
	at org.springframework.beans.factory.support.AbstractBeanFactory.evaluateBeanDefinitionString(AbstractBeanFactory.java:1448)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.doEvaluate(BeanDefinitionValueResolver.java:255)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.evaluate(BeanDefinitionValueResolver.java:228)
	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:204)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1531)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1276)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
	... 11 more

Can't build the current master

Several Dependencies are not in "normal" repos, missing declaration of custom repos in main pom.

Had to include the http://repo.springsource.org/libs-snapshot/ repository to get rid of the following missing dependencies:

Could not resolve dependencies for project org.springframework.integration.samples:jpa:jar:2.2.0.BUILD-SNAPSHOT: Could not find artifact org.eclipse.persistence:org.eclipse.persistence.jpa:jar:2.3.2

Could not resolve dependencies for project org.springframework.integration.samples:xquery:jar:1.0.0.BUILD-SNAPSHOT: The following artifacts could not be resolved: net.xqj.sedna:sedna-xqj:jar:1.0.0, com.xqj2:xqj2:jar:0.1.0: Could not find artifact net.xqj.sedna:sedna-xqj:jar:1.0.0

integration-http inbound with no Content-Type header

Hello,
I imported spring-int-basic-http example and ran the request using Fiddler. Here is my URL and request header:
URL: http://localhost:8080/http-4.1.0.BUILD-SNAPSHOT/receiveGateway
Method: Post
HTTP Headers: User-Agent: Fiddler
Host: localhost:8080
Content-Length: 93

The response is blank. If I add a request header:
Content-Type: text/plain
I get response from server. Please help me with this. I have a client application which is hitting the URL without passing Content-Type and hence I am unable to read the request body.

amqp module missing release/snapshot repos

amqp examples won't build run and the snapshot/release repos don't exist in the pom.xml

requires:

<repository>
        <id>repository.springframework.maven.milestone</id>
        <name>Spring Framework Maven Milestone Repository</name>
        <url>http://maven.springframework.org/milestone</url>
    </repository>
    <repository>
        <id>repository.springframework.maven.snapshot</id>
        <name>Spring Framework Maven Snapshot Repository</name>
        <url>http://maven.springframework.org/snapshot</url>
    </repository>

I can't run this examples

I notice that this dependency doesn't work anymore

    <dependency>
      <groupId>org.springframework.integration</groupId>
      <artifactId>spring-integration-sftp</artifactId>
      <version>5.0.0.BUILD-SNAPSHOT</version>
      <scope>compile</scope>
    </dependency>

I have to replace this this one

    <dependency>
      <groupId>org.springframework.integration</groupId>
      <artifactId>spring-integration-sftp</artifactId>
      <version>5.0.0.M2</version>
      <scope>compile</scope>
    </dependency>

Then I got a class not found exception because no dependencies for spring-core

    <dependency>
      <groupId>org.springframework.integration</groupId>
      <artifactId>spring-integration-core</artifactId>
      <version>4.3.7.RELEASE</version>
    </dependency>

But when I tried to run the example SftpOutboundTransferSample I got this error :

/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/bin/java -ea -Didea.launcher.port=7533 "-Didea.launcher.bin.path=/Applications/IntelliJ IDEA.app/Contents/bin" -Dfile.encoding=UTF-8 -classpath "/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar:/Applications/IntelliJ IDEA.app/Contents/plugins/junit/lib/junit-rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/deploy.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/jfxrt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/javaws.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/jfxswt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/plugin.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/jre/lib/rt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/lib/ant-javafx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/lib/dt.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/lib/javafx-mx.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/lib/jconsole.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/lib/packager.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/lib/sa-jdi.jar:/Library/Java/JavaVirtualMachines/jdk1.8.0_111.jdk/Contents/Home/lib/tools.jar:/Users/rivera/git/spring/spring-integration-samples/basic/sftp/target/test-classes:/Users/rivera/.m2/repository/org/springframework/integration/spring-integration-core/4.3.7.RELEASE/spring-integration-core-4.3.7.RELEASE.jar:/Users/rivera/.m2/repository/org/springframework/spring-core/4.3.6.RELEASE/spring-core-4.3.6.RELEASE.jar:/Users/rivera/.m2/repository/commons-logging/commons-logging/1.2/commons-logging-1.2.jar:/Users/rivera/.m2/repository/org/springframework/spring-aop/4.3.6.RELEASE/spring-aop-4.3.6.RELEASE.jar:/Users/rivera/.m2/repository/org/springframework/spring-beans/4.3.6.RELEASE/spring-beans-4.3.6.RELEASE.jar:/Users/rivera/.m2/repository/org/springframework/spring-context/4.3.6.RELEASE/spring-context-4.3.6.RELEASE.jar:/Users/rivera/.m2/repository/org/springframework/spring-expression/4.3.6.RELEASE/spring-expression-4.3.6.RELEASE.jar:/Users/rivera/.m2/repository/org/springframework/spring-messaging/4.3.6.RELEASE/spring-messaging-4.3.6.RELEASE.jar:/Users/rivera/.m2/repository/org/springframework/spring-tx/4.3.6.RELEASE/spring-tx-4.3.6.RELEASE.jar:/Users/rivera/.m2/repository/org/springframework/retry/spring-retry/1.1.3.RELEASE/spring-retry-1.1.3.RELEASE.jar:/Users/rivera/.m2/repository/org/springframework/integration/spring-integration-sftp/5.0.0.M2/spring-integration-sftp-5.0.0.M2.jar:/Users/rivera/.m2/repository/org/springframework/integration/spring-integration-file/5.0.0.M2/spring-integration-file-5.0.0.M2.jar:/Users/rivera/.m2/repository/commons-io/commons-io/2.4/commons-io-2.4.jar:/Users/rivera/.m2/repository/org/springframework/integration/spring-integration-stream/5.0.0.M2/spring-integration-stream-5.0.0.M2.jar:/Users/rivera/.m2/repository/com/jcraft/jsch/0.1.54/jsch-0.1.54.jar:/Users/rivera/.m2/repository/org/springframework/spring-context-support/5.0.0.M4/spring-context-support-5.0.0.M4.jar:/Users/rivera/.m2/repository/org/apache/sshd/sshd-core/0.14.0/sshd-core-0.14.0.jar:/Users/rivera/.m2/repository/org/slf4j/slf4j-api/1.6.4/slf4j-api-1.6.4.jar:/Users/rivera/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar:/Users/rivera/.m2/repository/junit/junit/4.12/junit-4.12.jar:/Users/rivera/.m2/repository/org/hamcrest/hamcrest-core/1.3/hamcrest-core-1.3.jar:/Users/rivera/.m2/repository/org/hamcrest/hamcrest-all/1.3/hamcrest-all-1.3.jar:/Users/rivera/.m2/repository/org/mockito/mockito-core/1.10.19/mockito-core-1.10.19.jar:/Users/rivera/.m2/repository/org/objenesis/objenesis/2.1/objenesis-2.1.jar:/Users/rivera/.m2/repository/org/springframework/spring-test/5.0.0.BUILD-SNAPSHOT/spring-test-5.0.0.BUILD-SNAPSHOT.jar" com.intellij.rt.execution.application.AppMain com.intellij.rt.execution.junit.JUnitStarter -ideVersion5 org.springframework.integration.samples.sftp.SftpOutboundTransferSample

org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line 550 in XML document from class path resource [META-INF/spring/integration/SftpOutboundTransferSample-context.xml] is invalid; nested exception is org.xml.sax.SAXParseException; systemId: http://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd; lineNumber: 550; columnNumber: 59; src-resolve: No se puede resolver el nombre 'integration:maxFetchGroup' para un componente 'attribute group'.

	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:399)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:336)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
	at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:181)
	at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:123)
	at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:93)
	at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
	at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:613)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:514)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:197)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:172)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:158)
	at org.springframework.integration.samples.sftp.SftpOutboundTransferSample.testOutbound(SftpOutboundTransferSample.java:49)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:51)
	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:237)
	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)
Caused by: org.xml.sax.SAXParseException; systemId: http://www.springframework.org/schema/integration/sftp/spring-integration-sftp.xsd; lineNumber: 550; columnNumber: 59; src-resolve: No se puede resolver el nombre 'integration:maxFetchGroup' para un componente 'attribute group'.
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:203)
	at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.error(ErrorHandlerWrapper.java:134)
	at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(XMLErrorReporter.java:396)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaErr(XSDHandler.java:4156)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.reportSchemaError(XSDHandler.java:4139)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getGlobalDecl(XSDHandler.java:1745)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDAttributeGroupTraverser.traverseLocal(XSDAttributeGroupTraverser.java:80)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDAbstractTraverser.traverseAttrsAndAttrGrps(XSDAbstractTraverser.java:643)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.processComplexContent(XSDComplexTypeTraverser.java:1123)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexContent(XSDComplexTypeTraverser.java:836)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexTypeDecl(XSDComplexTypeTraverser.java:315)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseGlobal(XSDComplexTypeTraverser.java:191)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.traverseGlobalDecl(XSDHandler.java:1892)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.getGlobalDecl(XSDHandler.java:1780)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexContent(XSDComplexTypeTraverser.java:768)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseComplexTypeDecl(XSDComplexTypeTraverser.java:315)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDComplexTypeTraverser.traverseLocal(XSDComplexTypeTraverser.java:164)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTraverser.traverseNamedElement(XSDElementTraverser.java:392)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDElementTraverser.traverseGlobal(XSDElementTraverser.java:242)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.traverseSchemas(XSDHandler.java:1437)
	at com.sun.org.apache.xerces.internal.impl.xs.traversers.XSDHandler.parseSchema(XSDHandler.java:633)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaLoader.loadSchema(XMLSchemaLoader.java:613)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.findSchemaGrammar(XMLSchemaValidator.java:2446)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.handleStartElement(XMLSchemaValidator.java:1767)
	at com.sun.org.apache.xerces.internal.impl.xs.XMLSchemaValidator.startElement(XMLSchemaValidator.java:740)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanStartElement(XMLNSDocumentScannerImpl.java:374)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(XMLDocumentFragmentScannerImpl.java:2784)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(XMLDocumentScannerImpl.java:602)
	at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(XMLNSDocumentScannerImpl.java:112)
	at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:505)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:841)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:770)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:141)
	at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:243)
	at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
	at org.springframework.beans.factory.xml.DefaultDocumentLoader.loadDocument(DefaultDocumentLoader.java:76)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadDocument(XmlBeanDefinitionReader.java:429)
	at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:391)
	... 39 more


Process finished with exit code 255

Any idea???

Thanks

kafka: set message key dynamically

Regarding the kafka sample code, currently you can only have one message key, which you set it in application.properties. After running the application there is no way to change it.

Is there a way to set the message key dynamically, before sending the message?

Is the FTP example, actually working?

when I run it I'm getting this:

org.springframework.messaging.MessagingException:` Failed to invoke handler; nested exception is org.springframework.messaging.MessagingException: Failed to execute on session; nested exception is java.lang.IllegalStateException: failed to create FTPClient, failedMessage=GenericMessage [payload=target\toSend\a.txt, headers={timestamp=1489108163505, id=84218d92-8f62-13aa-587f-3cf1e9768a5b}]
	at org.springframework.integration.handler.advice.RequestHandlerRetryAdvice.doInvoke(RequestHandlerRetryAdvice.java:100)
	at org.springframework.integration.handler.advice.AbstractRequestHandlerAdvice.invoke(AbstractRequestHandlerAdvice.java:70)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:213)
	at com.sun.proxy.$Proxy11.handleMessage(Unknown Source)
	at org.springframework.integration.dispatcher.AbstractDispatcher.tryOptimizedDispatch(AbstractDispatcher.java:116)
	at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:148)
	at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:121)
	at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:89)
	at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:423)
	at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:373)
	at com.ftp.samples.FtpOutboundChannelAdapterSample.runDemo(FtpOutboundChannelAdapterSample.java:56)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: org.springframework.messaging.MessagingException: Failed to execute on session; nested exception is java.lang.IllegalStateException: failed to create FTPClient
	at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:444)
	at org.springframework.integration.file.remote.RemoteFileTemplate.send(RemoteFileTemplate.java:283)
	at org.springframework.integration.file.remote.RemoteFileTemplate.send(RemoteFileTemplate.java:273)
	at org.springframework.integration.file.remote.RemoteFileTemplate.send(RemoteFileTemplate.java:265)
	at org.springframework.integration.file.remote.handler.FileTransferringMessageHandler.handleMessageInternal(FileTransferringMessageHandler.java:170)
	at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:127)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:333)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.integration.handler.advice.AbstractRequestHandlerAdvice$1.cloneAndExecute(AbstractRequestHandlerAdvice.java:93)
	at org.springframework.integration.handler.advice.RequestHandlerRetryAdvice$2.doWithRetry(RequestHandlerRetryAdvice.java:93)
	at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:276)
	at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:201)
	at org.springframework.integration.handler.advice.RequestHandlerRetryAdvice.doInvoke(RequestHandlerRetryAdvice.java:89)
	... 35 more
Caused by: java.lang.IllegalStateException: failed to create FTPClient
	at org.springframework.integration.ftp.session.AbstractFtpSessionFactory.getSession(AbstractFtpSessionFactory.java:169)
	at org.springframework.integration.ftp.session.AbstractFtpSessionFactory.getSession(AbstractFtpSessionFactory.java:41)
	at org.springframework.integration.file.remote.RemoteFileTemplate.execute(RemoteFileTemplate.java:433)
	... 52 more
Caused by: java.net.ConnectException: Connection refused: connect
	at java.net.DualStackPlainSocketImpl.connect0(Native Method)
	at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:79)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
	at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
	at java.net.Socket.connect(Socket.java:579)
	at org.apache.commons.net.SocketClient.connect(SocketClient.java:188)
	at org.apache.commons.net.SocketClient.connect(SocketClient.java:209)
	at org.springframework.integration.ftp.session.AbstractFtpSessionFactory.createClient(AbstractFtpSessionFactory.java:192)
	at org.springframework.integration.ftp.session.AbstractFtpSessionFactory.getSession(AbstractFtpSessionFactory.java:166)
	... 54 more

Also, what does it means? spring-integration-samples/basic/ftp/src/test/java/org/springframework/integration/samples/ftp/support/TestUserManager.java

It says don't use hardcoded Port. But, how to do that?

Issue running intermediate\retry-and-more's StatelessRetryDemo

I am receiving the following error when attempting to run the StatelessRetryDemo class:

15:12:42.465 INFO  [main][org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler] Shutting down ExecutorService 'taskScheduler'
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.handler.MessageHandlerChain#0': Cannot create inner bean 'org.springframework.integration.handler.MessageHandlerChain#0$child#1.handler' of type [org.springframework.integration.stream.CharacterStreamWritingMessageHandler] while setting bean property 'handlers' with key [1]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.handler.MessageHandlerChain#0$child#1.handler': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'autoStartup' of bean class [org.springframework.integration.stream.CharacterStreamWritingMessageHandler]: Bean property 'autoStartup' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:279)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:121)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:350)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:154)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1417)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1158)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:296)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:293)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:628)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
    at org.springframework.integration.samples.advice.StatelessRetryDemo.main(StatelessRetryDemo.java:41)
    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:597)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.handler.MessageHandlerChain#0$child#1.handler': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'autoStartup' of bean class [org.springframework.integration.stream.CharacterStreamWritingMessageHandler]: Bean property 'autoStartup' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1453)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1158)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:269)
    ... 22 more
Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property 'autoStartup' of bean class [org.springframework.integration.stream.CharacterStreamWritingMessageHandler]: Bean property 'autoStartup' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
    at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:1042)
    at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:902)
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
    at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:57)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1450)
    ... 26 more

Process finished with exit code 1

java.lang.NoSuchMethodError: com.sun.mail.imap.IMAPFolder.idle()

Hi,

We are getting NoSuchMethodError. Here are the stack trace.

18/Feb/2017:07:48:13.155 [pool-4-thread-1] ERROR o.s.s.s.TaskUtils$LoggingErrorHandler.handleError(95) - Unexpected error occurred in scheduled task.
java.lang.NoSuchMethodError: com.sun.mail.imap.IMAPFolder.idle()V
at org.springframework.integration.mail.ImapMailReceiver.waitForNewMessages(ImapMailReceiver.java:175) ~[spring-integration-mail-4.3.1.RELEASE.jar:4.3.1.RELEASE]
at org.springframework.integration.mail.ImapIdleChannelAdapter$IdleTask.run(ImapIdleChannelAdapter.java:271) ~[spring-integration-mail-4.3.1.RELEASE.jar:4.3.1.RELEASE]
at org.springframework.integration.mail.ImapIdleChannelAdapter$ReceivingTask.run(ImapIdleChannelAdapter.java:241) ~[spring-integration-mail-4.3.1.RELEASE.jar:4.3.1.RELEASE]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-4.2.0.RELEASE.jar:4.2.0.RELEASE]
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) [spring-context-4.2.0.RELEASE.jar:4.2.0.RELEASE]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_101]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_101]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_101]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_101]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_101]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_101]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]
18/Feb/2017:07:48:14.172 [pool-7-thread-1] ERROR o.s.s.s.TaskUtils$LoggingErrorHandler.handleError(95) - Unexpected error occurred in scheduled task.
java.lang.NoSuchMethodError: com.sun.mail.imap.IMAPFolder.idle()V
at org.springframework.integration.mail.ImapMailReceiver.waitForNewMessages(ImapMailReceiver.java:175) ~[spring-integration-mail-4.3.1.RELEASE.jar:4.3.1.RELEASE]
at org.springframework.integration.mail.ImapIdleChannelAdapter$IdleTask.run(ImapIdleChannelAdapter.java:271) ~[spring-integration-mail-4.3.1.RELEASE.jar:4.3.1.RELEASE]
at org.springframework.integration.mail.ImapIdleChannelAdapter$ReceivingTask.run(ImapIdleChannelAdapter.java:241) ~[spring-integration-mail-4.3.1.RELEASE.jar:4.3.1.RELEASE]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-4.2.0.RELEASE.jar:4.2.0.RELEASE]
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) [spring-context-4.2.0.RELEASE.jar:4.2.0.RELEASE]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [na:1.8.0_101]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_101]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [na:1.8.0_101]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [na:1.8.0_101]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_101]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_101]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]

Here the spring configuration :

<int:service-activator input-channel="emailReceiveChannel" ref="emailReceiver" method="emailReceived" />
<int:channel id="emailReceiveChannel" />

<int-mail:imap-idle-channel-adapter id="customAdapter"
    store-uri="${lab.mail.store-uri}"
    channel="emailReceiveChannel"
    auto-startup="${lab.mail.autostart}"
    should-delete-messages="false"
    should-mark-messages-as-read="true"
    java-mail-properties="javaMailProperties"/>

<util:properties id="javaMailProperties">
    <prop key="mail.imap.socketFactory.class">javax.net.ssl.SSLSocketFactory</prop>
    <prop key="mail.imap.socketFactory.fallback">false</prop>
    <prop key="mail.store.protocol">imaps</prop>
    <prop key="mail.debug">false</prop>
</util:properties>

It is flooding our log files. Please help how to fix it.

Thanks,
Pankaj

SPRING user password?

A security filter has been added and that's great. The password in the user security properties is encrypted and therefore, one cannot access the app without cracking the code. Please add the explicit clear-text credentials in the readme.

This is it (I think)
SPRING / spring

Thanks!

Basic Mail Listener

Mail Listener reading only one received mail at a time, is there any chance to read all received mails at single hit.

Getting web sockets to work on spring mvc

I have a spring mvc project with the latest version of spring framework but i just cant seem to have the web sockets functionality to work.

I have this as my web sockets config

package com.authority.configuration;

import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.simp.config.ChannelRegistration;
import org.springframework.messaging.simp.config.MessageBrokerRegistry;
import org.springframework.web.socket.config.annotation.EnableWebSocketMessageBroker;
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
import org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer;


@Configuration
@EnableWebSocketMessageBroker
public class WebSocketsConfiguration extends AbstractWebSocketMessageBrokerConfigurer {

    @Override
    public void registerStompEndpoints(final StompEndpointRegistry registry) {
        registry.addEndpoint("/random").withSockJS();
    }

    @Override
    public void configureClientInboundChannel(
        final ChannelRegistration registration) {
    }

    @Override
    public void configureClientOutboundChannel(
        final ChannelRegistration registration) {
    }

    @Override
    public void configureMessageBroker(final MessageBrokerRegistry registry) {
    }

}

I have this security config

package com.authority.configuration;

import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry;
import org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer;

@Configuration
public class SocketSecurityConfig extends AbstractSecurityWebSocketMessageBrokerConfigurer {

    @Override
    protected boolean sameOriginDisabled() {
        return true;
    }

    @Override
    protected void configureInbound(MessageSecurityMetadataSourceRegistry messages) {
        messages.anyMessage().permitAll();
    }
}

but i still get this error when i run

[WARNING] FAILED o.e.j.m.p.JettyWebAppContext@27d73d22{/,file:/C:/authority/src/main/webapp/,STARTING}{file:/C:/authority/src/main/webapp/}: java.lang.NoClassDefFoundError: org/springframework/security/messaging/context/SecurityContextChannelInterceptor
java.lang.NoClassDefFoundError: org/springframework/security/messaging/context/SecurityContextChannelInterceptor

rest-http POST method

i want to sent json by post method
after change integration configuration
and write test i send object but response is failed

<int-http:inbound-gateway id="inboundEmployeeSearchRequestGateway" 
        supported-methods="POST"
        request-payload-type="org.springframework.integration.samples.rest.domain.Employee"
        request-channel="employeeSearchRequest"
        reply-channel="employeeSearchResponse"
        mapped-response-headers="Return-Status, Return-Status-Msg, HTTP_RESPONSE_HEADERS"
        path="/services/employee/{id}/search"
        reply-timeout="50000"  
        >
@Test
    public void testGetEmployeeAsJsonPOST() throws Exception {
        Map<String, Object> employeeSearchMap = getEmployeeSearchMap("0");

        final String fullUrl = "http://localhost:8080/rest-http/services/employee/{id}/search?format=json";
        HttpHeaders headers = getHttpHeadersWithUserCredentials(new HttpHeaders());
        headers.add("Accept", "application/json");
        Employee em=new Employee(6, "ali akbar", "azizkhani");
        HttpEntity<Employee> request = new HttpEntity<Employee>(em,headers);
        ResponseEntity<?> httpResponse = restTemplate.exchange(fullUrl, HttpMethod.POST, request,EmployeeList.class, employeeSearchMap);
        logger.info("Return Status :" + httpResponse.getHeaders().get("X-Return-Status"));
        logger.info("Return Status Message :" + httpResponse.getHeaders().get("X-Return-Status-Msg"));
        assertTrue(httpResponse.getStatusCode().equals(HttpStatus.OK));
        ByteArrayOutputStream out = new ByteArrayOutputStream();
        jaxbJacksonObjectMapper.writeValue(out, httpResponse.getBody());
        logger.info(new String(out.toByteArray()));
    }

No XML example of jdbc outbound gateway

Is there an no xml example of the basic jdbc sample available? Am particularly interested in converting the following part using annotations.

<bean id="personResultMapper" class="org.springframework.integration.samples.jdbc.PersonMapper"/>
    <int-jdbc:outbound-gateway data-source="datasource" 
                                request-channel="createPersonRequestChannel"
                                reply-channel="createPersonReplyChannel"
                                update="insert into Person (name,gender,dateOfBirth) 
                                    values
                                    (:name,:gender,:dateOfBirth)"
                                query="select * from Person where id = :id"     
                                request-sql-parameter-source-factory="requestSource"
                                reply-sql-parameter-source-factory="replySource"
                            row-mapper="personResultMapper"
                                keys-generated="true"/>

xsi:SchemaLocation is not match pom.xml dependency's version.

For example in https://github.com/spring-projects/spring-integration-samples/blob/master/basic/file/src/main/resources/META-INF/spring/integration/fileCopyDemo-binary.xml schemaLocation shows http://www.springframework.org/schema/integration/spring-integration.xsd and http://www.springframework.org/schema/integration/file/spring-integration-file.xsd schema. But if you see into these files, you find an older version than 3.0.

In pom.xml:
<spring.integration.version>3.0.0.RELEASE</spring.integration.version>

When I use an IDE (NetBeans) the XSD xsd:documentation element shown as documentation, but not for version 3.0.

java.lang.ClassNotFoundException: org.springframework.integration.twitter.core.Twitter4jTemplate

When I try to run JUnit tests from IDE for the "basic/twitter" artifact the mentioned exception occurs.
Full stack trace:

org.springframework.beans.factory.CannotLoadBeanClassException: Cannot find class [org.springframework.integration.twitter.core.Twitter4jTemplate] for bean with name 'twitterTemplate' defined in class path resource [META-INF/spring/integration/TwitterSendUpdates-context.xml]; nested exception is java.lang.ClassNotFoundException: org.springframework.integration.twitter.core.Twitter4jTemplate
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1261)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.predictBeanType(AbstractAutowireCapableBeanFactory.java:575)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:1330)
at org.springframework.beans.factory.support.AbstractBeanFactory.isFactoryBean(AbstractBeanFactory.java:896)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:566)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:139)
at org.springframework.context.support.ClassPathXmlApplicationContext.(ClassPathXmlApplicationContext.java:83)
at org.springframework.integration.samples.twitter.TwitterSendUpdatesSample.runDemo(TwitterSendUpdatesSample.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:263)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:68)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:47)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: java.lang.ClassNotFoundException: org.springframework.integration.twitter.core.Twitter4jTemplate
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at org.springframework.util.ClassUtils.forName(ClassUtils.java:257)
at org.springframework.beans.factory.support.AbstractBeanDefinition.resolveBeanClass(AbstractBeanDefinition.java:408)
at org.springframework.beans.factory.support.AbstractBeanFactory.doResolveBeanClass(AbstractBeanFactory.java:1282)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveBeanClass(AbstractBeanFactory.java:1253)
... 32 more

Declaring control bus in java config

Hi,
How can I configure a control bus in a java configuration file ? All the examples and docs I see show how to declare it in xml, but I don't know which class gets instantiated.

Thank you.

spring-kafka without spring-boot

is it possible to use spring-kafka or spring-integration-kafka without using spring-boot.
I have implemented producer without spring-boot,
but somehow not able to find consumer alternative i.e. @KafkaListener (spring-kafka)
Any help on this is useful.

Is there any existing repo which has this implemented?
Also, are there any disadvantages of using spring instead of spring-boot.

In our use case, we want to use Kafka as a library and hence wants to use spring.

Spring @Scheduler Annotation Issues with jdk 1.8 & jdk 1.7

Hi Team,

here is my piece of code,

@Configuration
@EnableScheduling
public class CSVFileProcessor {

@Scheduled(fixedRate = 10000)
    private static synchronized void pollDirectory() {
        System.out.println("***started Polling***");
        faxFolder = Paths.get(folderPath);

}

The above Code is running perfectly with Tomcat 7 & jdk 1.8

but when I use jdk 1.7 , The Server is getting hanged while trying to initialize
Spring FrameworkServlet 'appDispatcher' .

Dec 28, 2015 4:20:14 PM org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring FrameworkServlet 'appDispatcher'

Is there anything to do with jdk Versions ?

can you help me please ?

Configure First TCP Server project

Hi,

I am trying to use spring integration samples for tcp server setup. I am having hard time doing so.

Does anyone have a Hello world programme kind of stuff, configured with folder structure and so on.

Basic Mail not able to run

I'm getting error for should-mark-messages-as-read-"cvc-complex-type.3.2.2: Attribute 'should-mark-messages-as-read' is not allowed to appear in element 'int-
mail:imap-idle-channel-adapter'" and fixed-rate - "cvc-complex-type.3.2.2: Attribute 'fixed-rate' is not allowed to appear in element 'int:poller'" can you please help me to resolve ASAP

Two Different inbound adapters for single SFTP Server

Hi Team,
Is it possible to have two different inbound adapters for single SFTP Server?
If yes, Please let me know the configuration of adapters using spring annotation (JDK1.9)
In addition to that more than one type of file filters.
Thanks and Regards,
VADIVEL P M.

Can't compile/run in Eclipse

Hey Guys, thanks for making this samples repository available to those of us learning Spring Integration.

Getting few issue as I import project into Eclipse.
Hope I can get a head start on one of my projects with this sample and am missing something simple and easy to fix in my configuration. (I'm able to build/run other projects from this repo and think my env. more-or-less stable at this juncture)

Lambda expressions are allowed only at source level 1.8 or above EmbeddedSftpServer.java /sftp/src/test/java/org/springframework/integration/samples/sftp line 72 Java Problem
Lambda expressions are allowed only at source level 1.8 or above SftpTestUtils.java /sftp/src/test/java/org/springframework/integration/samples/sftp line 45 Java Problem
Lambda expressions are allowed only at source level 1.8 or above SftpTestUtils.java /sftp/src/test/java/org/springframework/integration/samples/sftp line 63 Java Problem
Lambda expressions are allowed only at source level 1.8 or above SftpTestUtils.java /sftp/src/test/java/org/springframework/integration/samples/sftp line 80 Java Problem
The method afterPropertiesSet() of type EmbeddedSftpServer must override a superclass method EmbeddedSftpServer.java /sftp/src/test/java/org/springframework/integration/samples/sftp line 70 Java Problem
The method getPhase() of type EmbeddedSftpServer must override a superclass method EmbeddedSftpServer.java /sftp/src/test/java/org/springframework/integration/samples/sftp line 118 Java Problem
The method isAutoStartup() of type EmbeddedSftpServer must override a superclass method EmbeddedSftpServer.java /sftp/src/test/java/org/springframework/integration/samples/sftp line 113 Java Problem
The method isRunning() of type EmbeddedSftpServer must override a superclass method EmbeddedSftpServer.java /sftp/src/test/java/org/springframework/integration/samples/sftp line 156 Java Problem
The method setSubsystemFactories(List<NamedFactory>) in the type SshServer is not applicable for the arguments (List) EmbeddedSftpServer.java /sftp/src/test/java/org/springframework/integration/samples/sftp line 75 Java Problem
The method start() of type EmbeddedSftpServer must override a superclass method EmbeddedSftpServer.java /sftp/src/test/java/org/springframework/integration/samples/sftp line 123 Java Problem
The method stop() of type EmbeddedSftpServer must override a superclass method EmbeddedSftpServer.java /sftp/src/test/java/org/springframework/integration/samples/sftp line 141 Java Problem
The method stop(Runnable) of type EmbeddedSftpServer must override a superclass method EmbeddedSftpServer.java /sftp/src/test/java/org/springframework/integration/samples/sftp line 135 Java Problem
The target type of this expression must be a functional interface SftpTestUtils.java /sftp/src/test/java/org/springframework/integration/samples/sftp line 45 Java Problem
The target type of this expression must be a functional interface SftpTestUtils.java /sftp/src/test/java/org/springframework/integration/samples/sftp line 63 Java Problem

Missing StringConversionService

The service class is missing the StringConversionService. I found it in another example in the repo but I'm assuming you would like this code to be self contained.

javax.mail.AuthenticationFailedException

I have replaced [userid]:[pasword] in basic mail sample but i get this error :

org.springframework.integration.handler.LoggingHandler handleMessageInternal
GRAVE: org.springframework.messaging.MessagingException: failure occurred while polling for mail; nested exception is javax.mail.AuthenticationFailedException: failed to connect, no password specified?
	at org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:131)
	at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:230)
	at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:243)
	at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.lambda$run$0(AbstractPollingEndpoint.java:372)
	at org.springframework.integration.util.ErrorHandlingTaskExecutor.lambda$execute$0(ErrorHandlingTaskExecutor.java:53)
	at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
	at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:51)
	at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:366)
	at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
	at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:93)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Caused by: javax.mail.AuthenticationFailedException: failed to connect, no password specified?
	at javax.mail.Service.connect(Service.java:400)
	at javax.mail.Service.connect(Service.java:246)
	at javax.mail.Service.connect(Service.java:195)
	at org.springframework.integration.mail.AbstractMailReceiver.connectStoreIfNecessary(AbstractMailReceiver.java:321)
	at org.springframework.integration.mail.AbstractMailReceiver.openFolder(AbstractMailReceiver.java:328)
	at org.springframework.integration.mail.AbstractMailReceiver.receive(AbstractMailReceiver.java:354)
	at org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:112)
	... 16 more

travel example spring version/yahoo service

The "travel" example declares a dependency on spring-web 3.1.0, which brings in spring-core 3.1.0, which conflicts with 3.0.7 and causes bean loading errors.

Also the yahoo traffic service appears to be dead.

I am newer,who can help me to solve this problem?

The base/testing-examples package。
when run SpelChainTests.testTrueHeader case,the error show below :

一月 22, 2018 10:18:45 上午 org.springframework.test.context.support.AbstractContextLoader generateDefaultLocations
信息: Could not detect default resource locations for test class [org.springframework.integration.samples.testing.chain.SpelChainTests]: no resource found for suffixes {-context.xml}.
一月 22, 2018 10:18:45 上午 org.springframework.test.context.support.AnnotationConfigContextLoaderUtils detectDefaultConfigurationClasses
信息: Could not detect default configuration classes for test class [org.springframework.integration.samples.testing.chain.SpelChainTests]: SpelChainTests does not declare any static, non-private, non-final, nested classes annotated with @configuration.

java.lang.IllegalStateException: DelegatingSmartContextLoader was unable to detect defaults, and no ApplicationContextInitializers or ContextCustomizers were declared for context configuration attributes [[ContextConfigurationAttributes@482f8f11 declaringClass = 'org.springframework.integration.samples.testing.chain.SpelChainTests', classes = '{}', locations = '{}', inheritLocations = true, initializers = '{}', inheritInitializers = true, name = [null], contextLoaderClass = 'org.springframework.test.context.ContextLoader']]

at org.springframework.util.Assert.state(Assert.java:94)
at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildMergedContextConfiguration(AbstractTestContextBootstrapper.java:388)
at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildMergedContextConfiguration(AbstractTestContextBootstrapper.java:303)
at org.springframework.test.context.support.AbstractTestContextBootstrapper.buildTestContext(AbstractTestContextBootstrapper.java:109)
at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:135)
at org.springframework.test.context.TestContextManager.<init>(TestContextManager.java:120)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.createTestContextManager(SpringJUnit4ClassRunner.java:151)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<init>(SpringJUnit4ClassRunner.java:142)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
at org.junit.internal.requests.FilterRequest.getRunner(FilterRequest.java:36)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:49)
at com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)

win64 idea IDE JDK1.8.0_144

Cafe-dsl sample not working

It seems that after the route call the flow does not go back to the main flow (.defaultOutputToParentFlow() seems not to be working) and the commands after the route are never being executed.

Are spring web sockets a single http connection per subscription?

I have a web page that makes use of spring web sockets. I have one subscription and that does work as expected. However, i need the web page to subscribe to more than 100 objects. let me explain what the 100 objects are.

I have a registered user who must login and receive realtime data from 100+ Gps devices and i need to display the location of the devices to the logged in user.

With over 5000 users of the app, i can theorize that at any one time, my app will need to handle 500,000 concurrent web socket connections.

Does spring create a new http connection for every subscription?.

Can i make a web page subscribe to those many objects without running into problems?.

Can spring handle those many concurrent web socket connections?

Basic mail exception

I have enabled POP3 and IMAP on my gmail, replaced [userid]:[pasword] (removed brackets) with correct credentials but getting below error:

Jun 02, 2017 5:50:57 PM org.springframework.integration.handler.LoggingHandler handleMessageInternal
SEVERE: org.springframework.messaging.MessagingException: failure occurred while polling for mail; nested exception is javax.mail.AuthenticationFailedException: failed to connect, no password specified?
at org.springframework.integration.mail.MailReceivingMessageSource.receive(MailReceivingMessageSource.java:131)
at org.springframework.integration.endpoint.SourcePollingChannelAdapter.receiveMessage(SourcePollingChannelAdapter.java:230)
at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:243)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.lambda$run$0(AbstractPollingEndpoint.java:372)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.lambda$execute$0(ErrorHandlingTaskExecutor.java:53)
at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:50)
at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:51)
at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:366)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:83)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: javax.mail.AuthenticationFailedException: failed to connect, no password specified?
at javax.mail.Service.connect(Service.java:400)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.