Spring Integration:使用SOLACE时出现未识别的错误消息

时间:2013-10-06 08:19:39

标签: spring-integration spring-jms

我有一个使用Solace作为消息代理的Spring Integration应用程序。应用程序正在运行 - 消息在队列上接收,然后正确放置在主题上 - 但是在创建消息时会抛出以下错误消息。我试图弄清楚为什么会这样。

03:31:12.479 [taskExecutor-8] WARN  o.s.i.jms.DefaultJmsHeaderMapper - failed to map Message header 'JMS_Solace_TopicSequenceNumber' to JMS property
java.lang.IllegalArgumentException: Property SOLACE_JMS_PROP_TOPIC_SEQUENCE_NUMBER is not settable on a message
    at com.solacesystems.jms.message.SolMessage.setObjectProperty(SolMessage.java:486) ~[sol-jms-6.0.0.146.jar:na]
    at org.springframework.integration.jms.DefaultJmsHeaderMapper.fromHeaders(DefaultJmsHeaderMapper.java:131) [spring-integration-jms-2.2.0.RC2.jar:na]
    at org.springframework.integration.jms.DefaultJmsHeaderMapper.fromHeaders(DefaultJmsHeaderMapper.java:53) [spring-integration-jms-2.2.0.RC2.jar:na]
    at org.springframework.integration.jms.JmsSendingMessageHandler$HeaderMappingMessagePostProcessor.postProcessMessage(JmsSendingMessageHandler.java:162) [spring-integration-jms-2.2.0.RC2.jar:na]
    at org.springframework.jms.core.JmsTemplate$8.createMessage(JmsTemplate.java:656) [spring-jms-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    at org.springframework.jms.core.JmsTemplate.doSend(JmsTemplate.java:565) [spring-jms-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    at org.springframework.jms.core.JmsTemplate$4.doInJms(JmsTemplate.java:546) [spring-jms-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    at org.springframework.jms.core.JmsTemplate.execute(JmsTemplate.java:466) [spring-jms-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    at org.springframework.jms.core.JmsTemplate.send(JmsTemplate.java:543) [spring-jms-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    at org.springframework.jms.core.JmsTemplate.convertAndSend(JmsTemplate.java:653) [spring-jms-3.1.2.RELEASE.jar:3.1.2.RELEASE]
    at org.springframework.integration.jms.JmsSendingMessageHandler.send(JmsSendingMessageHandler.java:142) [spring-integration-jms-2.2.0.RC2.jar:na]
    at org.springframework.integration.jms.JmsSendingMessageHandler.handleMessageInternal(JmsSendingMessageHandler.java:112) [spring-integration-jms-2.2.0.RC2.jar:na]
    at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:73) [spring-integration-core-2.2.0.RC2.jar:na]
    at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:115) [spring-integration-core-2.2.0.RC2.jar:na]
    at org.springframework.integration.dispatcher.UnicastingDispatcher.access$000(UnicastingDispatcher.java:52) [spring-integration-core-2.2.0.RC2.jar:na]
    at org.springframework.integration.dispatcher.UnicastingDispatcher$1.run(UnicastingDispatcher.java:97) [spring-integration-core-2.2.0.RC2.jar:na]
    at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52) [spring-integration-core-2.2.0.RC2.jar:na]
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) [na:1.6.0_06]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [na:1.6.0_06]
    at java.lang.Thread.run(Unknown Source) [na:1.6.0_06]

非常感谢任何帮助

1 个答案:

答案 0 :(得分:0)

我对SOLACE不熟悉,但听起来入站邮件中只有一个只读属性。默认情况下,所有属性都可用作SI头,同样,我们尝试将SI头映射到JMS属性(如果它们是简单类型)。

这只是一个警告 - 你可以

  • 忽略它 - 将映射器的日志级别设置为ERROR
  • 使用自定义标题映射器跳过它
  • DefaultJmsHeaderMapper上设置outboundPrefix,以便该属性获得不同的名称
  • 在出站适配器之前添加<header-filter/>以将其删除