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

NPE in the MessagingGatewayRegistrar when default-payload-expression but now any default-headers

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Complete
    • Affects Version/s: 4.3.15
    • Fix Version/s: 5.1 M1, 5.0.5, 4.3.16
    • Component/s: Core
    • Labels:

      Description

      <int:gateway id="sampleGateway2"
      				 service-interface="org.springframework.integration.gateway.GatewayInterfaceTests$Bar"
      				 default-request-channel="requestChannelBaz" default-payload-expression="'foo'">
      </int:gateway>
      
      Caused by: java.lang.NullPointerException
      	at org.springframework.integration.config.MessagingGatewayRegistrar.parse(MessagingGatewayRegistrar.java:107)
      	at org.springframework.integration.config.xml.GatewayParser.parse(GatewayParser.java:137)
      	at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:74)
      	at org.springframework.integration.config.xml.AbstractIntegrationNamespaceHandler.parse(AbstractIntegrationNamespaceHandler.java:63)
      

      The reason that defaultHeaders attribute is null, but we still step into the block to parse them because we meet this condition: if (hasDefaultHeaders || hasDefaultPayloadExpression) {.

        Attachments

          Activity

            People

            • Assignee:
              abilan Artem Bilan
              Reporter:
              abilan Artem Bilan
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: