Announcement Announcement Module
Collapse
No announcement yet.
Upgrading RC2 to GA Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Upgrading RC2 to GA

    When I upgrade from RC2 to GA, it throws the exception:
    Code:
    No poller has been defined for endpoint 'testHttpOutboundGateway', and no default poller is available within the context.
    I configured a default poller, then the exception disappeared. But I wondered if the default poller was not configured, how should I do to define individual poller for each httpinvoker outbound gateway?

  • #2
    Moreover, I found the schemas of the configuration files had not been upgraded synchronously.

    Comment


    • #3
      Originally posted by zjulyy View Post
      Moreover, I found the schemas of the configuration files had not been upgraded synchronously.
      Did the new schema answer your question?

      Comment


      • #4
        I have the same problem. What exactly do I have to do to solve this?

        Comment


        • #5
          Normally, the solution is to add a <poller/> sub-element within the outbound-gateway element.

          However, I think there is a bug in the schema since the httpinvoker outbound-gateway does not accept any child elements. Please report this in JIRA along with any other information you have. It should be a trivial fix. I think we will release 1.0.1 with just a handful of issues (including this one) next week already.

          In the meantime, the workaround is to use a SubscribableChannel as the input-channel of your outbound-gateway. I would recommend that anyways unless you really need to have buffering (in a queue) for that channel.

          If you do need to have buffering, then you could add a "bridge" element to convert that PollableChannel to a SubscribableChannel (as explained in the "Messaging Bridge" chapter within the reference manual).

          I'm interested to know about the use-case. For each of you... do you require buffering there?

          Comment


          • #6
            Thanks for the tip. It works when adding this into my config:
            Code:
            	<poller id="poller" default="true">
            		<interval-trigger interval="1000"/>
            	</poller>
            Now I get this:
            Code:
            Caused by: java.lang.IllegalArgumentException: method must not be null
            	at org.springframework.util.Assert.notNull(Assert.java:112)
            	at org.springframework.integration.message.MethodParameterMessageMapper.<init>(MethodParameterMessageMapper.java:63)
            	at org.springframework.integration.handler.MessageMappingMethodInvoker.resolveParameters(MessageMappingMethodInvoker.java:161)
            	at org.springframework.integration.handler.MessageMappingMethodInvoker.createArgumentArrayFromMessage(MessageMappingMethodInvoker.java:147)
            	at org.springframework.integration.handler.MessageMappingMethodInvoker.invokeMethod(MessageMappingMethodInvoker.java:98)
            	at org.springframework.integration.splitter.MethodInvokingSplitter.splitMessage(MethodInvokingSplitter.java:54)
            	at org.springframework.integration.splitter.AbstractMessageSplitter.handleRequestMessage(AbstractMessageSplitter.java:34)
            	at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:90)
            	at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:48)
            Though I have defined the method attribute in the splitter:
            Code:
            	<splitter id="csvReaderSplitter" input-channel="csvRequestChannel" output-channel="collectionChannel"
            		ref="csvReader" method="parse" />

            Comment


            • #7
              Can you post the 'parse' method from whatever class the 'csvReader' is an instance of?

              Comment


              • #8
                My CsvReader class has two parse()-methods:
                Code:
                ...
                    public List<List<String>> parse(Message<IPlanComImportConfiguration> fileNameMessage) throws BaseException {
                        return parseFile(fileNameMessage.getPayload().getImportDataPath());
                    }
                    
                    /**
                     * Parses the given file name and returns a {@link List} of row elements.
                     * @param fileName to be parsed
                     * @return {@link List} filled with row elements
                     */
                    public List<List<String>> parse(String fileName) throws BaseException {
                ...
                Somehow SI gets confused by this though I am sending a message of type IPlanComImportConfiguration to the csvRequestChannel?!

                My workaround is to change the second method to parseFile()!

                Comment


                • #9
                  Okay. I just created a quick test to reproduce this with two methods with the same name and one of them takes a Message.

                  If you know the exact method to invoke, I would recommend using descriptive method names anyways.

                  However, please do report this in JIRA. We need to modify the resolver to match the Message parameter method when multiple eligible methods are present. We also need to provide a better exception message here if possible.

                  Thanks,
                  Mark

                  Comment


                  • #10
                    There is another problem that might relate to the resolver as well. In my configuration I have this:

                    Code:
                    	<service-activator id="initAdapterClassServiceActivator" input-channel="requestChannel"
                    		ref="csvToAdaptersTranslator" method="initAdapterClass"/>
                    
                    	<beans:bean id="csvToAdaptersTranslator"
                    		class="com.qnamic.railcom.eip.transformation.MapToOperationalPeriodTranslator">
                    		<beans:property name="rowMapProcessors" ref="rowMapProcessors"/>
                    	</beans:bean>
                    Now I get this error:
                    Code:
                    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'initAdapterClassServiceActivator': Cannot resolve reference to bean 'org.springframework.integration.handler.ServiceActivatingHandler#2' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.integration.handler.ServiceActivatingHandler#2': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.integration.handler.ServiceActivatingHandler]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: More than one method matches payload type [interface com.qnamic.plancom.importer.IPlanComImportConfiguration]. Consider using annotations or providing a method name.
                    	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:275)
                    	at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:104)
                    	at org.springframework.beans.factory.support.ConstructorResolver.resolveConstructorArguments(ConstructorResolver.java:479)
                    	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:162)
                    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:925)
                    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:835)
                    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:440)
                    	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
                    Here it complains that "More than one method matches payload type ...". The thing is that my class MapToOperationalPeriodTranslator has only one(!) method called initAdapterClass(). But this method overrides the super class! Does that might confuse the resolver as well?
                    Last edited by ttruong; Dec 5th, 2008, 07:35 PM.

                    Comment


                    • #11
                      Bug is created here: http://jira.springframework.org/browse/INT-504

                      Comment


                      • #12
                        Thank you. I marked it for 1.0.1

                        The superclass method ambiguity should be a separate issue.
                        We need to filter out superclass duplicates in the HandlerMethodUtils.getCandidateHandlerMethods(..) method. Do you mind reporting that as well?

                        Comment


                        • #13
                          Here is the bug for the method ambiguity: http://jira.springframework.org/browse/INT-506

                          Comment


                          • #14
                            Thanks again. That issue will also be resolved for 1.0.1

                            Comment


                            • #15
                              I resolved both INT-504 and INT-506. If possible, could you please test your use case against the snapshot (SVN revision #1824 or later).

                              Thanks,
                              Mark

                              Comment

                              Working...
                              X