title: Spring Integration code throws exception on upgrading to Spring 3.2
body: <p>Below Spring Integration 3.0 code is working successfully in Spring 3.0.</p>
  
  <p>But, on upgrading to Spring 3.2, it throws below 2 exceptions:</p>
  
  <pre><code>org.springframework.expression.AccessException: Unable to access property 'messages' through getter
  
  java.lang.IllegalStateException: Invalid method parameter for messages: was expecting a single payload.
  
  &lt;int-jdbc:inbound-channel-adapter
      query="select ..."
      channel="inp" data-source="dataSource"
      &lt;int:poller fixed-rate="2000"&gt;
      &lt;/int:poller&gt;
  &lt;/int-jdbc:inbound-channel-adapter&gt;
  </code></pre>
  
  <p>Above query returns one or more rows and result is assigned to List of Service Activator</p>
  
  <pre><code>&lt;int:service-activator input-channel="inp" ref="FileService" output-channel="resp" /&gt;
  
  @ServiceActivator(inputChannel = "inp", outputChannel = "resp")
  public List&lt;?&gt; process(List&lt;?&gt; ) {
      ...
  }
  </code></pre>
  
  <p>Getting below exception in Spring 3.2.</p>
  
  <pre><code>10:15:44.556 DEBUG [task-scheduler-1][org.springframework.integration.channel.PublishSubscribeChannel] preSend on channel 'errorChannel', message: [Payload=org.springframework.integration.MessageHandlingException: org.springframework.expression.AccessException: Unable to access property 'messages' through getter][Headers={timestamp=1402409744556, id=a5143a74-7da4-d745-bda5-2a74ce102491}]
  10:15:44.556 DEBUG [task-scheduler-1][org.springframework.integration.handler.LoggingHandler] (inner bean)#d72200 received message: [Payload=org.springframework.integration.MessageHandlingException: org.springframework.expression.AccessException: Unable to access property 'messages' through getter][Headers={timestamp=1402409744556, id=a5143a74-7da4-d745-bda5-2a74ce102491}]
  10:15:44.559 ERROR [task-scheduler-1][org.springframework.integration.handler.LoggingHandler] org.springframework.integration.MessageHandlingException: org.springframework.expression.AccessException: Unable to access property 'messages' through getter
      at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:76)
      at org.springframework.integration.handler.ServiceActivatingHandler.handleRequestMessage(ServiceActivatingHandler.java:67)
      at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:142)
      at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:73)
      at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:115)
      at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:102)
      at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:77)
      at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:178)
      at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:149)
      at org.springframework.integration.core.MessagingTemplate.doSend(MessagingTemplate.java:330)
      at org.springframework.integration.core.MessagingTemplate.send(MessagingTemplate.java:169)
      at org.springframework.integration.endpoint.SourcePollingChannelAdapter.handleMessage(SourcePollingChannelAdapter.java:97)
      at org.springframework.integration.endpoint.AbstractPollingEndpoint.doPoll(AbstractPollingEndpoint.java:199)
      at org.springframework.integration.endpoint.AbstractPollingEndpoint.access$000(AbstractPollingEndpoint.java:51)
      at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:143)
      at org.springframework.integration.endpoint.AbstractPollingEndpoint$1.call(AbstractPollingEndpoint.java:141)
      at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller$1.run(AbstractPollingEndpoint.java:273)
      at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:52)
      at org.springframework.core.task.SyncTaskExecutor.execute(SyncTaskExecutor.java:49)
      at org.springframework.integration.util.ErrorHandlingTaskExecutor.execute(ErrorHandlingTaskExecutor.java:49)
      at org.springframework.integration.endpoint.AbstractPollingEndpoint$Poller.run(AbstractPollingEndpoint.java:268)
      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(Unknown Source)
      at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
      at java.util.concurrent.FutureTask.run(Unknown Source)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(Unknown Source)
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      at java.lang.Thread.run(Unknown Source)
  Caused by: org.springframework.expression.AccessException: Unable to access property 'messages' through getter
      at org.springframework.expression.spel.support.ReflectivePropertyAccessor$OptimalPropertyAccessor.read(ReflectivePropertyAccessor.java:614)
      at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:202)
      at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:85)
      at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:78)
      at org.springframework.expression.spel.ast.MethodReference.getArguments(MethodReference.java:147)
      at org.springframework.expression.spel.ast.MethodReference.getValueRef(MethodReference.java:66)
      at org.springframework.expression.spel.ast.CompoundExpression.getValueRef(CompoundExpression.java:63)
      at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:82)
      at org.springframework.expression.spel.ast.SpelNodeImpl.getTypedValue(SpelNodeImpl.java:102)
      at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:103)
      at org.springframework.integration.util.AbstractExpressionEvaluator.evaluateExpression(AbstractExpressionEvaluator.java:144)
      at org.springframework.integration.util.MessagingMethodInvokerHelper.processInternal(MessagingMethodInvokerHelper.java:268)
      at org.springframework.integration.util.MessagingMethodInvokerHelper.process(MessagingMethodInvokerHelper.java:142)
      at org.springframework.integration.handler.MethodInvokingMessageProcessor.processMessage(MethodInvokingMessageProcessor.java:73)
      ... 30 more
  Caused by: java.lang.reflect.InvocationTargetException
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.springframework.expression.spel.support.ReflectivePropertyAccessor$OptimalPropertyAccessor.read(ReflectivePropertyAccessor.java:610)
      ... 43 more
  Caused by: java.lang.IllegalStateException: Invalid method parameter for messages: was expecting a single payload.
      at org.springframework.util.Assert.state(Assert.java:385)
      at org.springframework.integration.util.MessagingMethodInvokerHelper$ParametersWrapper.getMessages(MessagingMethodInvokerHelper.java:788)
      ... 48 more
  </code></pre>
  
  <p>EDIT: payload and header as per the logs</p>
  
  <pre><code>[Payload=[{NID=1241430 , CTR=0   , FLAG=01, UPDATETIME=2013-08-12 07:42:35.137}, {NID=1241430 , CTR=001 , FLAG=01, UPDATETIME=2013-08-12 07:42:35.457}]][Headers={timestamp=1402472659515, id=a08ec480-1356-001b-e6f7-0511b9ecf6d6}]
  </code></pre>