Spring Integration
  1. Spring Integration
  2. INT-2232

Spurious Stack Trace When Processing NullChannel in GlobalChannelInterceptorBeanPostProcessor

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Complete
    • Affects Version/s: 2.1 M3
    • Fix Version/s: 2.0.6, 2.1 RC1
    • Component/s: Core
    • Labels:
      None

      Description

      GCIBPP uses a DirectFieldAccessor indiscriminately to get the current list of interceptors on a channel. NullChannel has no such field. Since NullChannel is omnipresent, one always gets a stack trace when using DEBUG logging with global channel interceptor(s).

      2011-11-09 10:17:22,721 [main] DEBUG: org.springframework.integration.channel.interceptor.GlobalChannelInterceptorBeanPostProcessor - interceptors not supported by channel 'org.springframework.integration.channel.NullChannel@63d87b85'
      org.springframework.beans.NotReadablePropertyException: Invalid property 'interceptors' of bean class [org.springframework.integration.channel.NullChannel]: Field 'interceptors' does not exist
      	at org.springframework.beans.DirectFieldAccessor.getPropertyValue(DirectFieldAccessor.java:108)
      	at org.springframework.integration.channel.interceptor.GlobalChannelInterceptorBeanPostProcessor.getExistingInterceptors(GlobalChannelInterceptorBeanPostProcessor.java:140)
      	at org.springframework.integration.channel.interceptor.GlobalChannelInterceptorBeanPostProcessor.addMatchingInterceptors(GlobalChannelInterceptorBeanPostProcessor.java:95)
      	at org.springframework.integration.channel.interceptor.GlobalChannelInterceptorBeanPostProcessor.postProcessAfterInitialization(GlobalChannelInterceptorBeanPostProcessor.java:86)
      

      Maybe leave the debug log there but don't include the exception, unless it is not of type NRPE.

        Activity

        Hide
        Mark Fisher added a comment -

        I'm just reopening this while I backport it for 2.0.6.

        Show
        Mark Fisher added a comment - I'm just reopening this while I backport it for 2.0.6.
        Hide
        Mark Fisher added a comment -

        Now resolved on 'maint' as well (for 2.0.6)

        Show
        Mark Fisher added a comment - Now resolved on 'maint' as well (for 2.0.6)

          People

          • Assignee:
            Gary Russell
            Reporter:
            Gary Russell
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: