Uploaded image for project: 'Spring Integration'
  1. Spring Integration
  2. INT-1728

ChatMessageListeningEndpoint must filter out messages that have no content (e.g., messages with ChatState 'composing')

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 2.0.1
    • Fix Version/s: 2.0.2
    • Component/s: None
    • Labels:
      None

      Description

      Using the following XMPP connection config config:

      <int-xmpp:xmpp-connection id="xmppConnection" user="${xmpp.username}" password="${xmpp.password}" host="${xmpp.host}" service-name="${xmpp.service}" port="${xmpp.port}" />

      xmpp.host=talk.google.com
      xmpp.port=5222
      xmpp.service=googlemail.com
       
      xmpp.username=user
      xmpp.password=pwd
       
      #xmpp.host=jabber.org
      #xmpp.port=5222
      #xmpp.service=jabber.org
       
      #xmpp.username=user
      #xmpp.password=pwd

      .. works without any problems when using a GTalk account but throws an exception when using a @jabber.org account:

      handler 'org.spr[email protected]9866417' requires a reply, but no reply was received
      org.springframework.integration.MessageHandlingException: handler 'org.spr[email protected]9866417' requires a reply, but no reply was received
              at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:104) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:78) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:110) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:97) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:44) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:157) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:128) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.core.MessagingTemplate.doSend(MessagingTemplate.java:288) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.core.MessagingTemplate.send(MessagingTemplate.java:149) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendMessage(AbstractReplyProducingMessageHandler.java:176) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendReplyMessage(AbstractReplyProducingMessageHandler.java:160) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.produceReply(AbstractReplyProducingMessageHandler.java:125) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleResult(AbstractReplyProducingMessageHandler.java:119) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:101) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:78) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:110) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:97) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:44) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:157) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:128) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.core.MessagingTemplate.doSend(MessagingTemplate.java:288) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.core.MessagingTemplate.send(MessagingTemplate.java:149) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.router.AbstractMessageRouter.handleMessageInternal(AbstractMessageRouter.java:220) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:78) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.endpoint.PollingConsumer.doPoll(PollingConsumer.java:59) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:116) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:114) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:179) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:48) ~[spring-core-3.0.5.RELEASE.jar:3.0.5.RELEASE]
              at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:174) ~[spring-integration-core-2.0.1.RELEASE.jar:na]
              at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:51) ~[spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
              at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) [spring-context-3.0.5.RELEASE.jar:3.0.5.RELEASE]
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441) [na:1.6.0_20]
              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [na:1.6.0_20]
              at java.util.concurrent.FutureTask.run(FutureTask.java:138) [na:1.6.0_20]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98) [na:1.6.0_20]
              at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:207) [na:1.6.0_20]
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [na:1.6.0_20]
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [na:1.6.0_20]
              at java.lang.Thread.run(Thread.java:619) [na:1.6.0_20]

      However, the @jabber.org connection still works (despite the exception).

        Activity

        Hide
        oleg.zhurakousky@springsource.com Oleg Zhurakousky added a comment -

        Stefan

        The issue is not with Jabber, but with some clients (e.g., Adium) which generates XMPP messages with different states. For example; If you use Adium, for every keystroke (before you hit return) it will generate an XMPP message with ChatState 'composing' (similar to the Skype when you can see that the other person is typing in the message). Such messages will have no content.
        For now we only support messages with content, so I made this issue a bug, but will resolve it is already resolved and will be available with the nightly build.

        Show
        oleg.zhurakousky@springsource.com Oleg Zhurakousky added a comment - Stefan The issue is not with Jabber, but with some clients (e.g., Adium) which generates XMPP messages with different states. For example; If you use Adium, for every keystroke (before you hit return) it will generate an XMPP message with ChatState 'composing' (similar to the Skype when you can see that the other person is typing in the message). Such messages will have no content. For now we only support messages with content, so I made this issue a bug, but will resolve it is already resolved and will be available with the nightly build.
        Hide
        oleg.zhurakousky@springsource.com Oleg Zhurakousky added a comment -

        ChatMessageListeningEndpoint now performs a check to make sure that it only generates SI message if incoming Smack message has content.

        Show
        oleg.zhurakousky@springsource.com Oleg Zhurakousky added a comment - ChatMessageListeningEndpoint now performs a check to make sure that it only generates SI message if incoming Smack message has content.

          People

          • Assignee:
            oleg.zhurakousky@springsource.com Oleg Zhurakousky
            Reporter:
            sschmidt Stefan Schmidt
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: